From: Muchun Song <songmuchun@bytedance.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: slub: remove preemption disabling from put_cpu_partial
Date: Wed, 11 Aug 2021 22:49:06 +0800 [thread overview]
Message-ID: <CAMZfGtW=TXQQuu=f6ndoNUcaVe7O0SOGRV9J=Zf=Dz+MfMorog@mail.gmail.com> (raw)
In-Reply-To: <0d6c3e3b-c270-bb7d-c038-64ee3f0257cd@suse.cz>
On Wed, Aug 11, 2021 at 8:40 PM Vlastimil Babka <vbabka@suse.cz> wrote:
>
> On 8/11/21 1:19 PM, Muchun Song wrote:
> > The commit d6e0b7fa1186 ("slub: make dead caches discard free slabs
> > immediately") introduced those logic to speed up the destruction of
> > per-memcg kmem caches, because kmem caches created for a memory
> > cgroup are only destroyed after the last page charged to the cgroup
> > is freed at that time. But since commit 9855609bde03 ("mm: memcg/slab:
> > use a single set of kmem_caches for all accounted allocations), we
> > do not have per-memcg kmem caches anymore. Are those code pointless?
> > No, the kmem_cache->cpu_partial can be set to zero by 'echo 0 > /sys/
> > kernel/slab/*/cpu_partial'. In this case, the slab page will be put
> > into cpu partial list and then moved to node list (because
> > slub_cpu_partial() returns zero). However, we can skip putting the
> > slab page to cpu partial list and just move it to node list directly.
> > We can adjust the condition of kmem_cache_has_cpu_partial() to
> > slub_cpu_partial() in __slab_free() and remove those code from
> > put_cpu_partial() for simplification.
> >
> > Signed-off-by: Muchun Song <songmuchun@bytedance.com>
>
> Please check again current mmotm/next if this still applies, I think it
> shouldn't anymore. Thanks.
>
You are right. I didn't see it before. I guess it was merged
recently. But thanks for your reminder.
prev parent reply other threads:[~2021-08-11 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 11:19 Muchun Song
2021-08-11 12:40 ` Vlastimil Babka
2021-08-11 14:49 ` Muchun Song [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='CAMZfGtW=TXQQuu=f6ndoNUcaVe7O0SOGRV9J=Zf=Dz+MfMorog@mail.gmail.com' \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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