From: Yafang Shao <laoar.shao@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Suren Baghdasaryan <surenb@google.com>,
Matthew Wilcox <willy@infradead.org>,
Christoph Lameter <cl@linux.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
Tejun Heo <tj@kernel.org>, Johannes Weiner <hannes@cmpxchg.org>,
Davidlohr Bueso <dave@stgolabs.net>,
Namhyung Kim <namhyung@google.com>,
linux-mm@kvack.org
Subject: Re: MM global locks as core counts quadruple
Date: Fri, 21 Jun 2024 10:46:21 +0800 [thread overview]
Message-ID: <CALOAHbBTTs=4o=DsNL5f+dvt3fEwABTFMF25japrGL_FEzWSPA@mail.gmail.com> (raw)
In-Reply-To: <07e7d078-0c9d-6a1f-1ab5-295f86974b72@google.com>
On Fri, Jun 21, 2024 at 8:50 AM David Rientjes <rientjes@google.com> wrote:
>
> Hi all,
>
> As core counts are rapidly expanding over the next four years, Namhyung
> and I were looking at global locks that we're already seeing high
> contention on even today.
>
> Some of these are not MM specific:
> - cgroup_mutex
We previously discussed replacing cgroup_mutex with RCU in some
critical paths [0], but I haven't had the time to implement it yet.
[0]. https://lore.kernel.org/bpf/CALOAHbAgWoFGSc=uF5gFWXmsALECUaGGScQuXpRcwjgzv+TPGQ@mail.gmail.com/
> - cgroup_threadgroup_rwsem
> - tasklist_lock
> - kernfs_mutex (although should now be substantially better with the
> kernfs_locks array)
>
> Others *are* MM specific:
> - list_lrus_mutex
> - pcpu_drain_mutex
> - shrinker_mutex (formerly shrinker_rwsem)
> - vmap_purge_lock
> - slab_mutex
>
> This is only looking at fleet data for global static locks, not locks like
> zone->lock that get dynamically allocated.
We have encountered latency spikes caused by the zone->lock. Do we
have any plans to eliminate this lock, such as implementing a lockless
buddy list? I believe this could be a viable solution.
>
> (mmap_lock was substantially improved by per-vma locking, although does
> show up for very large vmas.)
>
> Couple questions:
>
> (1) How are people quantifying these pain points, if at all, in synthetic
> testing? Any workloads or benchmarks that are really good at doing
> this in the lab beyond the traditional will-it-scale? (The above is
> from production data.)
>
> (2) Is anybody working on any of the above global locks? Trying to
> surface gaps for locks that will likely become even more painful in
> the coming years.
>
> Thanks!
>
--
Regards
Yafang
next prev parent reply other threads:[~2024-06-21 2:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 0:35 David Rientjes
2024-06-21 2:01 ` Matthew Wilcox
2024-06-21 2:46 ` Yafang Shao [this message]
2024-06-21 2:54 ` Matthew Wilcox
2024-06-26 19:38 ` Karim Manaouil
2024-06-27 5:36 ` Christoph Lameter (Ampere)
2024-06-21 19:10 ` Tejun Heo
2024-06-21 21:37 ` Namhyung Kim
2024-06-23 17:59 ` Tejun Heo
2024-06-24 21:44 ` David Rientjes
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='CALOAHbBTTs=4o=DsNL5f+dvt3fEwABTFMF25japrGL_FEzWSPA@mail.gmail.com' \
--to=laoar.shao@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dave@stgolabs.net \
--cc=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=namhyung@google.com \
--cc=paulmck@kernel.org \
--cc=rientjes@google.com \
--cc=surenb@google.com \
--cc=tj@kernel.org \
--cc=willy@infradead.org \
/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