Re: [PATCH] mm: update the description for vm_total_pages

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

 



Andrew,

On 2014年07月09日 04:41, Andrew Morton wrote:
> On Tue, 08 Jul 2014 13:44:51 +0800 Wang Sheng-Hui <shhuiw@xxxxxxxxx> wrote:
> 
>>
>> vm_total_pages is calculated by nr_free_pagecache_pages(), which counts
>> the number of pages which are beyond the high watermark within all zones.
>> So vm_total_pages is not equal to total number of pages which the VM controls.
>>
>> ...
>>
>> --- a/mm/vmscan.c
>> +++ b/mm/vmscan.c
>> @@ -136,7 +136,11 @@ struct scan_control {
>>   * From 0 .. 100.  Higher means more swappy.
>>   */
>>  int vm_swappiness = 60;
>> -unsigned long vm_total_pages;  /* The total number of pages which the VM controls */
>> +/*
>> + * The total number of pages which are beyond the high watermark
>> + * within all zones.
>> + */
>> +unsigned long vm_total_pages;
>>
>>  static LIST_HEAD(shrinker_list);
>>  static DECLARE_RWSEM(shrinker_rwsem);
> 
> Nice patch!  It's good to document these little things as one discovers
> them.
> 
> However vm_total_pages is only ever used in build_all_zonelists() and
> could be made a local within that function.

We can see that vm_total_pages is not used in build_all_zonelist() only.
          http://lxr.oss.org.cn/search?string=vm_total_pages

Maybe some redefinition is needed instead of current definition in vmscan.c.:-)

>

Regards,
Wang Sheng-Hui

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]