From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Cc: Bob Liu <bob.liu@oracle.com>, 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>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>
Subject: [RFC PATCH 0/4] mm: migrate zbud pages
Date: Fri, 30 Aug 2013 10:42:52 +0200 [thread overview]
Message-ID: <1377852176-30970-1-git-send-email-k.kozlowski@samsung.com> (raw)
Hi,
Currently zbud pages are not movable and they cannot be allocated from CMA
region. These patches add migration of zbud pages.
The zbud migration code utilizes mapping so many exceptions to migrate
code was added. It can be replaced for example with pin page
control subsystem:
http://article.gmane.org/gmane.linux.kernel.mm/105308
In such case the zbud migration code (zbud_migrate_page()) can be safely
re-used.
Patch "[PATCH 3/4] mm: use indirect zbud handle and radix tree" changes zbud
handle to support migration. Now the handle is an index in radix tree and
zbud_map() maps it to proper virtual address. This exposes race conditions,
some of them are discussed already here:
http://article.gmane.org/gmane.linux.kernel.mm/105988
Races are fixed by adding internal map count for each zbud handle.
The map count is increased on zbud_map() call.
Some races between writeback and invalidate still exist. In such case a message
can be seen in logs:
zbud: error: could not lookup handle 13810 in tree
Patches from discussion above may resolve it.
I have considered using "pgoff_t offset" as handle but it prevented storing
duplicate pages in zswap.
Patch "[PATCH 2/4] mm: use mapcount for identifying zbud pages" introduces
PageZbud() function which identifies zbud pages by page->_mapcount.
Dave Hansen proposed aliasing PG_zbud=PG_slab but in such case patch
would be more intrusive.
Any ideas for a better solution are welcome.
This patch set is based on v3.11-rc7-30-g41615e8.
This is continuation of my previous work: reclaiming zbud pages on migration
and compaction. However it current solution is completely different so I am not
attaching previous changelog.
Previous patches can be found here:
* [RFC PATCH v2 0/4] mm: reclaim zbud pages on migration and compaction
http://article.gmane.org/gmane.linux.kernel.mm/105153
* [RFC PATCH 0/4] mm: reclaim zbud pages on migration and compaction
http://article.gmane.org/gmane.linux.kernel.mm/104801
One patch from previous work is re-used along with minor changes:
"[PATCH 1/4] zbud: use page ref counter for zbud pages"
* Add missing spin_unlock in zbud_reclaim_page().
* Decrease pool->pages_nr in zbud_free(), not when putting page. This also
removes the need of holding lock while call to put_zbud_page().
Best regards,
Krzysztof Kozlowski
Krzysztof Kozlowski (4):
zbud: use page ref counter for zbud pages
mm: use mapcount for identifying zbud pages
mm: use indirect zbud handle and radix tree
mm: migrate zbud pages
include/linux/mm.h | 23 +++
include/linux/zbud.h | 3 +-
mm/compaction.c | 7 +
mm/migrate.c | 17 +-
mm/zbud.c | 552 +++++++++++++++++++++++++++++++++++++++++---------
mm/zswap.c | 28 ++-
6 files changed, 525 insertions(+), 105 deletions(-)
--
1.7.9.5
--
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>
next reply other threads:[~2013-08-30 8:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 8:42 Krzysztof Kozlowski [this message]
2013-08-30 8:42 ` [RFC PATCH 1/4] zbud: use page ref counter for " Krzysztof Kozlowski
2013-09-08 9:04 ` Bob Liu
2013-09-09 6:14 ` Krzysztof Kozlowski
2013-09-09 19:47 ` Seth Jennings
2013-09-10 7:16 ` Krzysztof Kozlowski
2013-08-30 8:42 ` [RFC PATCH 2/4] mm: use mapcount for identifying " Krzysztof Kozlowski
2013-09-09 19:53 ` Seth Jennings
2013-08-30 8:42 ` [RFC PATCH 3/4] mm: use indirect zbud handle and radix tree Krzysztof Kozlowski
2013-08-30 8:42 ` [RFC PATCH 4/4] mm: migrate zbud pages Krzysztof Kozlowski
2013-09-06 17:30 ` [RFC PATCH 0/4] " Seth Jennings
2013-09-09 6:55 ` Krzysztof Kozlowski
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=1377852176-30970-1-git-send-email-k.kozlowski@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.com \
--cc=bob.liu@oracle.com \
--cc=dave.hansen@intel.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=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