<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/zcache, branch v3.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/staging/zcache?h=v3.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/staging/zcache?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-09-05T19:06:48Z</updated>
<entry>
<title>staging: zcache: fix cleancache race condition with shrinker</title>
<updated>2012-09-05T19:06:48Z</updated>
<author>
<name>Seth Jennings</name>
<email>sjenning@linux.vnet.ibm.com</email>
</author>
<published>2012-08-29T21:58:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d7d9798ad5c97ee4e911dd070dc12dc5ae55bd0'/>
<id>urn:sha1:6d7d9798ad5c97ee4e911dd070dc12dc5ae55bd0</id>
<content type='text'>
This patch fixes a race condition that results in memory
corruption when using cleancache.

The race exists between the zcache shrinker handler,
shrink_zcache_memory() and cleancache_get_page().

In most cases, the shrinker will both evict a zbpg
from its buddy list and flush it from tmem before a
cleancache_get_page() occurs on that page. A subsequent
cleancache_get_page() will fail in the tmem layer.

In the rare case that two occur together and the
cleancache_get_page() path gets through the tmem
layer before the shrinker path can flush tmem,
zbud_decompress() does a check to see if the zbpg is a
"zombie", i.e. not on a buddy list, which means the shrinker
is in the process of reclaiming it. If the zbpg is a zombie,
zbud_decompress() returns -EINVAL.

However, this return code is being ignored by the caller,
zcache_pampd_get_data_and_free(), which results in the
caller of cleancache_get_page() thinking that the page has
been properly retrieved when it has not.

This patch modifies zcache_pampd_get_data_and_free() to
convey the failure up the stack so that the caller of
cleancache_get_page() knows the page retrieval failed.

This needs to be applied to stable trees as well.
zcache-main.c was named zcache.c before v3.1, so
I'm not sure how you want to handle trees earlier
than that.

Signed-off-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Reviewed-by: Minchan Kim &lt;minchan@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zsmalloc: add mapping modes</title>
<updated>2012-07-09T18:35:00Z</updated>
<author>
<name>Seth Jennings</name>
<email>sjenning@linux.vnet.ibm.com</email>
</author>
<published>2012-07-02T21:15:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b74185108668ef966e663878adbad65e03bfcb43'/>
<id>urn:sha1:b74185108668ef966e663878adbad65e03bfcb43</id>
<content type='text'>
This patch improves mapping performance in zsmalloc by getting
usage information from the user in the form of a "mapping mode"
and using it to avoid unnecessary copying for objects that span
pages.

Signed-off-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: cleanup the code between tmem_obj_init and tmem_obj_find</title>
<updated>2012-07-09T18:31:16Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:52:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c666e636ac9915f33fe175c75bc01ab994e5afa6'/>
<id>urn:sha1:c666e636ac9915f33fe175c75bc01ab994e5afa6</id>
<content type='text'>
tmem_obj_find and insertion tmem-obj have the some logic, we can integrate
the code

Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: introduce get_zcache_client</title>
<updated>2012-07-09T18:31:16Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=08b0b50048cea27437e06a5544b4ecc443a32f7d'/>
<id>urn:sha1:08b0b50048cea27437e06a5544b4ecc443a32f7d</id>
<content type='text'>
Introduce get_zcache_client to remove the common code

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: cleanup zcache_do_preload and zcache_put_page</title>
<updated>2012-07-09T18:31:16Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b71f3bcc5ab5e76a22d7ad82b3795602fcf0e0af'/>
<id>urn:sha1:b71f3bcc5ab5e76a22d7ad82b3795602fcf0e0af</id>
<content type='text'>
Cleanup the code for zcache_do_preload and zcache_put_page

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: optimize zcache_do_preload</title>
<updated>2012-07-09T18:31:16Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79c0d92c5b6175c1462fbe38bf44180f325aa478'/>
<id>urn:sha1:79c0d92c5b6175c1462fbe38bf44180f325aa478</id>
<content type='text'>
zcache_do_preload is called in zcache_put_page where IRQ is disabled, so, need
not care preempt

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: cleanup zbud_init</title>
<updated>2012-07-09T18:31:16Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dc2f9a5d3d0a7a6c0e1a891c70ed2171869dd78d'/>
<id>urn:sha1:dc2f9a5d3d0a7a6c0e1a891c70ed2171869dd78d</id>
<content type='text'>
Need not set global parameters to 0

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: mark zbud_init/zcache_comp_init as __init</title>
<updated>2012-07-09T18:31:15Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2ad0f81c588a7a4e0fb685cbd2246b4907401784'/>
<id>urn:sha1:2ad0f81c588a7a4e0fb685cbd2246b4907401784</id>
<content type='text'>
These functions are called only when system is initializing, so mark __init
for them to free memory

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: remove unnecessary config option dependence</title>
<updated>2012-07-09T18:31:15Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f64d94f9f7536842a120f6eef4cfd4cfcd516f5e'/>
<id>urn:sha1:f64d94f9f7536842a120f6eef4cfd4cfcd516f5e</id>
<content type='text'>
zcache is enabled only if one of CONFIG_CLEANCACHE and CONFIG_FRONTSWAP is
enabled, see the Kconfig:
	depends on (CLEANCACHE || FRONTSWAP) &amp;&amp; CRYPTO=y &amp;&amp; X86
So, we can remove the check in the source code

Acked-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: zcache: fix a compile warning</title>
<updated>2012-07-09T18:31:15Z</updated>
<author>
<name>Xiao Guangrong</name>
<email>xiaoguangrong@linux.vnet.ibm.com</email>
</author>
<published>2012-06-26T08:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a16554474f772ea857bf193608231a735e01cccc'/>
<id>urn:sha1:a16554474f772ea857bf193608231a735e01cccc</id>
<content type='text'>
Fix:

drivers/staging/zcache/zcache-main.c: In function ‘zcache_comp_op’:
drivers/staging/zcache/zcache-main.c:112:2: warning: ‘ret’ may be used uninitial

Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@linux.vnet.ibm.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
