Re: [PATCH 0/4] hugetlb: add hugepagesnid= command-line option
From: Luiz Capitulino
Date: Tue Feb 11 2014 - 10:42:34 EST
On Mon, 10 Feb 2014 15:13:54 -0800
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 10 Feb 2014 12:27:44 -0500 Luiz Capitulino <lcapitulino@xxxxxxxxxx> wrote:
>
> > HugeTLB command-line option hugepages= allows the user to specify how many
> > huge pages should be allocated at boot. On NUMA systems, this argument
> > automatically distributes huge pages allocation among nodes, which can
> > be undesirable.
>
> Grumble. "can be undesirable" is the entire reason for the entire
> patchset. We need far, far more detail than can be conveyed in three
> words, please!
Right, sorry for that. I'll improve this for v2, but a better introduction
for the series would be something like the following.
Today, HugeTLB provides support for controlling allocation of persistent
huge pages on a NUMA system through sysfs. So, for example, if a sysadmin
wants to allocate 300 2M huge pages on node 1, s/he can do:
echo 300 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
This works as long as you have enough contiguous pages, which may work
for 2M pages, but is harder for 1G huge pages. For those, it's better or even
required to reserve them at boot.
To this end we have the hugepages= command-line option, which works but misses
the per node control. This option evenly distributes huge pages among nodes.
However, we have users who want more flexibility. They want to be able to
specify something like: allocate 2 1G huge pages from node0 and 4 1G huge page
from node1. This is what this series implements.
It's basically per node allocation control for 1G huge pages, but it's
important to note that this series is not intrusive. All it does is to set
the initial per node allocation. All the functions and data structure added
by this series are only used once at boot, after that they are discarded and
rest in oblivion.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/