linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Hui Su <sh_def@163.com>, Michal Hocko <mhocko@suse.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	 Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/page_alloc: simplify kmem cgroup charge/uncharge code
Date: Tue, 8 Dec 2020 09:12:23 -0800	[thread overview]
Message-ID: <CALvZod56cWta66q4w4ndiPmgfVGkViAFfivh8L8eUBPqJRWFCg@mail.gmail.com> (raw)
In-Reply-To: <20201208060747.GA56968@rlk>

+Michal Hocko

Message starts at https://lkml.kernel.org/r/20201207142204.GA18516@rlk

On Mon, Dec 7, 2020 at 10:08 PM Hui Su <sh_def@163.com> wrote:
>
> On Mon, Dec 07, 2020 at 09:28:46AM -0800, Shakeel Butt wrote:
> > On Mon, Dec 7, 2020 at 6:22 AM Hui Su <sh_def@163.com> wrote:
> >
> > The reason to keep __memcg_kmem_[un]charge_page functions is that they
> > were called in the very hot path. Can you please check the performance
> > impact of your change and if the generated code is actually same or
> > different.
>
> Hi, Shakeel:
>
> I objdump the mm/page_alloc.o and comapre them, it change the assemble code
> indeed. In fact, it change some code order, which i personally think won't have
> impact on performance. And i ran the ltp mm and conatiner test, it seems nothing
> abnormal.

Did you run the tests in a memcg? The change is behind a static key of
kmem accounting which is enabled for subcontainers.

>
> BUT i still want to check whether this change will have negative impact on
> perforance due to this change code was called in the very hot path like you
> said, AND saddly i did not find a way to quantify the impact on performance.
> Can you give me some suggestion about how to quantify the performance or some
> tool?
>

At least I think we can try with a simple page allocation in a loop
i.e. alloc_page(GFP_KERNEL_ACCOUNT). I will think of any existing
benchmark which exercises this code path.

Michal, do you have any suggestions?


  parent reply	other threads:[~2020-12-08 17:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07 14:22 [PATCH] mm/page_alloc: simplify kmem cgroup charge/uncharge code Hui Su
2020-12-07 14:42 ` [External] " Muchun Song
2020-12-07 17:28 ` Shakeel Butt
     [not found]   ` <20201208060747.GA56968@rlk>
2020-12-08 17:12     ` Shakeel Butt [this message]
2020-12-09 16:29       ` Michal Hocko
2020-12-09 18:15         ` Shakeel Butt

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=CALvZod56cWta66q4w4ndiPmgfVGkViAFfivh8L8eUBPqJRWFCg@mail.gmail.com \
    --to=shakeelb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=sh_def@163.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).