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: 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>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>
Subject: [RFC PATCH v2 0/4] mm: reclaim zbud pages on migration and compaction
Date: Fri, 09 Aug 2013 12:22:16 +0200 [thread overview]
Message-ID: <1376043740-10576-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 try to address the problem by:
1. Adding a new form of reclaim of zbud pages.
2. Reclaiming zbud pages during migration and compaction.
3. Allocating zbud pages with __GFP_RECLAIMABLE flag.
This reclaim process is different than zbud_reclaim_page(). It acts more
like swapoff() by trying to unuse pages stored in zbud page and bring
them back to memory. The standard zbud_reclaim_page() on the other hand
tries to write them back.
One of patches introduces PageZbud() function which identifies zbud pages
my 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.
TODO-s:
1. Migrate zbud pages directly instead of reclaiming.
Changes since v1:
1. Rebased against v3.11-rc4-103-g6c2580c.
2. Remove rebalance_lists() to fix reinserting zbud page after zbud_free.
This function was added because similar code was present in
zbud_free/zbud_alloc/zbud_reclaim_page but it turns out that there
is no benefit in generalizing this code.
(suggested by Seth Jennings)
3. Remove BUG_ON checks for first/last chunks during free and reclaim.
(suggested by Seth Jennings)
4. Use page->_mapcount==-127 instead of new PG_zbud flag.
(suggested by Dave Hansen)
5. Fix invalid dereference of pointer to compact_control in page_alloc.c.
6. Fix lost return value in try_to_unuse() in swapfile.c (this fixes
hang when swapoff was interrupted e.g. by CTRL+C).
Best regards,
Krzysztof Kozlowski
Krzysztof Kozlowski (4):
zbud: use page ref counter for zbud pages
mm: split code for unusing swap entries from try_to_unuse
mm: use mapcount for identifying zbud pages
mm: reclaim zbud pages on migration and compaction
include/linux/mm.h | 23 +++
include/linux/swapfile.h | 2 +
include/linux/zbud.h | 11 +-
mm/compaction.c | 20 ++-
mm/internal.h | 1 +
mm/page_alloc.c | 6 +
mm/swapfile.c | 356 ++++++++++++++++++++++++----------------------
mm/zbud.c | 247 +++++++++++++++++++++++---------
mm/zswap.c | 57 +++++++-
9 files changed, 476 insertions(+), 247 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-09 10:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 10:22 Krzysztof Kozlowski [this message]
2013-08-09 10:22 ` [RFC PATCH v2 1/4] zbud: use page ref counter for zbud pages Krzysztof Kozlowski
2013-08-09 10:22 ` [RFC PATCH v2 2/4] mm: split code for unusing swap entries from try_to_unuse Krzysztof Kozlowski
2013-08-09 10:22 ` [RFC PATCH v2 3/4] mm: use mapcount for identifying zbud pages Krzysztof Kozlowski
2013-08-09 10:22 ` [RFC PATCH v2 4/4] mm: reclaim zbud pages on migration and compaction Krzysztof Kozlowski
2013-08-12 2:25 ` [RFC PATCH v2 0/4] " Minchan Kim
2013-08-12 3:16 ` Benjamin LaHaise
2013-08-12 3:49 ` Minchan Kim
2013-08-12 16:48 ` Dave Hansen
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=1376043740-10576-1-git-send-email-k.kozlowski@samsung.com \
--to=k.kozlowski@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.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=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