From: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
To: Dave Chinner <david@fromorbit.com>, Shakeel Butt <shakeelb@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
Cgroups <cgroups@vger.kernel.org>, Linux MM <linux-mm@kvack.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Roman Gushchin <guro@fb.com>, Chris Down <chris@chrisdown.name>,
Yang Shi <yang.shi@linux.alibaba.com>, Tejun Heo <tj@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Konstantin Khorenko <khorenko@virtuozzo.com>,
Kirill Tkhai <ktkhai@virtuozzo.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Chuck Lever <chuck.lever@oracle.com>,
"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] mm: fix hanging shrinker management on long do_shrink_slab
Date: Thu, 19 Dec 2019 10:35:57 +0000 [thread overview]
Message-ID: <ed839995-9f49-19b6-a46a-5f777cd8f52b@virtuozzo.com> (raw)
In-Reply-To: <20191210012036.GB19213@dread.disaster.area>
On 12/10/19 4:20 AM, Dave Chinner wrote:
> On Fri, Dec 06, 2019 at 09:11:25AM -0800, Shakeel Butt wrote:
>> On Thu, Dec 5, 2019 at 6:10 PM Dave Chinner <david@fromorbit.com> wrote:
>>> If a shrinker is blocking for a long time, then we need to
>>> work to fix the shrinker implementation because blocking is a much
>>> bigger problem than just register/unregister.
>>>
>>
>> Yes, we should be fixing the implementations of all shrinkers and yes
>> it is bigger issue but we can also fix register/unregister isolation
>> issue in parallel. Fixing all shrinkers would a tedious and long task
>> and we should not block fixing isolation issue on it.
>
> "fixing all shrinkers" is a bit of hyperbole - you've identified
> only one instance where blocking is causing you problems. Indeed,
> most shrinkers are already non-blocking and won't cause you any
> problems at all.
>
>>> IOWs, we already know that cycling a global rwsem on every
>>> individual shrinker invocation is going to cause noticable
>>> scalability problems. Hence I don't think that this sort of "cycle
>>> the global rwsem faster to reduce [un]register latency" solution is
>>> going to fly because of the runtime performance regressions it will
>>> introduce....
>>>
>>
>> I agree with your scalability concern (though others would argue to
>> first demonstrate the issue before adding more sophisticated scalable
>> code).
>
> Look at the git history. We *know* this is a problem, so anyone
> arguing that we have to prove it can go take a long walk of a short
> plank....
>
>> Most memory reclaim code is written without the performance or
>> scalability concern, maybe we should switch our thinking.
>
> I think there's a lot of core mm and other developers that would
> disagree with you there. With respect to shrinkers, we've been
> directly concerned about performance and scalability of the
> individual instances as well as the infrastructure for at least the
> last decade....
>
> Cheers,
>
> Dave.
>
Thanks a lot for your replies, now I see that the core of the problem is
in nfs hang, before that I was unsure if it's OK to have such a hang in
do_shrink_slab.
I have a possibly bad idea on how my patch can still work. What if we
use unlock/refcount way only for nfs-shrinkers? It will still give a
performance penalty if one has many nfs mounts, but for those who has
little number of nfs mounts the penalty would be less. And this would be
a small isolation improvement for nfs users.
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
next prev parent reply other threads:[~2019-12-19 10:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 21:45 Pavel Tikhomirov
2019-12-02 16:36 ` Andrey Ryabinin
2019-12-03 0:13 ` Shakeel Butt
2019-12-03 11:03 ` Kirill Tkhai
2019-12-05 3:13 ` Pavel Tikhomirov
2019-12-06 2:09 ` Dave Chinner
2019-12-06 10:09 ` Michal Hocko
2019-12-06 17:11 ` Shakeel Butt
2019-12-10 1:20 ` Dave Chinner
2019-12-19 10:35 ` Pavel Tikhomirov [this message]
2019-12-03 11:38 ` Kirill Tkhai
2019-12-05 3:29 ` Pavel Tikhomirov
2019-12-04 8:35 ` Michal Hocko
2019-12-19 10:20 ` Pavel Tikhomirov
2022-10-18 3:48 ` Zhang Tianci
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=ed839995-9f49-19b6-a46a-5f777cd8f52b@virtuozzo.com \
--to=ptikhomirov@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=anna.schumaker@netapp.com \
--cc=aryabinin@virtuozzo.com \
--cc=bfields@fieldses.org \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=chuck.lever@oracle.com \
--cc=david@fromorbit.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=khorenko@virtuozzo.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=shakeelb@google.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=trond.myklebust@hammerspace.com \
--cc=vdavydov.dev@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yang.shi@linux.alibaba.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