All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
	James Hartshorn <jhartshorn@connexity.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Mel Gorman <mgorman@techsingularity.net>
Subject: Re: Can we disable transparent hugepages for lack of a legitimate use case please?
Date: Tue, 1 Sep 2015 15:26:34 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.10.1509011522470.11913@chino.kir.corp.google.com> (raw)
In-Reply-To: <55DC3BD4.6020602@suse.cz>

On Tue, 25 Aug 2015, Vlastimil Babka wrote:

> > THP works very well when system has a lot of free memory.
> > Probably default should be weakened to "only if we have tons of free
> > memory".
> > For example allocate THP pages atomically, only if buddy allocator already
> > has huge pages. Also them could be pre-zeroed in background.
> 
> I've been proposing series that try to move more THP allocation activity from
> the page faults into khugepaged, but no success yet.
> 
> Maybe we should just start with changing the default of
> /sys/kernel/mm/transparent_hugepage/defrag to "madvise".

I would need to revert this internally to avoid performance degradation, I 
believe others would report the same.

> This would remove the
> reclaim and compaction for page faults and quickly fallback to order-0 pages.
> The compaction is already crippled enough there with the GFP_TRANSHUGE
> specific decisions in __alloc_pages_slowpath(). I've noticed it failing
> miserably in the transhuge-stress recently, so it seems it's not worth to try
> at all. With changing the default we can kill those GFP_TRANSHUGE checks and
> assume that whoever uses the madvise does actually want to try harder.
> 

I think the work that is being done on moving compaction to khugepaged as 
well as periodic synchronous compaction of all memory is the way to go to 
avoid lengthy stalls during fault.

> Of course that does nothing about zeroing. I don't know how huge issue is that
> one?
> 

I don't believe it is an issue that cannot be worked around in userspace 
either with MADV_NOHUGEPAGE or PR_SET_THP_DISABLE.

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

  reply	other threads:[~2015-09-01 22:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 20:12 Can we disable transparent hugepages for lack of a legitimate use case please? James Hartshorn
2015-08-24 20:20 ` Bridgman, John
2015-08-24 20:46   ` James Hartshorn
2015-08-24 23:20     ` Theodore Ts'o
2015-09-10 16:45     ` Andrea Arcangeli
2015-09-10 17:02       ` Andres Freund
2015-09-14 12:37       ` Vlastimil Babka
2015-08-25  9:25 ` Konstantin Khlebnikov
2015-08-25  9:56   ` Vlastimil Babka
2015-09-01 22:26     ` David Rientjes [this message]
2015-09-02  8:55       ` Konstantin Khlebnikov
2015-09-02  9:06         ` Vlastimil Babka
2015-09-09 22:05       ` Andrea Arcangeli
2015-09-03 19:33 ` Andi Kleen

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=alpine.DEB.2.10.1509011522470.11913@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=aarcange@redhat.com \
    --cc=jhartshorn@connexity.com \
    --cc=kirill@shutemov.name \
    --cc=koct9i@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.