[PATCH blktests v0] nvme/029: reserve hugepages for lager allocations
Daniel Wagner
dwagner at suse.de
Tue Feb 20 23:37:44 PST 2024
On Wed, Feb 21, 2024 at 06:22:29AM +0000, Shinichiro Kawasaki wrote:
> I found this changes makes the test case fail when the kernel does not have
> CONFIG_HUGETLBFS. Without the config, /proc/sys/vm/nr_hugepages does not
> exist.
>
> When CONFIG_HUGETLBFS is not defined, should we skip this test case?
Obviously, we should aim for really solid test cases. Though it is not
guaranteed that the test will pass even with CONFIG_HUGETLBS enabled. I
suspect we would need to make some more preparation steps that the
allocation has a high change to pass. Though I haven't really looked
into what the necessary steps would be. The sysfs exposes a few more
knobs to play with.
> If this is
> the case, we can add "_have_kernel_option HUGETLBFS" in requires(). If not, we
> should check existence of /proc/sys/vm/nr_hugepages before touching it, like:
>
> if [[ -r /proc/sys/vm/nr_hugepages &&
> "$(cat /proc/sys/vm/nr_hugepages)" -eq 0 ]]; then
Sure, I'll add this and also fix the typos in the commit message.
>
> Also I suggest to add in-line comment to help understanding why nr_hugepages
> sysfs needs change. Something like,
>
> # nvme-cli may fail to allocate linear memory for rather large IO buffers.
> # Increase nr_hugepages to allow nvme-cli to try the linear memory allocation
> # from HugeTLB pool.
Ok.
More information about the Linux-nvme
mailing list