All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: David Rientjes <rientjes@google.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@techsingularity.net>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] mm, thp: always direct reclaim for MADV_HUGEPAGE even when deferred
Date: Tue, 27 Dec 2016 05:32:08 +0300	[thread overview]
Message-ID: <20161227023208.GB8780@node.shutemov.name> (raw)
In-Reply-To: <alpine.DEB.2.10.1612261639550.99744@chino.kir.corp.google.com>

On Mon, Dec 26, 2016 at 04:53:39PM -0800, David Rientjes wrote:
> > If there is really a need for an immediate solution^Wworkaround then I
> > think that tweaking the madvise option should be reasonably safe. Admins
> > are really prepared for stalls because they are explicitly opting in for
> > madvise behavior and they will get a background compaction on top. This
> > is a new behavior but I do not see how it would be harmful. If an
> > excessive compaction is a problem then THP can be reduced to madvise
> > only vmas.
> > 
> > But, I really _do_ care about having a stall free option which is not a
> > complete disable of the background compaction for THP.
> > 
> 
> This is completely wrong.  Before the "defer" option has been introduced, 
> we had "madvise" and should maintain its behavior as much as possible so 
> there are no surprises.  We don't change behavior for a tunable out from 
> under existing users because you think you know better.  With the new 
> "defer" option, we can make this a stronger variant of "madvise", which 
> Kirill acked, so that existing users of MADV_HUGEPAGE have no change in 
> behavior and we can configure whether we do direct or background 
> compaction for everybody else.  If people don't want background 
> compaction, they can set defrag to "madvise".  If they want it, they can 
> set it to "defer".  It's very simple.
> 
> That said, I simply don't have the time to continue in circular arguments 
> and would respectfully ask Andrew to apply this acked patch.

+1.

I don't see a point to make "defer" weaker than "madvise". MADV_HUGEPAGE
is a way for an application to say that it's okay with paying price for
huge page allocation.

-- 
 Kirill A. Shutemov

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

WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: David Rientjes <rientjes@google.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@techsingularity.net>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [patch] mm, thp: always direct reclaim for MADV_HUGEPAGE even when deferred
Date: Tue, 27 Dec 2016 05:32:08 +0300	[thread overview]
Message-ID: <20161227023208.GB8780@node.shutemov.name> (raw)
In-Reply-To: <alpine.DEB.2.10.1612261639550.99744@chino.kir.corp.google.com>

On Mon, Dec 26, 2016 at 04:53:39PM -0800, David Rientjes wrote:
> > If there is really a need for an immediate solution^Wworkaround then I
> > think that tweaking the madvise option should be reasonably safe. Admins
> > are really prepared for stalls because they are explicitly opting in for
> > madvise behavior and they will get a background compaction on top. This
> > is a new behavior but I do not see how it would be harmful. If an
> > excessive compaction is a problem then THP can be reduced to madvise
> > only vmas.
> > 
> > But, I really _do_ care about having a stall free option which is not a
> > complete disable of the background compaction for THP.
> > 
> 
> This is completely wrong.  Before the "defer" option has been introduced, 
> we had "madvise" and should maintain its behavior as much as possible so 
> there are no surprises.  We don't change behavior for a tunable out from 
> under existing users because you think you know better.  With the new 
> "defer" option, we can make this a stronger variant of "madvise", which 
> Kirill acked, so that existing users of MADV_HUGEPAGE have no change in 
> behavior and we can configure whether we do direct or background 
> compaction for everybody else.  If people don't want background 
> compaction, they can set defrag to "madvise".  If they want it, they can 
> set it to "defer".  It's very simple.
> 
> That said, I simply don't have the time to continue in circular arguments 
> and would respectfully ask Andrew to apply this acked patch.

+1.

I don't see a point to make "defer" weaker than "madvise". MADV_HUGEPAGE
is a way for an application to say that it's okay with paying price for
huge page allocation.

-- 
 Kirill A. Shutemov

  reply	other threads:[~2016-12-27  2:32 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-22  0:21 [patch] mm, thp: always direct reclaim for MADV_HUGEPAGE even when deferred David Rientjes
2016-12-22  0:21 ` David Rientjes
2016-12-22  8:31 ` Kirill A. Shutemov
2016-12-22  8:31   ` Kirill A. Shutemov
2016-12-22 10:00 ` Michal Hocko
2016-12-22 10:00   ` Michal Hocko
2016-12-22 21:05   ` David Rientjes
2016-12-22 21:05     ` David Rientjes
2016-12-23  8:51     ` Michal Hocko
2016-12-23  8:51       ` Michal Hocko
2016-12-23 10:01       ` David Rientjes
2016-12-23 10:01         ` David Rientjes
2016-12-23 11:18         ` Michal Hocko
2016-12-23 11:18           ` Michal Hocko
2016-12-23 22:46           ` David Rientjes
2016-12-23 22:46             ` David Rientjes
2016-12-26  9:02             ` Michal Hocko
2016-12-26  9:02               ` Michal Hocko
2016-12-27  0:53               ` David Rientjes
2016-12-27  0:53                 ` David Rientjes
2016-12-27  2:32                 ` Kirill A. Shutemov [this message]
2016-12-27  2:32                   ` Kirill A. Shutemov
2016-12-27  9:41                 ` Michal Hocko
2016-12-27  9:41                   ` Michal Hocko
2016-12-27 21:36                   ` David Rientjes
2016-12-27 21:36                     ` David Rientjes
2016-12-28  8:48                     ` Michal Hocko
2016-12-28  8:48                       ` Michal Hocko
2016-12-28 21:33                       ` David Rientjes
2016-12-28 21:33                         ` David Rientjes
2016-12-29  8:24                         ` Michal Hocko
2016-12-29  8:24                           ` Michal Hocko
2016-12-30 12:36     ` Mel Gorman
2016-12-30 12:36       ` Mel Gorman
2016-12-30 12:56       ` Michal Hocko
2016-12-30 12:56         ` Michal Hocko
2016-12-30 14:08         ` Mel Gorman
2016-12-30 14:08           ` Mel Gorman
2016-12-30 22:30       ` David Rientjes
2016-12-30 22:30         ` David Rientjes
2017-01-03 10:37         ` Mel Gorman
2017-01-03 10:37           ` Mel Gorman
2017-01-03 21:57           ` David Rientjes
2017-01-03 21:57             ` David Rientjes
2017-01-04 10:12             ` Mel Gorman
2017-01-04 10:12               ` Mel Gorman
2017-01-04 21:53               ` David Rientjes
2017-01-04 21:53                 ` David Rientjes
2017-01-02  8:38 ` Vlastimil Babka
2017-01-02  8:38   ` Vlastimil Babka
2017-01-03 22:44   ` David Rientjes
2017-01-03 22:44     ` David Rientjes
2017-01-04  8:32     ` Vlastimil Babka
2017-01-04  8:32       ` Vlastimil Babka
2017-01-04  9:46       ` Michal Hocko
2017-01-04  9:46         ` Michal Hocko
2017-01-04 22:04       ` David Rientjes
2017-01-04 22:04         ` David Rientjes

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=20161227023208.GB8780@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=rientjes@google.com \
    --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.