On Tue, 3 Mar 2015, Mike Kravetz wrote:
Add a new hugetlbfs mount option 'reserved' to specify that the number
of pages associated with the size of the filesystem will be reserved. If
there are insufficient pages, the mount will fail. The reservation is
maintained for the duration of the filesystem so that as pages are
allocated and free'ed a sufficient number of pages remains reserved.
This functionality is somewhat limited because it's not possible to
reserve a subset of the size for a single mount point, it's either all or
nothing. It shouldn't be too difficult to just add a reserved=<value>
option where <value> is <= size. If it's done that way, you should be
able to omit size= entirely for unlimited hugepages but always ensure that
a low watermark of hugepages are reserved for the database.