<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/mm/zsmalloc.c, branch dev</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2015-06-26T00:00:37+00:00</updated>
<entry>
<title>zpool: remove zpool_evict()</title>
<updated>2015-06-26T00:00:37+00:00</updated>
<author>
<name>Dan Streetman</name>
<email>ddstreet@ieee.org</email>
</author>
<published>2015-06-25T22:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=479305fd7172503772575997eb6f1b0a2bb4a107'/>
<id>urn:sha1:479305fd7172503772575997eb6f1b0a2bb4a107</id>
<content type='text'>
Remove zpool_evict() helper function.  As zbud is currently the only
zpool implementation that supports eviction, add zpool and zpool_ops
references to struct zbud_pool and directly call zpool_ops-&gt;evict(zpool,
handle) on eviction.

Currently zpool provides the zpool_evict helper which locks the zpool
list lock and searches through all pools to find the specific one
matching the caller, and call the corresponding zpool_ops-&gt;evict
function.  However, this is unnecessary, as the zbud pool can simply
keep a reference to the zpool that created it, as well as the zpool_ops,
and directly call the zpool_ops-&gt;evict function, when it needs to evict
a page.  This avoids a spinlock and list search in zpool for each
eviction.

Signed-off-by: Dan Streetman &lt;ddstreet@ieee.org&gt;
Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.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>
<entry>
<title>zsmalloc: remove obsolete ZSMALLOC_DEBUG</title>
<updated>2015-06-26T00:00:35+00:00</updated>
<author>
<name>Marcin Jabrzyk</name>
<email>m.jabrzyk@samsung.com</email>
</author>
<published>2015-06-25T21:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=13a18a1c04775e48788a25ba7ed17c885df6b1d1'/>
<id>urn:sha1:13a18a1c04775e48788a25ba7ed17c885df6b1d1</id>
<content type='text'>
The DEBUG define in zsmalloc is useless, there is no usage of it at all.

Signed-off-by: Marcin Jabrzyk &lt;m.jabrzyk@samsung.com&gt;
Acked-by: Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;
Cc: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.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>
<entry>
<title>zsmalloc: fix a null pointer dereference in destroy_handle_cache()</title>
<updated>2015-06-10T23:43:43+00:00</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2015-06-10T18:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=02f7b4145da113683ad64c74bf64605e16b71789'/>
<id>urn:sha1:02f7b4145da113683ad64c74bf64605e16b71789</id>
<content type='text'>
If zs_create_pool()-&gt;create_handle_cache()-&gt;kmem_cache_create() or
pool-&gt;name allocation fails, zs_create_pool()-&gt;destroy_handle_cache()
will dereference the NULL pool-&gt;handle_cachep.

Modify destroy_handle_cache() to avoid this.

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Minchan Kim &lt;minchan@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>
<entry>
<title>zsmalloc: remove extra cond_resched() in __zs_compact</title>
<updated>2015-04-15T23:35:22+00:00</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2015-04-15T23:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=160a117f0864871ae1bab26554a985a1d2861afd'/>
<id>urn:sha1:160a117f0864871ae1bab26554a985a1d2861afd</id>
<content type='text'>
Do not perform cond_resched() before the busy compaction loop in
__zs_compact(), because this loop does it when needed.

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&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>zsmalloc: fix fatal corruption due to wrong size class selection</title>
<updated>2015-04-15T23:35:22+00:00</updated>
<author>
<name>Heesub Shin</name>
<email>heesub.shin@samsung.com</email>
</author>
<published>2015-04-15T23:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=81da9b13f73653bf5f38c63af8029fc459198ac0'/>
<id>urn:sha1:81da9b13f73653bf5f38c63af8029fc459198ac0</id>
<content type='text'>
There is no point in overriding the size class below.  It causes fatal
corruption on the next chunk on the 3264-bytes size class, which is the
last size class that is not huge.

For example, if the requested size was exactly 3264 bytes, current
zsmalloc allocates and returns a chunk from the size class of 3264 bytes,
not 4096.  User access to this chunk may overwrite head of the next
adjacent chunk.

Here is the panic log captured when freelist was corrupted due to this:

    Kernel BUG at ffffffc00030659c [verbose debug info unavailable]
    Internal error: Oops - BUG: 96000006 [#1] PREEMPT SMP
    Modules linked in:
    exynos-snapshot: core register saved(CPU:5)
    CPUMERRSR: 0000000000000000, L2MERRSR: 0000000000000000
    exynos-snapshot: context saved(CPU:5)
    exynos-snapshot: item - log_kevents is disabled
    CPU: 5 PID: 898 Comm: kswapd0 Not tainted 3.10.61-4497415-eng #1
    task: ffffffc0b8783d80 ti: ffffffc0b71e8000 task.ti: ffffffc0b71e8000
    PC is at obj_idx_to_offset+0x0/0x1c
    LR is at obj_malloc+0x44/0xe8
    pc : [&lt;ffffffc00030659c&gt;] lr : [&lt;ffffffc000306604&gt;] pstate: a0000045
    sp : ffffffc0b71eb790
    x29: ffffffc0b71eb790 x28: ffffffc00204c000
    x27: 000000000001d96f x26: 0000000000000000
    x25: ffffffc098cc3500 x24: ffffffc0a13f2810
    x23: ffffffc098cc3501 x22: ffffffc0a13f2800
    x21: 000011e1a02006e3 x20: ffffffc0a13f2800
    x19: ffffffbc02a7e000 x18: 0000000000000000
    x17: 0000000000000000 x16: 0000000000000feb
    x15: 0000000000000000 x14: 00000000a01003e3
    x13: 0000000000000020 x12: fffffffffffffff0
    x11: ffffffc08b264000 x10: 00000000e3a01004
    x9 : ffffffc08b263fea x8 : ffffffc0b1e611c0
    x7 : ffffffc000307d24 x6 : 0000000000000000
    x5 : 0000000000000038 x4 : 000000000000011e
    x3 : ffffffbc00003e90 x2 : 0000000000000cc0
    x1 : 00000000d0100371 x0 : ffffffbc00003e90

Reported-by: Sooyong Suk &lt;s.suk@samsung.com&gt;
Signed-off-by: Heesub Shin &lt;heesub.shin@samsung.com&gt;
Tested-by: Sooyong Suk &lt;s.suk@samsung.com&gt;
Acked-by: Minchan Kim &lt;minchan@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>
<entry>
<title>zsmalloc: remove unnecessary insertion/removal of zspage in compaction</title>
<updated>2015-04-15T23:35:22+00:00</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2015-04-15T23:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=839373e645d12613308d9148041c4bd967bce8d5'/>
<id>urn:sha1:839373e645d12613308d9148041c4bd967bce8d5</id>
<content type='text'>
In putback_zspage, we don't need to insert a zspage into list of zspage
in size_class again to just fix fullness group. We could do directly
without reinsertion so we could save some instuctions.

Reported-by: Heesub Shin &lt;heesub.shin@samsung.com&gt;
Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;
Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;
Cc: Ganesh Mahendran &lt;opensource.ganesh@gmail.com&gt;
Cc: Luigi Semenzato &lt;semenzato@google.com&gt;
Cc: Gunho Lee &lt;gunho.lee@lge.com&gt;
Cc: Juneho Choi &lt;juno.choi@lge.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>zsmalloc: micro-optimize zs_object_copy()</title>
<updated>2015-04-15T23:35:22+00:00</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2015-04-15T23:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=495819ead5ad02174208994ca610852a7791a2f2'/>
<id>urn:sha1:495819ead5ad02174208994ca610852a7791a2f2</id>
<content type='text'>
A micro-optimization.  Avoid additional branching and reduce (a bit)
registry pressure (f.e.  s_off += size; d_off += size; may be calculated
twise: first for &gt;= PAGE_SIZE check and later for offset update in "else"
clause).

scripts/bloat-o-meter shows some improvement

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
function                          old     new   delta
zs_object_copy                    550     540     -10

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.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>
<entry>
<title>zsmalloc: remove synchronize_rcu from zs_compact()</title>
<updated>2015-04-15T23:35:21+00:00</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2015-04-15T23:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=1ec7cfb13acb8047ae5baafb43d2cd6b64ac85b9'/>
<id>urn:sha1:1ec7cfb13acb8047ae5baafb43d2cd6b64ac85b9</id>
<content type='text'>
Do not synchronize rcu in zs_compact(). Neither zsmalloc not
zram use rcu.

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.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>
<entry>
<title>mm/zsmalloc.c: fix comment for get_pages_per_zspage</title>
<updated>2015-04-15T23:35:21+00:00</updated>
<author>
<name>Yinghao Xie</name>
<email>yinghao.xie@samsung.com</email>
</author>
<published>2015-04-15T23:15:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=888fa374e625f3ee8f3cc2efebf52939d3bb6da1'/>
<id>urn:sha1:888fa374e625f3ee8f3cc2efebf52939d3bb6da1</id>
<content type='text'>
Signed-off-by: Yinghao Xie &lt;yinghao.xie@sumsung.com&gt;
Suggested-by: Minchan Kim &lt;minchan@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>
<entry>
<title>zsmalloc: zsmalloc documentation</title>
<updated>2015-04-15T23:35:21+00:00</updated>
<author>
<name>Minchan Kim</name>
<email>minchan@kernel.org</email>
</author>
<published>2015-04-15T23:15:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d02be50dba649b4246e0c1c4b7cb5d8a8d49de9a'/>
<id>urn:sha1:d02be50dba649b4246e0c1c4b7cb5d8a8d49de9a</id>
<content type='text'>
Create zsmalloc doc which explains design concept and stat information.

Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;
Cc: Juneho Choi &lt;juno.choi@lge.com&gt;
Cc: Gunho Lee &lt;gunho.lee@lge.com&gt;
Cc: Luigi Semenzato &lt;semenzato@google.com&gt;
Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;
Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;
Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;
Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;
Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.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>
</feed>
