Re: [PATCH] hugetlb: /proc/meminfo shows data for all sizes of hugepages

From: Eric B Munson
Date: Mon Mar 07 2011 - 18:25:08 EST


2011/3/7 Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>:
>> >
>> > Could we do something where we keep the default hpage_size looking like
>> > it does now, but append the size explicitly for the new entries?
>> >
>> > HugePages_Total(1G):       2
>> > HugePages_Free(1G):        1
>> > HugePages_Rsvd(1G):        1
>> > HugePages_Surp(1G):        1
>> >
>>
>> Let's not change the existing interface, please.
>>
>> Adding new fields: OK.
>> Changing the way in whcih existing fields are calculated: OKish.
>> Renaming existing fields: not OK.
>
> How about lining up multiple values in each field like this?
>
>  HugePages_Total:       5 2
>  HugePages_Free:        2 1
>  HugePages_Rsvd:        3 1
>  HugePages_Surp:        1 1
>  Hugepagesize:       2048 1048576 kB
>  ...
>
> This doesn't change the field names and the impact for user space
> is still small?
>
> Thanks,
> Naoya
>

I don't like this either, Dave's suggestion impacts userspace the
least, as code that looks for default huge page size pool info will
still find it, but it won't match the sized entries. Your suggestion
means that I need to change how libhugetlbfs, for instance, parses
meminfo.
--
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/