* [PATCH] zcache fix for 3.3-rc1.
@ 2012-01-23 21:52 Konrad Rzeszutek Wilk
2012-01-23 21:52 ` [PATCH] zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention Konrad Rzeszutek Wilk
2012-01-23 22:11 ` [PATCH] zcache fix for 3.3-rc1 Greg KH
0 siblings, 2 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-23 21:52 UTC (permalink / raw)
To: gregkh, linux-kernel, devel; +Cc: dave, cascardo, sjenning
Hey Greg,
I posted this patch some time ago [https://lkml.org/lkml/2012/1/13/253]
but I am not seeing it in you tree.
Was wondering if you could stick this patch in your tree? It fixes
a performance regressions which is quite noticable in small memory systems
where a 'swapoff' ends up taking more than it should.
Thanks!
Dan Magenheimer (1):
zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.
drivers/staging/zcache/zcache-main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention.
2012-01-23 21:52 [PATCH] zcache fix for 3.3-rc1 Konrad Rzeszutek Wilk
@ 2012-01-23 21:52 ` Konrad Rzeszutek Wilk
2012-01-23 22:11 ` [PATCH] zcache fix for 3.3-rc1 Greg KH
1 sibling, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-23 21:52 UTC (permalink / raw)
To: gregkh, linux-kernel, devel
Cc: dave, cascardo, sjenning, Dan Magenheimer, Konrad Rzeszutek Wilk
From: Dan Magenheimer <dan.magenheimer@oracle.com>
SWIZ_BITS > 8 results in a much larger number of "tmem_obj"
allocations, likely one per page-placed-in-frontswap. The
tmem_obj is not huge (roughly 100 bytes), but it is large
enough to add a not-insignificant memory overhead to zcache.
The SWIZ_BITS=8 will get roughly the same lock contention
without the space wastage.
The effect of SWIZ_BITS can be thought of as "2^SWIZ_BITS is
the number of unique oids that be generated" (This concept is
limited to frontswap's use of tmem).
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/staging/zcache/zcache-main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c
index 642840c..9c011b7 100644
--- a/drivers/staging/zcache/zcache-main.c
+++ b/drivers/staging/zcache/zcache-main.c
@@ -1782,9 +1782,9 @@ static int zcache_frontswap_poolid = -1;
* Swizzling increases objects per swaptype, increasing tmem concurrency
* for heavy swaploads. Later, larger nr_cpus -> larger SWIZ_BITS
* Setting SWIZ_BITS to 27 basically reconstructs the swap entry from
- * frontswap_get_page()
+ * frontswap_get_page(), but has side-effects. Hence using 8.
*/
-#define SWIZ_BITS 27
+#define SWIZ_BITS 8
#define SWIZ_MASK ((1 << SWIZ_BITS) - 1)
#define _oswiz(_type, _ind) ((_type << SWIZ_BITS) | (_ind & SWIZ_MASK))
#define iswiz(_ind) (_ind >> SWIZ_BITS)
--
1.7.7.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] zcache fix for 3.3-rc1.
2012-01-23 21:52 [PATCH] zcache fix for 3.3-rc1 Konrad Rzeszutek Wilk
2012-01-23 21:52 ` [PATCH] zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention Konrad Rzeszutek Wilk
@ 2012-01-23 22:11 ` Greg KH
2012-01-23 22:22 ` Konrad Rzeszutek Wilk
1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2012-01-23 22:11 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: linux-kernel, devel, dave, cascardo, sjenning
On Mon, Jan 23, 2012 at 04:52:19PM -0500, Konrad Rzeszutek Wilk wrote:
> Hey Greg,
>
> I posted this patch some time ago [https://lkml.org/lkml/2012/1/13/253]
> but I am not seeing it in you tree.
Did you copy me on it? I don't see it anywhere in my to-apply queues.
> Was wondering if you could stick this patch in your tree? It fixes
> a performance regressions which is quite noticable in small memory systems
> where a 'swapoff' ends up taking more than it should.
So this is needed for 3.3? How about older kernels? 3.2? 3.0?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] zcache fix for 3.3-rc1.
2012-01-23 22:11 ` [PATCH] zcache fix for 3.3-rc1 Greg KH
@ 2012-01-23 22:22 ` Konrad Rzeszutek Wilk
2012-01-23 22:35 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-23 22:22 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, devel, dave, cascardo, sjenning
On Mon, Jan 23, 2012 at 02:11:55PM -0800, Greg KH wrote:
> On Mon, Jan 23, 2012 at 04:52:19PM -0500, Konrad Rzeszutek Wilk wrote:
> > Hey Greg,
> >
> > I posted this patch some time ago [https://lkml.org/lkml/2012/1/13/253]
> > but I am not seeing it in you tree.
>
> Did you copy me on it? I don't see it anywhere in my to-apply queues.
Ugh, I did not - I seemed to have forgotten to CC you and had assumed you
would be omnipresent and would magically pick it up. Sorry about that mishap.
>
> > Was wondering if you could stick this patch in your tree? It fixes
> > a performance regressions which is quite noticable in small memory systems
> > where a 'swapoff' ends up taking more than it should.
>
> So this is needed for 3.3? How about older kernels? 3.2? 3.0?
That would be splendid if you could stick it on the stable tree :-)
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] zcache fix for 3.3-rc1.
2012-01-23 22:22 ` Konrad Rzeszutek Wilk
@ 2012-01-23 22:35 ` Greg KH
2012-01-23 22:40 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2012-01-23 22:35 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: linux-kernel, devel, dave, cascardo, sjenning
On Mon, Jan 23, 2012 at 05:22:38PM -0500, Konrad Rzeszutek Wilk wrote:
> On Mon, Jan 23, 2012 at 02:11:55PM -0800, Greg KH wrote:
> > On Mon, Jan 23, 2012 at 04:52:19PM -0500, Konrad Rzeszutek Wilk wrote:
> > > Hey Greg,
> > >
> > > I posted this patch some time ago [https://lkml.org/lkml/2012/1/13/253]
> > > but I am not seeing it in you tree.
> >
> > Did you copy me on it? I don't see it anywhere in my to-apply queues.
>
> Ugh, I did not - I seemed to have forgotten to CC you and had assumed you
> would be omnipresent and would magically pick it up. Sorry about that mishap.
Hm, I must be slipping, I should have caught that :)
> > > Was wondering if you could stick this patch in your tree? It fixes
> > > a performance regressions which is quite noticable in small memory systems
> > > where a 'swapoff' ends up taking more than it should.
> >
> > So this is needed for 3.3? How about older kernels? 3.2? 3.0?
>
> That would be splendid if you could stick it on the stable tree :-)
Which one(s)?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] zcache fix for 3.3-rc1.
2012-01-23 22:35 ` Greg KH
@ 2012-01-23 22:40 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-23 22:40 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, devel, dave, cascardo, sjenning
On Mon, Jan 23, 2012 at 02:35:08PM -0800, Greg KH wrote:
> On Mon, Jan 23, 2012 at 05:22:38PM -0500, Konrad Rzeszutek Wilk wrote:
> > On Mon, Jan 23, 2012 at 02:11:55PM -0800, Greg KH wrote:
> > > On Mon, Jan 23, 2012 at 04:52:19PM -0500, Konrad Rzeszutek Wilk wrote:
> > > > Hey Greg,
> > > >
> > > > I posted this patch some time ago [https://lkml.org/lkml/2012/1/13/253]
> > > > but I am not seeing it in you tree.
> > >
> > > Did you copy me on it? I don't see it anywhere in my to-apply queues.
> >
> > Ugh, I did not - I seemed to have forgotten to CC you and had assumed you
> > would be omnipresent and would magically pick it up. Sorry about that mishap.
>
> Hm, I must be slipping, I should have caught that :)
Tsk tsk .. :-)
>
> > > > Was wondering if you could stick this patch in your tree? It fixes
> > > > a performance regressions which is quite noticable in small memory systems
> > > > where a 'swapoff' ends up taking more than it should.
> > >
> > > So this is needed for 3.3? How about older kernels? 3.2? 3.0?
> >
> > That would be splendid if you could stick it on the stable tree :-)
>
> Which one(s)?
3.2 please.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-23 22:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 21:52 [PATCH] zcache fix for 3.3-rc1 Konrad Rzeszutek Wilk
2012-01-23 21:52 ` [PATCH] zcache: Set SWIZ_BITS to 8 to reduce tmem bucket lock contention Konrad Rzeszutek Wilk
2012-01-23 22:11 ` [PATCH] zcache fix for 3.3-rc1 Greg KH
2012-01-23 22:22 ` Konrad Rzeszutek Wilk
2012-01-23 22:35 ` Greg KH
2012-01-23 22:40 ` Konrad Rzeszutek Wilk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox