From: Peter Zijlstra <peterz@infradead.org>
To: Alex Thorlton <athorlton@sgi.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Rik van Riel <riel@redhat.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Oleg Nesterov <oleg@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andy Lutomirski <luto@amacapital.net>,
Al Viro <viro@zeniv.linux.org.uk>,
Kees Cook <keescook@chromium.org>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC PATCH] mm: thp: Add per-mm_struct flag to control THP
Date: Fri, 10 Jan 2014 23:10:10 +0100 [thread overview]
Message-ID: <20140110221010.GP31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140110220155.GD3066@sgi.com>
On Fri, Jan 10, 2014 at 04:01:55PM -0600, Alex Thorlton wrote:
> On Fri, Jan 10, 2014 at 10:23:10PM +0200, Kirill A. Shutemov wrote:
> > Do you know what cause the difference? I prefer to fix THP instead of
> > adding new knob to disable it.
>
> The issue is that when you touch 1 byte of an untouched, contiguous 2MB
> chunk, a THP will be handed out, and the THP will be stuck on whatever
> node the chunk was originally referenced from. If many remote nodes
> need to do work on that same chunk, they'll be making remote accesses.
> With THP disabled, 4K pages can be handed out to separate nodes as
> they're needed, greatly reducing the amount of remote accesses to
> memory. I give a bit better description here:
>
> https://lkml.org/lkml/2013/8/27/397
>
> I had been looking into better ways to handle this issues, but after
> spinning through a few other ideas:
>
> - Per cpuset flag to control THP:
> https://lkml.org/lkml/2013/6/10/331
>
> - Threshold to determine when to hand out THPs:
> https://lkml.org/lkml/2013/12/12/394
>
> We've arrived back here. Andrea seemed to think that this is an
> acceptable approach to solve the problem, at least as a starting point:
>
> https://lkml.org/lkml/2013/12/17/397
>
> I agree that we should, ideally, come up with a way to appropriately
> handle this problem in the kernel, but as of right now, it appears that
> that might be a rather large undertaking.
We already have the information to determine if a page is shared across
nodes, Mel even had some prototype code to do splits under those
conditions.
--
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: Peter Zijlstra <peterz@infradead.org>
To: Alex Thorlton <athorlton@sgi.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
linux-mm@kvack.org, Ingo Molnar <mingo@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Rik van Riel <riel@redhat.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Oleg Nesterov <oleg@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Andy Lutomirski <luto@amacapital.net>,
Al Viro <viro@zeniv.linux.org.uk>,
Kees Cook <keescook@chromium.org>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>
Subject: Re: [RFC PATCH] mm: thp: Add per-mm_struct flag to control THP
Date: Fri, 10 Jan 2014 23:10:10 +0100 [thread overview]
Message-ID: <20140110221010.GP31570@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140110220155.GD3066@sgi.com>
On Fri, Jan 10, 2014 at 04:01:55PM -0600, Alex Thorlton wrote:
> On Fri, Jan 10, 2014 at 10:23:10PM +0200, Kirill A. Shutemov wrote:
> > Do you know what cause the difference? I prefer to fix THP instead of
> > adding new knob to disable it.
>
> The issue is that when you touch 1 byte of an untouched, contiguous 2MB
> chunk, a THP will be handed out, and the THP will be stuck on whatever
> node the chunk was originally referenced from. If many remote nodes
> need to do work on that same chunk, they'll be making remote accesses.
> With THP disabled, 4K pages can be handed out to separate nodes as
> they're needed, greatly reducing the amount of remote accesses to
> memory. I give a bit better description here:
>
> https://lkml.org/lkml/2013/8/27/397
>
> I had been looking into better ways to handle this issues, but after
> spinning through a few other ideas:
>
> - Per cpuset flag to control THP:
> https://lkml.org/lkml/2013/6/10/331
>
> - Threshold to determine when to hand out THPs:
> https://lkml.org/lkml/2013/12/12/394
>
> We've arrived back here. Andrea seemed to think that this is an
> acceptable approach to solve the problem, at least as a starting point:
>
> https://lkml.org/lkml/2013/12/17/397
>
> I agree that we should, ideally, come up with a way to appropriately
> handle this problem in the kernel, but as of right now, it appears that
> that might be a rather large undertaking.
We already have the information to determine if a page is shared across
nodes, Mel even had some prototype code to do splits under those
conditions.
next prev parent reply other threads:[~2014-01-10 22:10 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-10 19:55 [RFC PATCH] mm: thp: Add per-mm_struct flag to control THP Alex Thorlton
2014-01-10 19:55 ` Alex Thorlton
2014-01-10 20:23 ` Kirill A. Shutemov
2014-01-10 20:23 ` Kirill A. Shutemov
2014-01-10 22:01 ` Alex Thorlton
2014-01-10 22:01 ` Alex Thorlton
2014-01-10 22:10 ` Peter Zijlstra [this message]
2014-01-10 22:10 ` Peter Zijlstra
2014-01-10 22:39 ` Alex Thorlton
2014-01-10 22:39 ` Alex Thorlton
2014-01-14 15:44 ` Mel Gorman
2014-01-14 15:44 ` Mel Gorman
2014-01-14 19:38 ` Alex Thorlton
2014-01-14 19:38 ` Alex Thorlton
2014-01-22 10:26 ` Mel Gorman
2014-01-22 10:26 ` Mel Gorman
2014-01-22 17:53 ` Alex Thorlton
2014-01-22 17:53 ` Alex Thorlton
2014-01-22 21:46 ` David Rientjes
2014-01-22 21:46 ` David Rientjes
2014-01-10 22:23 ` Kirill A. Shutemov
2014-01-10 22:23 ` Kirill A. Shutemov
2014-01-14 15:47 ` Mel Gorman
2014-01-14 15:47 ` Mel Gorman
2014-01-11 16:11 ` Oleg Nesterov
2014-01-11 16:11 ` Oleg Nesterov
2014-01-11 15:53 ` Oleg Nesterov
2014-01-11 15:53 ` Oleg Nesterov
2014-01-11 19:30 ` Alex Thorlton
2014-01-11 19:30 ` Alex Thorlton
2014-01-12 13:56 ` Oleg Nesterov
2014-01-12 13:56 ` Oleg Nesterov
2014-01-13 18:59 ` Alex Thorlton
2014-01-13 18:59 ` Alex Thorlton
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=20140110221010.GP31570@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=athorlton@sgi.com \
--cc=benh@kernel.crashing.org \
--cc=ebiederm@xmission.com \
--cc=keescook@chromium.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@amacapital.net \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=oleg@redhat.com \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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.