linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	 shaoyafang@didiglobal.com
Subject: Re: [PATCH] mm/memcontrol: avoid unnecessary PageTransHuge() when counting compound page
Date: Mon, 6 May 2019 23:22:11 +0800	[thread overview]
Message-ID: <CALOAHbAM26MTZ075OThmLtv+q_cCs_DDGVWW_GpycxWEDTydCA@mail.gmail.com> (raw)
In-Reply-To: <20190506135954.GB31017@dhcp22.suse.cz>

On Mon, May 6, 2019 at 9:59 PM Michal Hocko <mhocko@suse.com> wrote:
>
> On Sun 05-05-19 14:40:57, Yafang Shao wrote:
> > If CONFIG_TRANSPARENT_HUGEPAGE is not set, hpage_nr_pages() is always 1;
> > if CONFIG_TRANSPARENT_HUGEPAGE is set, hpage_nr_pages() will
> > call PageTransHuge() to judge whether the page is compound page or not.
> > So we can use the result of hpage_nr_pages() to avoid uneccessary
> > PageTransHuge().
>
> The changelog doesn't describe motivation. Does this result in a better
> code/performance?
>

It is a better code, I think.
Regarding the performance, I don't think it is easy to measure.

Thanks
Yafang


  reply	other threads:[~2019-05-06 15:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-05  6:40 [PATCH] mm/memcontrol: avoid unnecessary PageTransHuge() when counting compound page Yafang Shao
2019-05-06 13:59 ` Michal Hocko
2019-05-06 15:22   ` Yafang Shao [this message]
2019-05-06 19:19     ` Michal Hocko
2019-05-07 14:21       ` Chris Down
2019-05-07 15:00         ` Yafang Shao

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=CALOAHbAM26MTZ075OThmLtv+q_cCs_DDGVWW_GpycxWEDTydCA@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=shaoyafang@didiglobal.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).