From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>,
Bob Liu <bob.liu@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Dave Hansen <dave.hansen@intel.com>,
Minchan Kim <minchan@kernel.org>
Subject: Re: [PATCH v2 0/5] mm: migrate zbud pages
Date: Thu, 3 Oct 2013 10:39:46 -0500 [thread overview]
Message-ID: <20131003153946.GA4695@medulla.variantweb.net> (raw)
In-Reply-To: <1380806660.3392.30.camel@AMDC1943>
On Thu, Oct 03, 2013 at 03:24:20PM +0200, Krzysztof Kozlowski wrote:
> On wto, 2013-10-01 at 16:04 -0500, Seth Jennings wrote:
> > Yes, it is very similar. I'm beginning to like aspects of this patch
> > more as I explore this issue more.
> >
> > At first, I balked at the idea of yet another abstraction layer, but it
> > is very hard to avoid unless you want to completely collapse zswap and
> > zbud into one another and dissolve the layering. Then you could do a
> > direct swap_offset -> address mapping.
>
> After discussion with Tomasz Stanislawski we had an idea of merging the
> trees (zswap's rb and zbud's radix added in these patches) into one tree
> in zbud layer.
I have also been converging on this idea. It took me a while because I
just wouldn't entertain the idea of there being no translation at the
zswap layer. But I'm starting to think this is the best way.
It does create more work for any new allocator as a lot of the
complexity has been shifted to that layer. However, it is the only
layer that it makes since to do this management (reclaim/migration).
>
> This would simplify the design (if migration was added, of course).
>
> The idea looks like:
> 1. Get rid of the red-black tree in zswap.
> 2. Add radix tree to zbud (or use radix tree from address space).
> - Use offset (from swp_entry) as index to radix tree.
> - zbud page (struct page) stored in tree.
> 4. With both buddies filled one zbud page would be put in radix tree
> twice.
> 5. zbud API would look like:
> zbud_alloc(struct zbud_pool *pool, int size, gfp_t gfp, pgoff_t offset)
> zbud_free(struct zbud_pool *pool, pgoff_t offset)
> zbud_map(struct zbud_pool *pool, pgoff_t offset)
> etc.
>
> 6. zbud_map/unmap() would be a little more complex than now as it would
> took over some code from zswap (finding offset in tree).
>
> 7. The radix tree would be used for:
> - finding entry by offset (for zswap_frontswap_load() and others),
> - migration.
>
> 8. In case of migration colliding with zbud_map/unmap() the locking
> could be limited (in comparison to my patch). Calling zbud_map() would
> mark a page "dirty". During migration if page was "dirtied" then
> migration would fail with EAGAIN. Of course migration won't start if
> zbud buddy was mapped.
>
>
> What do you think about this?
I like it. We just need to keep reclaim in mind as well as migration.
i.e. need to design with the knowledge that zbud pages will be on the
LRU lists.
Thanks for thinking about this!
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>
prev parent reply other threads:[~2013-10-03 15:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 8:58 [PATCH v2 0/5] mm: migrate zbud pages Krzysztof Kozlowski
2013-09-11 8:59 ` [PATCH v2 1/5] zbud: use page ref counter for " Krzysztof Kozlowski
2013-09-11 8:59 ` [PATCH v2 2/5] zbud: make freechunks a block local variable Krzysztof Kozlowski
2013-09-11 8:59 ` [PATCH v2 3/5] mm: use mapcount for identifying zbud pages Krzysztof Kozlowski
2013-09-11 8:59 ` [PATCH v2 4/5] mm: use indirect zbud handle and radix tree Krzysztof Kozlowski
2013-09-11 8:59 ` [PATCH v2 5/5] mm: migrate zbud pages Krzysztof Kozlowski
2013-09-17 6:59 ` [PATCH v2 0/5] " Bob Liu
2013-09-23 17:19 ` Seth Jennings
2013-09-23 22:07 ` Seth Jennings
2013-09-24 9:20 ` Krzysztof Kozlowski
2013-09-25 4:28 ` Bob Liu
2013-09-25 17:09 ` Tomasz Stanislawski
2013-09-25 21:57 ` Seth Jennings
2013-09-27 10:16 ` Tomasz Stanislawski
2013-09-27 22:00 ` Seth Jennings
2013-09-28 2:43 ` Bob Liu
2013-09-30 8:28 ` Krzysztof Kozlowski
2013-10-01 21:04 ` Seth Jennings
2013-10-03 13:24 ` Krzysztof Kozlowski
2013-10-03 15:39 ` Seth Jennings [this message]
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=20131003153946.GA4695@medulla.variantweb.net \
--to=sjenning@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.com \
--cc=bob.liu@oracle.com \
--cc=dave.hansen@intel.com \
--cc=k.kozlowski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=t.stanislaws@samsung.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).