Re: [PATCH 5/6] mem: try to parse /proc/meminfo to get huge page size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/23/22 11:57 AM, Vincent Fu wrote:
> Instead of relying on a platform-specific default huge page size, try to
> parse /proc/meminfo to get the huge page size when it is not explicitly
> specified as an option.

It's really sad that there isn't a nice way to get this information, but
parsing meminfo will only get you one of them. Eg on my laptop:

axboe@m1 ~> cat /proc/meminfo | grep -i size
Hugepagesize:      32768 kB

But if you look in:

axboe@m1 ~> ls /sys/kernel/mm/hugepages/
hugepages-1048576kB/  hugepages-2048kB/  hugepages-32768kB/

and each directory has entries for increasing the number of them and how
many are currently there.

Parsing /sys/kernel/mm/hugepages/ is probably a better idea than
meminfo.

-- 
Jens Axboe




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux