From: Vlastimil Babka <vbabka@suse.cz>
To: Wei Yang <richardw.yang@linux.intel.com>,
Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Hugh Dickins <hughd@google.com>
Subject: Re: Why sometimes count vm event with page number, sometimes not?
Date: Tue, 5 Nov 2019 16:40:18 +0100 [thread overview]
Message-ID: <f1408fc7-0766-7a03-4e16-dcb1439d656a@suse.cz> (raw)
In-Reply-To: <20191105062809.GA15848@richard>
On 11/5/19 7:28 AM, Wei Yang wrote:
> On Mon, Nov 04, 2019 at 07:32:51PM -0800, Matthew Wilcox wrote:
>> On Tue, Nov 05, 2019 at 10:26:44AM +0800, Wei Yang wrote:
>>> Hi, All,
>>>
>>> I am curious about the semantic of __count_vm_event[s].
>>>
>>> For example, we count PGDEACTIVATE event in lru_deactivate_file_fn() and
>>> lru_deactivate_fn(). One of them count with number of page, the other not.
>>>
>>> Just curious about the exact value we want to count.
>>
>> I don't understand the question. We deactivate one page
>> in lru_deactivate_file_fn(). We deactivate several pages in
>> shrink_active_list(). PGDEACTIVATE counts the number of pages which
>> have been deactivated.
>>
>> Does that answer your question?
>
> Not yet.
>
> In function, lru_deactivate_fn(), __count_vm_events's second parameter is
> hpage_nr_pages(page). This is the number in size of "normal" page. Per my
> understanding, the page deactivated in lru_deactivate_file_fn() could be a
> hpage too. But it just count the deactivation once instead of
> hpage_nr_pages().
>
> Or you want to say the page deactivated in lru_deactivate_file_fn() must be an
> order 0 page?
I suspect that was true before THP on shmem, but now perhaps it's not
true anymore? CCing Kirill and Hugh.
next prev parent reply other threads:[~2019-11-05 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 2:26 Wei Yang
2019-11-05 3:32 ` Matthew Wilcox
2019-11-05 6:28 ` Wei Yang
2019-11-05 15:40 ` Vlastimil Babka [this message]
2019-11-05 20:49 ` Hugh Dickins
2019-11-06 0:28 ` Wei Yang
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=f1408fc7-0766-7a03-4e16-dcb1439d656a@suse.cz \
--to=vbabka@suse.cz \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=richardw.yang@linux.intel.com \
--cc=willy@infradead.org \
/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