From: Alex Thorlton <athorlton@sgi.com> To: Andy Lutomirski <luto@amacapital.net> Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>, 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>, Wanpeng Li <liwanp@linux.vnet.ibm.com>, Mel Gorman <mgorman@suse.de>, Michel Lespinasse <walken@google.com>, Benjamin LaHaise <bcrl@kvack.org>, Oleg Nesterov <oleg@redhat.com>, "Eric W. Biederman" <ebiederm@xmission.com>, Al Viro <viro@zeniv.linux.org.uk>, David Rientjes <rientjes@google.com>, Zhang Yanfei <zhangyanfei@cn.fujitsu.com>, Peter Zijlstra <peterz@infradead.org>, Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@suse.cz>, Jiang Liu <jiang.liu@huawei.com>, Cody P Schafer <cody@linux.vnet.ibm.com>, Glauber Costa <glommer@parallels.com>, Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [RFC PATCH 2/3] Add tunable to control THP behavior Date: Thu, 12 Dec 2013 15:04:32 -0600 [thread overview] Message-ID: <20131212210432.GB6034@sgi.com> (raw) In-Reply-To: <CALCETrWgVViOK8mp5wort9T6VWBAAN_MCGmoAGddudsWfr2Ypw@mail.gmail.com> > Right. I like that behavior for my workload. (Although I currently > allocate huge pages -- when I wrote that code, THP interacted so badly > with pagecache that it was a non-starter. I think it's fixed now, > though.) In that case, it's probably best to just stick with current behavior, and leave the threshold at 1, unless we implement something like I discuss below. > In that case, I guess I misunderstood your description. Are saying > that, once any node accesses this many pages in the potential THP, > then the whole THP will be mapped? Well, right now, this patch completely gives up on mapping a THP if two different nodes take a page from our chunk before the threshold is hit, so I think you're mostly understanding it correctly. One thing we could consider is adding an option to map the THP on the node with the *most* references to the potential THP, instead of giving up on mapping the THP when multiple nodes reference it. That might be a good middle ground, but I can see some performance issues coming into play there if the threshold is set too high, since we'll have to move all the pages in the chunk to the node that hit the threshold. - Alex
WARNING: multiple messages have this Message-ID (diff)
From: Alex Thorlton <athorlton@sgi.com> To: Andy Lutomirski <luto@amacapital.net> Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>, 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>, Wanpeng Li <liwanp@linux.vnet.ibm.com>, Mel Gorman <mgorman@suse.de>, Michel Lespinasse <walken@google.com>, Benjamin LaHaise <bcrl@kvack.org>, Oleg Nesterov <oleg@redhat.com>, "Eric W. Biederman" <ebiederm@xmission.com>, Al Viro <viro@zeniv.linux.org.uk>, David Rientjes <rientjes@google.com>, Zhang Yanfei <zhangyanfei@cn.fujitsu.com>, Peter Zijlstra <peterz@infradead.org>, Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@suse.cz>, Jiang Liu <jiang.liu@huawei.com>, Cody P Schafer <cody@linux.vnet.ibm.com>, Glauber Costa <glommer@parallels.com>, Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [RFC PATCH 2/3] Add tunable to control THP behavior Date: Thu, 12 Dec 2013 15:04:32 -0600 [thread overview] Message-ID: <20131212210432.GB6034@sgi.com> (raw) In-Reply-To: <CALCETrWgVViOK8mp5wort9T6VWBAAN_MCGmoAGddudsWfr2Ypw@mail.gmail.com> > Right. I like that behavior for my workload. (Although I currently > allocate huge pages -- when I wrote that code, THP interacted so badly > with pagecache that it was a non-starter. I think it's fixed now, > though.) In that case, it's probably best to just stick with current behavior, and leave the threshold at 1, unless we implement something like I discuss below. > In that case, I guess I misunderstood your description. Are saying > that, once any node accesses this many pages in the potential THP, > then the whole THP will be mapped? Well, right now, this patch completely gives up on mapping a THP if two different nodes take a page from our chunk before the threshold is hit, so I think you're mostly understanding it correctly. One thing we could consider is adding an option to map the THP on the node with the *most* references to the potential THP, instead of giving up on mapping the THP when multiple nodes reference it. That might be a good middle ground, but I can see some performance issues coming into play there if the threshold is set too high, since we'll have to move all the pages in the chunk to the node that hit the threshold. - Alex -- 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 prev parent reply other threads:[~2013-12-12 21:04 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <cover.1386790423.git.athorlton@sgi.com> 2013-12-12 18:00 ` [RFC PATCH 1/3] Add flags for temporary compound pages Alex Thorlton 2013-12-12 18:00 ` Alex Thorlton 2013-12-12 18:00 ` [RFC PATCH 2/3] Add tunable to control THP behavior Alex Thorlton 2013-12-12 18:00 ` Alex Thorlton 2013-12-12 20:11 ` Andy Lutomirski 2013-12-12 20:11 ` Andy Lutomirski 2013-12-12 20:49 ` Alex Thorlton 2013-12-12 20:49 ` Alex Thorlton 2013-12-12 20:52 ` Andy Lutomirski 2013-12-12 20:52 ` Andy Lutomirski 2013-12-12 21:04 ` Alex Thorlton [this message] 2013-12-12 21:04 ` Alex Thorlton 2013-12-12 21:37 ` Rik van Riel 2013-12-12 21:37 ` Rik van Riel 2013-12-12 23:17 ` Alex Thorlton 2013-12-12 23:17 ` Alex Thorlton 2013-12-12 18:00 ` [RFC PATCH 3/3] Change " Alex Thorlton 2013-12-12 18:00 ` Alex Thorlton 2013-12-13 13:13 ` Kirill A. Shutemov 2013-12-13 13:13 ` Kirill A. Shutemov 2013-12-16 17:37 ` Alex Thorlton 2013-12-16 17:37 ` Alex Thorlton 2013-12-13 18:12 ` Oleg Nesterov 2013-12-13 18:12 ` Oleg Nesterov
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=20131212210432.GB6034@sgi.com \ --to=athorlton@sgi.com \ --cc=akpm@linux-foundation.org \ --cc=bcrl@kvack.org \ --cc=benh@kernel.crashing.org \ --cc=cody@linux.vnet.ibm.com \ --cc=ebiederm@xmission.com \ --cc=glommer@parallels.com \ --cc=hannes@cmpxchg.org \ --cc=jiang.liu@huawei.com \ --cc=kamezawa.hiroyu@jp.fujitsu.com \ --cc=kirill.shutemov@linux.intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=liwanp@linux.vnet.ibm.com \ --cc=luto@amacapital.net \ --cc=mgorman@suse.de \ --cc=mhocko@suse.cz \ --cc=n-horiguchi@ah.jp.nec.com \ --cc=oleg@redhat.com \ --cc=peterz@infradead.org \ --cc=riel@redhat.com \ --cc=rientjes@google.com \ --cc=viro@zeniv.linux.org.uk \ --cc=walken@google.com \ --cc=zhangyanfei@cn.fujitsu.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: linkBe 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.