Re: [PATCH v5 1/2] mm: hugetlb: proc: add HugetlbPages field to /proc/PID/smaps

Naoya Horiguchi
2015-09-17T09:51:45Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 907 bytes --]

On Mon, Sep 07, 2015 at 11:52:41AM +0100, PÃ¡draig Brady wrote:
...
>
> By the same argument I presume the existing THP "AnonHugePages" smaps field
> is not accounted for in the {Private,Shared}_... fields?
> I.E. AnonHugePages may also benefit from splitting to Private/Shared?

smaps_pmd_entry() not only increments mss->anonymous_thp, but also calls
smaps_account() which updates mss->anonymous, mss->referenced and
mss->{shared,private}_{clean,dirty}, so thp's shared/private characteristic
is included in other existing fields.
I think that even if we know the thp-specific shared/private profiles, it
might be hard to do something beneficial using that information, so I feel
keeping this field as-is is ok for now.

Thanks,
Naoya Horiguchiÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥