All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, ngupta@vflare.org,
	Konrad Wilk <konrad.wilk@oracle.com>,
	sjenning@linux.vnet.ibm.com, minchan@kernel.org
Subject: RE: [PATCH 2/2] staging: zcache: optional support for zsmalloc as alternate allocator
Date: Fri, 25 Jan 2013 12:47:44 -0800 (PST)	[thread overview]
Message-ID: <54da1c87-93f9-4643-8f71-597c1ff30e33@default> (raw)
In-Reply-To: <20130125192617.GA26634@kroah.com>

> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Subject: Re: [PATCH 2/2] staging: zcache: optional support for zsmalloc as alternate allocator
> 
> On Wed, Jan 23, 2013 at 01:46:31PM -0800, Dan Magenheimer wrote:
> > "New" zcache uses zbud for all sub-page allocation which is more flexible but
> > results in lower density.  "Old" zcache supported zsmalloc for frontswap
> > pages.  Add zsmalloc to "new" zcache as a compile-time and run-time option
> > for backwards compatibility in case any users wants to use zcache with
> > highest possible density.
> >
> > Note that most of the zsmalloc stats in old zcache are not included here
> > because old zcache used sysfs and new zcache has converted to debugfs.
> > These stats may be added later.
> >
> > Note also that ramster is incompatible with zsmalloc as the two use
> > the least significant bits in a pampd differently.
> >
> > Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
> > ---
> >  drivers/staging/zcache/Kconfig       |   11 ++
> >  drivers/staging/zcache/zcache-main.c |  210 ++++++++++++++++++++++++++++++++--
> >  drivers/staging/zcache/zcache.h      |    3 +
> >  3 files changed, 215 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/zcache/Kconfig b/drivers/staging/zcache/Kconfig
> > index c1dbd04..116f8d5 100644
> > --- a/drivers/staging/zcache/Kconfig
> > +++ b/drivers/staging/zcache/Kconfig
> > @@ -10,6 +10,17 @@ config ZCACHE
> >  	  memory to store clean page cache pages and swap in RAM,
> >  	  providing a noticeable reduction in disk I/O.
> >
> > +config ZCACHE_ZSMALLOC
> > +	bool "Allow use of zsmalloc allocator for compression of swap pages"
> > +	depends on ZSMALLOC=y && !RAMSTER
> > +	default n
> > +	help
> > +	  Zsmalloc is a much more efficient allocator for compresssed
> > +	  pages but currently has some design deficiencies in that it
> > +	  does not support reclaim nor compaction.  Select this if
> > +	  you are certain your workload will fit or has mostly short
> > +	  running processes.  Zsmalloc is incompatible with RAMster.
> 
> How can anyone be "certain"?
> 
> 
> > --- a/drivers/staging/zcache/zcache-main.c
> > +++ b/drivers/staging/zcache/zcache-main.c
> > @@ -26,6 +26,12 @@
> >  #include <linux/cleancache.h>
> >  #include <linux/frontswap.h>
> >  #include "tmem.h"
> > +#ifdef CONFIG_ZCACHE_ZSMALLOC
> > +#include "../zsmalloc/zsmalloc.h"
> 
> Don't #ifdef .h files in .c files.
> 
> > +static int zsmalloc_enabled;
> > +#else
> > +#define zsmalloc_enabled 0
> > +#endif
> 
> That should have been your only ifdef in this .c file, all of the ones
> you have after this should not be needed, so I can't take this patch,
> sorry.

Yep.  Sorry, I was just trying to refresh this from when
I posted the proof-of-concept last summer.  I should have
spent more time cleaning it up.  Will be away for
a few days so will try to repost in a week or two,
hopefully not too late for this cycle.

Sorry for the noise.
Dan

WARNING: multiple messages have this Message-ID (diff)
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, ngupta@vflare.org,
	Konrad Wilk <konrad.wilk@oracle.com>,
	sjenning@linux.vnet.ibm.com, minchan@kernel.org
Subject: RE: [PATCH 2/2] staging: zcache: optional support for zsmalloc as alternate allocator
Date: Fri, 25 Jan 2013 12:47:44 -0800 (PST)	[thread overview]
Message-ID: <54da1c87-93f9-4643-8f71-597c1ff30e33@default> (raw)
In-Reply-To: <20130125192617.GA26634@kroah.com>

> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Subject: Re: [PATCH 2/2] staging: zcache: optional support for zsmalloc as alternate allocator
> 
> On Wed, Jan 23, 2013 at 01:46:31PM -0800, Dan Magenheimer wrote:
> > "New" zcache uses zbud for all sub-page allocation which is more flexible but
> > results in lower density.  "Old" zcache supported zsmalloc for frontswap
> > pages.  Add zsmalloc to "new" zcache as a compile-time and run-time option
> > for backwards compatibility in case any users wants to use zcache with
> > highest possible density.
> >
> > Note that most of the zsmalloc stats in old zcache are not included here
> > because old zcache used sysfs and new zcache has converted to debugfs.
> > These stats may be added later.
> >
> > Note also that ramster is incompatible with zsmalloc as the two use
> > the least significant bits in a pampd differently.
> >
> > Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
> > ---
> >  drivers/staging/zcache/Kconfig       |   11 ++
> >  drivers/staging/zcache/zcache-main.c |  210 ++++++++++++++++++++++++++++++++--
> >  drivers/staging/zcache/zcache.h      |    3 +
> >  3 files changed, 215 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/zcache/Kconfig b/drivers/staging/zcache/Kconfig
> > index c1dbd04..116f8d5 100644
> > --- a/drivers/staging/zcache/Kconfig
> > +++ b/drivers/staging/zcache/Kconfig
> > @@ -10,6 +10,17 @@ config ZCACHE
> >  	  memory to store clean page cache pages and swap in RAM,
> >  	  providing a noticeable reduction in disk I/O.
> >
> > +config ZCACHE_ZSMALLOC
> > +	bool "Allow use of zsmalloc allocator for compression of swap pages"
> > +	depends on ZSMALLOC=y && !RAMSTER
> > +	default n
> > +	help
> > +	  Zsmalloc is a much more efficient allocator for compresssed
> > +	  pages but currently has some design deficiencies in that it
> > +	  does not support reclaim nor compaction.  Select this if
> > +	  you are certain your workload will fit or has mostly short
> > +	  running processes.  Zsmalloc is incompatible with RAMster.
> 
> How can anyone be "certain"?
> 
> 
> > --- a/drivers/staging/zcache/zcache-main.c
> > +++ b/drivers/staging/zcache/zcache-main.c
> > @@ -26,6 +26,12 @@
> >  #include <linux/cleancache.h>
> >  #include <linux/frontswap.h>
> >  #include "tmem.h"
> > +#ifdef CONFIG_ZCACHE_ZSMALLOC
> > +#include "../zsmalloc/zsmalloc.h"
> 
> Don't #ifdef .h files in .c files.
> 
> > +static int zsmalloc_enabled;
> > +#else
> > +#define zsmalloc_enabled 0
> > +#endif
> 
> That should have been your only ifdef in this .c file, all of the ones
> you have after this should not be needed, so I can't take this patch,
> sorry.

Yep.  Sorry, I was just trying to refresh this from when
I posted the proof-of-concept last summer.  I should have
spent more time cleaning it up.  Will be away for
a few days so will try to repost in a week or two,
hopefully not too late for this cycle.

Sorry for the noise.
Dan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-01-25 20:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-23 21:46 [PATCH 1/2] staging: zcache: fix ppc64 and other arches where PAGE_SIZE!=4K Dan Magenheimer
2013-01-23 21:46 ` Dan Magenheimer
2013-01-23 21:46 ` [PATCH 2/2] staging: zcache: optional support for zsmalloc as alternate allocator Dan Magenheimer
2013-01-23 21:46   ` Dan Magenheimer
2013-01-25 19:26   ` Greg KH
2013-01-25 19:26     ` Greg KH
2013-01-25 20:47     ` Dan Magenheimer [this message]
2013-01-25 20:47       ` Dan Magenheimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54da1c87-93f9-4643-8f71-597c1ff30e33@default \
    --to=dan.magenheimer@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sjenning@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.