Re: [PATCH 4/4] hugetlb: add hugepages_node= command-line option

From: David Rientjes
Date: Fri Feb 21 2014 - 17:44:16 EST


On Fri, 21 Feb 2014, Andi Kleen wrote:

> > > 2) it improves the kernel command line interface from incomplete
> > > (lacking the ability to specify node<->page correlation), to
> > > a complete interface.
> > >
> >
> > If GB hugepages can be allocated dynamically, I really think we should be
> > able to remove hugepagesz= entirely for x86 after a few years of
> > supporting it for backwards compatibility, even though Linus has insisted
>
> That doesn't make any sense. Why break a perfectly fine interface?
>

I think doing hugepagesz= and not default_hugepagesz= is more of a hack
just because we lack support for dynamically allocating some class of
hugepage sizes and this is the only way to currently do it; if we had
support for doing it at runtime then that hack probably isn't needed. You
would still be able to do default_hugepagesz=1G and allocate a ton of them
when fragmentation is a concern and it can only truly be done at boot.
Even then, with such a large size it doesn't seem absolutely necessary
since you'd either be (a) oom as a result of all those hugepages or (b)
there would be enough memory for initscripts to do this at runtime, this
isn't the case with 2MB.

But, like I said, I'm not sure we'd ever be able to totally remove it
because of backwards compatibility, but the point is that nobody would
have to use it anymore as a hack for 1GB.
--
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/