From: Michal Hocko <mhocko@suse.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>,
Andrew Morton <akpm@linux-foundation.org>,
tkhai@ya.ru, hannes@cmpxchg.org, shakeelb@google.com,
roman.gushchin@linux.dev, muchun.song@linux.dev,
david@redhat.com, shy828301@gmail.com, sultan@kerneltoast.com,
dave@stgolabs.net, penguin-kernel@i-love.sakura.ne.jp,
paulmck@kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/8] make slab shrink lockless
Date: Tue, 28 Feb 2023 19:40:57 +0100 [thread overview]
Message-ID: <Y/5KuUymvxn+QhIz@dhcp22.suse.cz> (raw)
In-Reply-To: <Y/zHbhxnQ2YsP+wX@kernel.org>
On Mon 27-02-23 17:08:30, Mike Rapoport wrote:
[...]
> The results you present do show improvement in IPC for an artificial test
> script. But more interesting would be to see how a real world workloads
> benefit from your changes.
It's been quite some time ago (2018ish) when we have seen bug report
where mount got stalled when racing with memory reclaim. This was
nasty because the said mount was a part of login chain and users simply
had to wait for a long time to get loged in in that particular
deployment.
The mount was blocked on a shrinker registration and the reclaim was
stalled in a slab shrinker IIRC. I do not remember all the details but
the underlying problem was that a shrinker callback took a long time
because there were too many objects to scan or it had to sync with other
fs operation. I believe we ended up using Minchan's break out from slab
shrinking if the shrinker semaphore was contended and that helped to
some degree but there were still some corner cases where a single slab
shrinker could take a noticeable amount of time.
In general using a "big" lock like shrinker_rwsem from the reclaim and
potentially block many unrelated subsystems that just want to register
or unregister shrinkers is a potential source of hard to predict
problems. So this is a very welcome change.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2023-02-28 18:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-26 14:46 Qi Zheng
2023-02-26 14:46 ` [PATCH v3 1/8] mm: vmscan: add a map_nr_max field to shrinker_info Qi Zheng
2023-02-26 14:54 ` Qi Zheng
2023-02-26 14:46 ` [PATCH v3 2/8] mm: vmscan: make global slab shrink lockless Qi Zheng
2023-02-26 14:46 ` [PATCH v3 3/8] mm: vmscan: make memcg " Qi Zheng
2023-02-26 14:46 ` [PATCH v3 4/8] mm: vmscan: add shrinker_srcu_generation Qi Zheng
2023-02-26 14:46 ` [PATCH v3 5/8] mm: shrinkers: make count and scan in shrinker debugfs lockless Qi Zheng
2023-02-26 14:46 ` [PATCH v3 6/8] mm: vmscan: hold write lock to reparent shrinker nr_deferred Qi Zheng
2023-02-26 14:46 ` [PATCH v3 7/8] mm: vmscan: remove shrinker_rwsem from synchronize_shrinkers() Qi Zheng
2023-02-26 14:46 ` [PATCH v3 8/8] mm: shrinkers: convert shrinker_rwsem to mutex Qi Zheng
2023-02-26 19:51 ` [PATCH v3 0/8] make slab shrink lockless Andrew Morton
2023-02-27 13:31 ` Qi Zheng
2023-02-27 15:08 ` Mike Rapoport
2023-02-27 19:20 ` Kirill Tkhai
2023-02-27 19:32 ` Roman Gushchin
2023-02-27 19:47 ` Kirill Tkhai
2023-02-28 10:08 ` Qi Zheng
2023-02-28 10:04 ` Qi Zheng
2023-02-28 10:53 ` Qi Zheng
2023-02-28 18:40 ` Michal Hocko [this message]
2023-03-01 2:27 ` Qi Zheng
2023-02-27 19:02 ` Roman Gushchin
2023-02-28 10:11 ` Qi Zheng
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=Y/5KuUymvxn+QhIz@dhcp22.suse.cz \
--to=mhocko@suse.com \
--cc=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=paulmck@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeelb@google.com \
--cc=shy828301@gmail.com \
--cc=sultan@kerneltoast.com \
--cc=tkhai@ya.ru \
--cc=zhengqi.arch@bytedance.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
all inboxes | Powered by JetHome®