From: Roman Gushchin <roman.gushchin@linux.dev>
To: Shakeel Butt <shakeelb@google.com>
Cc: linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH RFC 1/2] mm: kmem: optimize get_obj_cgroup_from_current()
Date: Tue, 20 Dec 2022 13:15:16 -0800 [thread overview]
Message-ID: <Y6Il5L00NIviTIe4@P9FQF9L96D.corp.robot.car> (raw)
In-Reply-To: <CALvZod5q0koAckpTr4VBq-_KiQpsmC86bE4eP9gzX71PzRdicA@mail.gmail.com>
On Tue, Dec 20, 2022 at 11:55:34AM -0800, Shakeel Butt wrote:
> On Tue, Dec 20, 2022 at 10:28 AM Roman Gushchin
> <roman.gushchin@linux.dev> wrote:
> >
> > Manually inline memcg_kmem_bypass() and active_memcg() to speed up
> > get_obj_cgroup_from_current() by avoiding duplicate in_task() checks
> > and active_memcg() readings.
> >
> > Also add a likely() macro to __get_obj_cgroup_from_memcg():
> > obj_cgroup_tryget() should succeed at almost all times except
> > a very unlikely race with the memcg deletion path.
> >
> > Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
>
> Can you please add your performance experiment setup and result of
> this patch in the commit description of this patch as well?
Sure. I used a small hack to just do a bunch of allocations in a raw
and measured the time. Will include it into the commit message.
Also will fix the #ifdef thing from the second patch, thanks for spotting
it.
>
> Acked-by: Shakeel Butt <shakeelb@google.com>
Thank you for taking a look!
next prev parent reply other threads:[~2022-12-20 21:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-20 18:27 [PATCH RFC 0/2] mm: kmem: optimize obj_cgroup pointer retrieval Roman Gushchin
2022-12-20 18:27 ` [PATCH RFC 1/2] mm: kmem: optimize get_obj_cgroup_from_current() Roman Gushchin
2022-12-20 19:55 ` Shakeel Butt
2022-12-20 21:15 ` Roman Gushchin [this message]
2022-12-20 18:27 ` [PATCH RFC 2/2] mm: kmem: add direct objcg pointer to task_struct Roman Gushchin
2022-12-20 20:44 ` Shakeel Butt
2022-12-22 13:50 ` Michal Koutný
2022-12-22 16:21 ` Roman Gushchin
2023-01-02 16:09 ` Michal Koutný
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=Y6Il5L00NIviTIe4@P9FQF9L96D.corp.robot.car \
--to=roman.gushchin@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=shakeelb@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