linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Bob Liu <bob.liu@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nitin Gupta <ngupta@vflare.org>, Minchan Kim <minchan@kernel.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Dan Magenheimer <dan.magenheimer@oracle.com>,
	Robert Jennings <rcj@linux.vnet.ibm.com>,
	Jenifer Hopper <jhopper@us.ibm.com>, Mel Gorman <mgorman@suse.de>,
	Johannes Weiner <jweiner@redhat.com>,
	Rik van Riel <riel@redhat.com>,
	Larry Woodman <lwoodman@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Dave Hansen <dave@sr71.net>, Joe Perches <joe@perches.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Cody P Schafer <cody@linux.vnet.ibm.com>,
	Hugh Dickens <hughd@google.com>,
	Paul Mackerras <paulus@samba.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org
Subject: Re: [PATCHv13 2/4] zbud: add to mm/
Date: Wed, 5 Jun 2013 08:55:08 -0500	[thread overview]
Message-ID: <20130605135508.GA25375@cerebellum> (raw)
In-Reply-To: <51AEDE10.4010108@oracle.com>

On Wed, Jun 05, 2013 at 02:43:28PM +0800, Bob Liu wrote:
> Hi Seth,
> 
> On 06/04/2013 04:33 AM, Seth Jennings wrote:
> > +	/* Couldn't find unbuddied zbud page, create new one */
> 
> How about moving zswap_is_full() to here.
> 
> if (zswap_is_full()) {
> 	/* Don't alloc any new page, try to reclaim and direct use the
> reclaimed page instead */

Yes, this is at the top of the list for improvements.

I have already started on this work and it isn't quite as simple as it seems.
The difficulty rises from the fact that, for now, zswap uses per-cpu
compression buffers which require preemption to be disabled. This prevents the
calling zbud_reclaim_page() in zbud_alloc() because the eviction handler for
the user may do something that can wait; an allocation with GFP_WAIT for
example.

So it's going to take some massaging in the zswap layer to get that to work.

It's very doable.  Just not in this patchset without causing a lot of code
thrash.

> }
> 
> > +	spin_unlock(&pool->lock);
> > +	page = alloc_page(gfp);
> > +	if (!page)
> > +		return -ENOMEM;
> > +	spin_lock(&pool->lock);
> > +	pool->pages_nr++;
> > +	zhdr = init_zbud_page(page);
> > +	bud = FIRST;
<snip>
> 
> It looks good for me except two things.
> One is about what the performance might be after the zswap pool is full.
> The other is still about the 20% limit of zswap pool size.

Yep, working on both of them.

Seth

--
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-06-05 13:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 20:33 [PATCHv13 0/4] zswap: compressed swap caching Seth Jennings
2013-06-03 20:33 ` [PATCHv13 1/4] debugfs: add get/set for atomic types Seth Jennings
2013-06-03 20:33 ` [PATCHv13 2/4] zbud: add to mm/ Seth Jennings
2013-06-05  6:43   ` Bob Liu
2013-06-05 13:55     ` Seth Jennings [this message]
2013-06-03 20:33 ` [PATCHv13 3/4] zswap: " Seth Jennings
2013-06-17  6:20   ` Bob Liu
2013-06-17 23:02     ` Andrew Morton
2013-06-18 11:50       ` Bob Liu
2013-06-18 12:29       ` Bob Liu
2013-06-19 14:09     ` Seth Jennings
2013-06-19 14:17       ` Bob Liu
2013-06-20  2:37     ` Seth Jennings
2013-06-20  9:42       ` Bob Liu
2013-06-20 14:23         ` Seth Jennings
2013-06-20 14:35           ` Bob Liu
2013-06-21 15:20             ` Dan Magenheimer
2013-06-21 18:33               ` Konrad Rzeszutek Wilk
2013-06-03 20:33 ` [PATCHv13 4/4] zswap: add documentation Seth Jennings
2013-06-13 12:34 ` [PATCHv13 0/4] zswap: compressed swap caching Bob Liu
2013-06-13 19:06   ` Seth Jennings

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=20130605135508.GA25375@cerebellum \
    --to=sjenning@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=bob.liu@oracle.com \
    --cc=cody@linux.vnet.ibm.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=dave@sr71.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jhopper@us.ibm.com \
    --cc=joe@perches.com \
    --cc=jweiner@redhat.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lwoodman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=paulus@samba.org \
    --cc=rcj@linux.vnet.ibm.com \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).