linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>,
	Vladimir Davydov <vdavydov@parallels.com>,
	Glauber Costa <glommer@openvz.org>,
	Dave Chinner <dchinner@redhat.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH] mm: update the description for vm_total_pages
Date: Wed, 09 Jul 2014 07:45:06 +0800	[thread overview]
Message-ID: <53BC8282.8080602@gmail.com> (raw)
In-Reply-To: <20140708134136.597fbd11309d1e376eeb241c@linux-foundation.org>

Andrew,

On 2014a1'07ae??09ae?JPY 04:41, Andrew Morton wrote:
> On Tue, 08 Jul 2014 13:44:51 +0800 Wang Sheng-Hui <shhuiw@gmail.com> 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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-07-08 23:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08  5:44 [PATCH] mm: update the description for vm_total_pages Wang Sheng-Hui
2014-07-08 20:41 ` Andrew Morton
2014-07-08 23:45   ` Wang Sheng-Hui [this message]
2014-07-09  0:02     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BC8282.8080602@gmail.com \
    --to=shhuiw@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dchinner@redhat.com \
    --cc=glommer@openvz.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    --cc=vdavydov@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).