linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>, Dave Hansen <dave@sr71.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nitin Gupta <ngupta@vflare.org>, Minchan Kim <minchan@kernel.org>,
	Konrad Wilk <konrad.wilk@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>,
	Joe Perches <joe@perches.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Cody P Schafer <cody@linux.vnet.ibm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	devel@driverdev.osuosl.org
Subject: RE: [PATCHv7 4/8] zswap: add to mm/
Date: Thu, 7 Mar 2013 15:11:06 -0800 (PST)	[thread overview]
Message-ID: <cd5fb4ff-094c-430c-94fb-a7416de0d332@default> (raw)
In-Reply-To: <513904F2.50607@linux.vnet.ibm.com>

> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
> To: Dave Hansen
> Subject: Re: [PATCHv7 4/8] zswap: add to mm/
> 
> On 03/07/2013 01:00 PM, Dave Hansen wrote:
> > On 03/06/2013 07:52 AM, Seth Jennings wrote:
> > ...
> >> +**********************************/
> >> +/* attempts to compress and store an single page */
> >> +static int zswap_frontswap_store(unsigned type, pgoff_t offset,
> >> +				struct page *page)
> >> +{
> > ...
> >> +	/* store */
> >> +	handle = zs_malloc(tree->pool, dlen,
> >> +		__GFP_NORETRY | __GFP_HIGHMEM | __GFP_NOMEMALLOC |
> >> +			__GFP_NOWARN);
> >> +	if (!handle) {
> >> +		zswap_reject_zsmalloc_fail++;
> >> +		ret = -ENOMEM;
> >> +		goto putcpu;
> >> +	}
> >> +
> >
> > I think there needs to at least be some strong comments in here about
> > why you're doing this kind of allocation.  From some IRC discussion, it
> > seems like you found some pathological case where zswap wasn't helping
> > make reclaim progress and ended up draining the reserve pools and you
> > did this to avoid draining the reserve pools.
> 
> I'm currently doing some tests with fewer zsmalloc class sizes and
> removing __GFP_NOMEMALLOC to see the effect.

Zswap/zcache/frontswap are greedy, at times almost violently so.
Using emergency reserves seems like a sure way to OOM depending
on the workload (and luck).

I did some class size experiments too without seeing much advantage.
But without a range of "representative" data streams, it's very
hard to claim any experiment is successful.

I've got some ideas on combining the best of zsmalloc and zbud
but they are still a little raw.

> > I think the lack of progress doing reclaim is really the root cause you
> > should be going after here instead of just working around the symptom.

Dave, agreed.  See http://marc.info/?l=linux-mm&m=136147977602561&w=2 
and the PAGEFRAME EVACUATION subsection of
http://marc.info/?l=linux-mm&m=136200745931284&w=2

--
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>

  parent reply	other threads:[~2013-03-07 23:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 15:52 [PATCHv7 0/8] zswap: compressed swap caching Seth Jennings
2013-03-06 15:52 ` [PATCHv7 1/8] zsmalloc: add to mm/ Seth Jennings
2013-03-16 14:09   ` Bob Liu
2013-03-06 15:52 ` [PATCHv7 2/8] zsmalloc: add documentation Seth Jennings
2013-03-06 15:52 ` [PATCHv7 3/8] debugfs: add get/set for atomic types Seth Jennings
2013-03-06 15:52 ` [PATCHv7 4/8] zswap: add to mm/ Seth Jennings
2013-03-07 19:00   ` Dave Hansen
2013-03-07 21:21     ` Seth Jennings
2013-03-07 21:24       ` Dave Hansen
2013-03-07 23:11       ` Dan Magenheimer [this message]
2013-03-06 15:52 ` [PATCHv7 5/8] mm: break up swap_writepage() for frontswap backends Seth Jennings
2013-03-06 15:52 ` [PATCHv7 6/8] mm: allow for outstanding swap writeback accounting Seth Jennings
2013-03-06 15:52 ` [PATCHv7 7/8] zswap: add swap page writeback support Seth Jennings
2013-03-06 15:52 ` [PATCHv7 8/8] zswap: add documentation 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=cd5fb4ff-094c-430c-94fb-a7416de0d332@default \
    --to=dan.magenheimer@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=cody@linux.vnet.ibm.com \
    --cc=dave@sr71.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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=rcj@linux.vnet.ibm.com \
    --cc=riel@redhat.com \
    --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 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).