From: Johannes Weiner <jweiner@redhat.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: aarcange@redhat.com, linux-mm@kvack.org,
akpm@linux-foundation.org, hannes@cmpxchg.org, riel@redhat.com
Subject: Re: [RFC PATCH] mm: thp: make swap configurable
Date: Wed, 12 Oct 2011 05:59:53 -0400 [thread overview]
Message-ID: <20111012095953.GB3160@redhat.com> (raw)
In-Reply-To: <1318255086-7393-1-git-send-email-lliubbo@gmail.com>
On Mon, Oct 10, 2011 at 09:58:06PM +0800, Bob Liu wrote:
> Currently THP do swap by default, user has no control of it.
> But some applications are swap sensitive, this patch add a boot param
> and sys file to make it configurable.
What's special about THP compared to regular-sized anon pages?
> @@ -155,10 +156,11 @@ int add_to_swap(struct page *page)
> return 0;
>
> if (unlikely(PageTransHuge(page)))
> - if (unlikely(split_huge_page(page))) {
> - swapcache_free(entry, NULL);
> - return 0;
> - }
> + if(!transparent_hugepage_swap_disable())
> + if (unlikely(split_huge_page(page))) {
> + swapcache_free(entry, NULL);
> + return 0;
> + }
>
> /*
> * Radix-tree node allocations from PF_MEMALLOC contexts could
That will just prevent the splitting and then add the huge page to the
swap cache, for which it is not prepared.
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-10-12 10:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 13:58 [RFC PATCH] mm: thp: make swap configurable Bob Liu
2011-10-10 14:18 ` Andrea Arcangeli
2011-10-11 9:24 ` Bob Liu
2011-10-11 13:40 ` Rik van Riel
2011-10-11 21:01 ` Andrea Arcangeli
2011-10-12 9:59 ` Johannes Weiner [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=20111012095953.GB3160@redhat.com \
--to=jweiner@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=lliubbo@gmail.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).