Re: [PATCH RFC] mm, proc: add PcpFree to meminfo

Dave Hansen
2022-08-18T21:15:09Z

On 8/17/22 00:16, Kefeng Wang wrote:
> On 2022/8/16 16:44, Kefeng Wang wrote:
>> From: Liu Shixin <liushixin2@huawei.com>
>>
>> The page on pcplist could be used, but not counted into memory free or
>> avaliable, and pcp_free is only showed by show_mem(). Since commit
>> d8a759b57035 ("mm, page_alloc: double zone's batchsize"), there is a
>> significant decrease in the display of free memory, with a large number
>> of cpus and nodes, the number of pages in the percpu list can be very
>> large, so it is better to let user to know the pcp count.
> Add more experts according to commit d8a759b57035，
> any advice would be much appreciated，thanks.

Adding a new meminfo field seems like overkill. I'd just make this a
part of MemFree if anything.

Also, some actual data would be nice here. Like:

Before commit d8a759b57035, the maximum amount of pages in the
pcp lists was theoretically $FOO MB. After the patch, the lists
can hold $BAR MB. It has been observed to be $BAZ MB in
practice.

This was all on a system with $X memory NUMA nodes and $Y CPUs.