<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/mm/zsmalloc.c, branch linux-5.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-04-07T17:43:41Z</updated>
<entry>
<title>mm: use fallthrough;</title>
<updated>2020-04-07T17:43:41Z</updated>
<author>
<name>Joe Perches</name>
</author>
<published>2020-04-07T03:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4a9bc58969abc695a6ebb06d801a99c1bafc001'/>
<id>urn:sha1:e4a9bc58969abc695a6ebb06d801a99c1bafc001</id>
<content type='text'>
Convert the various /* fallthrough */ comments to the pseudo-keyword
fallthrough;

Done via script:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Link: http://lkml.kernel.org/r/f62fea5d10eb0ccfc05d87c242a620c261219b66.camel@perches.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc: add missing annotation for unpin_tag()</title>
<updated>2020-04-07T17:43:41Z</updated>
<author>
<name>Jules Irenge</name>
</author>
<published>2020-04-07T03:08:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc22b18b1f805dd785c408060f21aecb4c500ea5'/>
<id>urn:sha1:bc22b18b1f805dd785c408060f21aecb4c500ea5</id>
<content type='text'>
Sparse reports a warning at unpin_tag()()

warning: context imbalance in unpin_tag() - unexpected unlock

The root cause is the missing annotation at unpin_tag()
Add the missing __releases(bitlock) annotation

Signed-off-by: Jules Irenge &lt;jbi.octave@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Link: http://lkml.kernel.org/r/20200214204741.94112-14-jbi.octave@gmail.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc: add missing annotation for pin_tag()</title>
<updated>2020-04-07T17:43:41Z</updated>
<author>
<name>Jules Irenge</name>
</author>
<published>2020-04-07T03:08:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70c7ec95bece1bd01e25fbc4f17c9262445de417'/>
<id>urn:sha1:70c7ec95bece1bd01e25fbc4f17c9262445de417</id>
<content type='text'>
Sparse reports a warning at pin_tag()()

warning: context imbalance in pin_tag() - wrong count at exit

The root cause is the missing annotation at pin_tag()
Add the missing __acquires(bitlock) annotation

Signed-off-by: Jules Irenge &lt;jbi.octave@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Link: http://lkml.kernel.org/r/20200214204741.94112-13-jbi.octave@gmail.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc: add missing annotation for migrate_read_unlock()</title>
<updated>2020-04-07T17:43:41Z</updated>
<author>
<name>Jules Irenge</name>
</author>
<published>2020-04-07T03:08:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a374cccee8cdfa2902bb7a07a10671ffc1a72c1'/>
<id>urn:sha1:8a374cccee8cdfa2902bb7a07a10671ffc1a72c1</id>
<content type='text'>
Sparse reports a warning at migrate_read_unlock()()

 warning: context imbalance in migrate_read_unlock() - unexpected unlock

The root cause is the missing annotation at migrate_read_unlock()
Add the missing __releases(&amp;zspage-&gt;lock) annotation

Signed-off-by: Jules Irenge &lt;jbi.octave@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Link: http://lkml.kernel.org/r/20200214204741.94112-12-jbi.octave@gmail.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc: add missing annotation for migrate_read_lock()</title>
<updated>2020-04-07T17:43:41Z</updated>
<author>
<name>Jules Irenge</name>
</author>
<published>2020-04-07T03:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfc451cfdf1dde36eada652a4b16d9b1524c5932'/>
<id>urn:sha1:cfc451cfdf1dde36eada652a4b16d9b1524c5932</id>
<content type='text'>
Sparse reports a warning at migrate_read_lock()()

 warning: context imbalance in migrate_read_lock() - wrong count at exit

The root cause is the missing annotation at migrate_read_lock()
Add the missing __acquires(&amp;zspage-&gt;lock) annotation

Signed-off-by: Jules Irenge &lt;jbi.octave@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Link: http://lkml.kernel.org/r/20200214204741.94112-11-jbi.octave@gmail.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc.c: fix the migrated zspage statistics.</title>
<updated>2020-01-04T21:55:09Z</updated>
<author>
<name>Chanho Min</name>
</author>
<published>2020-01-04T20:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac8f05da5174c560de122c499ce5dfb5d0dfbee5'/>
<id>urn:sha1:ac8f05da5174c560de122c499ce5dfb5d0dfbee5</id>
<content type='text'>
When zspage is migrated to the other zone, the zone page state should be
updated as well, otherwise the NR_ZSPAGE for each zone shows wrong
counts including proc/zoneinfo in practice.

Link: http://lkml.kernel.org/r/1575434841-48009-1-git-send-email-chanho.min@lge.com
Fixes: 91537fee0013 ("mm: add NR_ZSMALLOC to vmstat")
Signed-off-by: Chanho Min &lt;chanho.min@lge.com&gt;
Signed-off-by: Jinsuk Choi &lt;jjinsuk.choi@lge.com&gt;
Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;        [4.9+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc.c: fix a -Wunused-function warning</title>
<updated>2019-09-24T22:54:12Z</updated>
<author>
<name>Qian Cai</name>
</author>
<published>2019-09-23T22:39:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b38d01b4de8b1bbda7f5f7e91252609557635fc'/>
<id>urn:sha1:2b38d01b4de8b1bbda7f5f7e91252609557635fc</id>
<content type='text'>
set_zspage_inuse() was introduced in the commit 4f42047bbde0 ("zsmalloc:
use accessor") but all the users of it were removed later by the commits,

bdb0af7ca8f0 ("zsmalloc: factor page chain functionality out")
3783689a1aa8 ("zsmalloc: introduce zspage structure")

so the function can be safely removed now.

Link: http://lkml.kernel.org/r/1568658408-19374-1-git-send-email-cai@lca.pw
Signed-off-by: Qian Cai &lt;cai@lca.pw&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>zpool: add malloc_support_movable to zpool_driver</title>
<updated>2019-09-24T22:54:12Z</updated>
<author>
<name>Hui Zhu</name>
</author>
<published>2019-09-23T22:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c165f25d23ecb2f9f121ced20435415b931219e2'/>
<id>urn:sha1:c165f25d23ecb2f9f121ced20435415b931219e2</id>
<content type='text'>
As a zpool_driver, zsmalloc can allocate movable memory because it support
migate pages.  But zbud and z3fold cannot allocate movable memory.

Add malloc_support_movable to zpool_driver.  If a zpool_driver support
allocate movable memory, set it to true.  And add
zpool_malloc_support_movable check malloc_support_movable to make sure if
a zpool support allocate movable memory.

Link: http://lkml.kernel.org/r/20190605100630.13293-1-teawaterz@linux.alibaba.com
Signed-off-by: Hui Zhu &lt;teawaterz@linux.alibaba.com&gt;
Reviewed-by: Shakeel Butt &lt;shakeelb@google.com&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;
Cc: Seth Jennings &lt;sjenning@redhat.com&gt;
Cc: Vitaly Wool &lt;vitalywool@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc.c: fix build when CONFIG_COMPACTION=n</title>
<updated>2019-08-31T01:00:50Z</updated>
<author>
<name>Andrew Morton</name>
</author>
<published>2019-08-30T23:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=441e254cd40dc03beec3c650ce6ce6074bc6517f'/>
<id>urn:sha1:441e254cd40dc03beec3c650ce6ce6074bc6517f</id>
<content type='text'>
Fixes: 701d678599d0c1 ("mm/zsmalloc.c: fix race condition in zs_destroy_pool")
Link: http://lkml.kernel.org/r/201908251039.5oSbEEUT%25lkp@intel.com
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Henry Burns &lt;henrywolfeburns@gmail.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Shakeel Butt &lt;shakeelb@google.com&gt;
Cc: Jonathan Adams &lt;jwadams@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/zsmalloc.c: fix race condition in zs_destroy_pool</title>
<updated>2019-08-25T02:48:42Z</updated>
<author>
<name>Henry Burns</name>
</author>
<published>2019-08-25T00:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=701d678599d0c1623aaf4139c03eea260a75b027'/>
<id>urn:sha1:701d678599d0c1623aaf4139c03eea260a75b027</id>
<content type='text'>
In zs_destroy_pool() we call flush_work(&amp;pool-&gt;free_work).  However, we
have no guarantee that migration isn't happening in the background at
that time.

Since migration can't directly free pages, it relies on free_work being
scheduled to free the pages.  But there's nothing preventing an
in-progress migrate from queuing the work *after*
zs_unregister_migration() has called flush_work().  Which would mean
pages still pointing at the inode when we free it.

Since we know at destroy time all objects should be free, no new
migrations can come in (since zs_page_isolate() fails for fully-free
zspages).  This means it is sufficient to track a "# isolated zspages"
count by class, and have the destroy logic ensure all such pages have
drained before proceeding.  Keeping that state under the class spinlock
keeps the logic straightforward.

In this case a memory leak could lead to an eventual crash if compaction
hits the leaked page.  This crash would only occur if people are
changing their zswap backend at runtime (which eventually starts
destruction).

Link: http://lkml.kernel.org/r/20190809181751.219326-2-henryburns@google.com
Fixes: 48b4800a1c6a ("zsmalloc: page migration support")
Signed-off-by: Henry Burns &lt;henryburns@google.com&gt;
Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Henry Burns &lt;henrywolfeburns@gmail.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Shakeel Butt &lt;shakeelb@google.com&gt;
Cc: Jonathan Adams &lt;jwadams@google.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
