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. -- 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>