linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Sridhar, Kanchana P" <kanchana.p.sridhar@intel.com>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"nphamcs@gmail.com" <nphamcs@gmail.com>,
	"chengming.zhou@linux.dev" <chengming.zhou@linux.dev>,
	"ryan.roberts@arm.com" <ryan.roberts@arm.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	"21cnbao@gmail.com" <21cnbao@gmail.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"Feghali, Wajdi K" <wajdi.k.feghali@intel.com>,
	"Gopal, Vinodh" <vinodh.gopal@intel.com>,
	"Sridhar, Kanchana P" <kanchana.p.sridhar@intel.com>
Subject: RE: [PATCH v1] mm: swap: Call count_mthp_stat() outside ifdef CONFIG_TRANSPARENT_HUGEPAGE.
Date: Wed, 2 Oct 2024 19:30:57 +0000	[thread overview]
Message-ID: <SJ0PR11MB5678738DBE2B5B3B1F6CC760C9702@SJ0PR11MB5678.namprd11.prod.outlook.com> (raw)
In-Reply-To: <CAJD7tkYLD9815CLS+6FCkokeOvPt4Pa6XTnpUAGdaDJF9kdNmA@mail.gmail.com>

> -----Original Message-----
> From: Yosry Ahmed <yosryahmed@google.com>
> Sent: Wednesday, October 2, 2024 12:02 PM
> To: Sridhar, Kanchana P <kanchana.p.sridhar@intel.com>
> Cc: linux-kernel@vger.kernel.org; linux-mm@kvack.org;
> hannes@cmpxchg.org; nphamcs@gmail.com; chengming.zhou@linux.dev;
> ryan.roberts@arm.com; Huang, Ying <ying.huang@intel.com>;
> 21cnbao@gmail.com; akpm@linux-foundation.org; Feghali, Wajdi K
> <wajdi.k.feghali@intel.com>; Gopal, Vinodh <vinodh.gopal@intel.com>
> Subject: Re: [PATCH v1] mm: swap: Call count_mthp_stat() outside ifdef
> CONFIG_TRANSPARENT_HUGEPAGE.
> 
> On Wed, Oct 2, 2024 at 10:30 AM Kanchana P Sridhar
> <kanchana.p.sridhar@intel.com> wrote:
> >
> > This patch moves the call to count_mthp_stat() in
> count_swpout_vm_event()
> > to be outside the "ifdef CONFIG_TRANSPARENT_HUGEPAGE" based on
> changes
> > made in commit 246d3aa3e53151fa150f10257ddd8a4facd31a6a ("mm:
> cleanup
> >  count_mthp_stat() definition").
> >
> > Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
> 
> 
> I don't think this really makes a difference, but I will leave it to
> the THP folks to decide.

Sure, this makes sense.

> 
> However, if you go through with this, please also do the same for the
> call in shrink_folio_list() for consistency.

Yes, will submit v2 with the same modification in shrink_folio_list().

Thanks,
Kanchana

> 
> >
> > ---
> >  mm/page_io.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/page_io.c b/mm/page_io.c
> > index 4aa34862676f..a28d28b6b3ce 100644
> > --- a/mm/page_io.c
> > +++ b/mm/page_io.c
> > @@ -289,8 +289,8 @@ static inline void count_swpout_vm_event(struct
> folio *folio)
> >                 count_memcg_folio_events(folio, THP_SWPOUT, 1);
> >                 count_vm_event(THP_SWPOUT);
> >         }
> > -       count_mthp_stat(folio_order(folio), MTHP_STAT_SWPOUT);
> >  #endif
> > +       count_mthp_stat(folio_order(folio), MTHP_STAT_SWPOUT);
> >         count_memcg_folio_events(folio, PSWPOUT, folio_nr_pages(folio));
> >         count_vm_events(PSWPOUT, folio_nr_pages(folio));
> >  }
> > --
> > 2.27.0
> >

      reply	other threads:[~2024-10-02 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 17:30 Kanchana P Sridhar
2024-10-02 18:19 ` Nhat Pham
2024-10-02 19:01 ` Yosry Ahmed
2024-10-02 19:30   ` Sridhar, Kanchana P [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=SJ0PR11MB5678738DBE2B5B3B1F6CC760C9702@SJ0PR11MB5678.namprd11.prod.outlook.com \
    --to=kanchana.p.sridhar@intel.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=ryan.roberts@arm.com \
    --cc=vinodh.gopal@intel.com \
    --cc=wajdi.k.feghali@intel.com \
    --cc=ying.huang@intel.com \
    --cc=yosryahmed@google.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