linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: William Kucharski <william.kucharski@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Yang Shi <yang.shi@linux.alibaba.com>,
	hannes@cmpxchg.org, mhocko@suse.com, mgorman@techsingularity.net,
	kirill.shutemov@linux.intel.com, hughd@google.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: vmscan: correct nr_reclaimed for THP
Date: Sat, 11 May 2019 16:33:01 -0600	[thread overview]
Message-ID: <7B762A95-B8A6-4281-94F1-5DA6B62EDCF9@oracle.com> (raw)
In-Reply-To: <20190510163612.GA23417@bombadil.infradead.org>



> On May 10, 2019, at 10:36 AM, Matthew Wilcox <willy@infradead.org> wrote:
> 
> Please don't.  That embeds the knowledge that we can only swap out either 
> normal pages or THP sized pages.  I'm trying to make the VM capable of 
> supporting arbitrary-order pages, and this would be just one more place
> to fix.
> 
> I'm sympathetic to the "self documenting" argument.  My current tree has
> a patch in it:
> 
>    mm: Introduce compound_nr
> 
>    Replace 1 << compound_order(page) with compound_nr(page).  Minor
>    improvements in readability.
> 
> It goes along with this patch:
> 
>    mm: Introduce page_size()
> 
>    It's unnecessarily hard to find out the size of a potentially huge page.
>    Replace 'PAGE_SIZE << compound_order(page)' with page_size(page).
> 
> Better suggestions on naming gratefully received.  I'm more happy with 
> page_size() than I am with compound_nr().  page_nr() gives the wrong
> impression; page_count() isn't great either.

I like page_size() as well. At least to me, page_nr() or page_count() would
imply a basis of PAGESIZE, or that you would need to do something like:

    page_size = page_nr() << PAGE_SHIFT;

to get the size in bytes; page_size() is more straightforward in that respect.

      parent reply	other threads:[~2019-05-11 22:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10  0:16 [PATCH] mm: vmscan: correct nr_reclaimed for THP Yang Shi
2019-05-10  0:39 ` Shakeel Butt
2019-05-10  2:12 ` Huang, Ying
2019-05-10  2:25   ` Yang Shi
2019-05-10  3:03     ` Huang, Ying
2019-05-10  4:33       ` William Kucharski
2019-05-10 15:48         ` Yang Shi
2019-05-10 15:41       ` Yang Shi
2019-05-10 16:36   ` Matthew Wilcox
2019-05-10 16:50     ` Yang Shi
2019-05-10 16:52       ` Matthew Wilcox
2019-05-10 16:54         ` Yang Shi
2019-05-10 22:54     ` Ira Weiny
2019-05-10 23:06       ` Matthew Wilcox
2019-05-11  4:09     ` Yafang Shao
2019-05-11 22:33     ` William Kucharski [this message]

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=7B762A95-B8A6-4281-94F1-5DA6B62EDCF9@oracle.com \
    --to=william.kucharski@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=willy@infradead.org \
    --cc=yang.shi@linux.alibaba.com \
    --cc=ying.huang@intel.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).