[lkml]   [2013]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 2/3] Add tunable to control THP behavior
On Thu, Dec 12, 2013 at 12:49 PM, Alex Thorlton <> wrote:
> > Is there a setting that will turn off the must-be-the-same-node
> > behavior? There are workloads where TLB matters more than cross-node
> > traffic (or where all the pages are hopelessly shared between nodes,
> > but hugepages are still useful).
> That's pretty much how THPs already behave in the kernel, so if you want
> to allow THPs to be handed out to one node, but referenced from many
> others, you'd just set the threshold to 1, and let the existing code
> take over.

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,

> As for the must-be-the-same-node behavior: I'd actually say it's more
> like a "must have so much on one node" behavior, in that, if you set the
> threshold to 16, for example, 16 4K pages must be faulted in on the same
> node, in the same contiguous 2M chunk, before a THP will be created.
> What happens after that THP is created is out of our control, it could
> be referenced from anywhere.

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?


 \ /
  Last update: 2013-12-12 22:21    [W:0.029 / U:12.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site