From: Muchun Song <songmuchun@bytedance.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: adobriyan@gmail.com, ast@kernel.org, daniel@iogearbox.net,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com,
john.fastabend@gmail.com, kpsingh@chromium.org,
ebiederm@xmission.com, bernd.edlinger@hotmail.de,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [External] Re: [PATCH] files: Use rcu lock to get the file structures for better performance
Date: Fri, 22 May 2020 00:06:46 +0800 [thread overview]
Message-ID: <CAMZfGtVxPevhTy8LMpKUtkk1jX86doiPD0nOTRuKg25+8Vz=ag@mail.gmail.com> (raw)
In-Reply-To: <20200521152117.GC28818@bombadil.infradead.org>
On Thu, May 21, 2020 at 11:21 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Thu, May 21, 2020 at 08:38:35PM +0800, Muchun Song wrote:
> > There is another safe way to get the file structure without
> > holding the files->file_lock. That is rcu lock, and this way
> > has better performance. So use the rcu lock instead of the
> > files->file_lock.
>
> What makes you think this is safe? Are you actually seeing contention
> on this spinlock?
>
I have read the doc which is in the Documentation/filesystems/files.txt.
If my understanding is correct, I think it is safe to use rcu lock.
Thanks.
--
Yours,
Muchun
next prev parent reply other threads:[~2020-05-21 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 12:38 [PATCH] files: Use rcu lock to get the file structures for better performance Muchun Song
2020-05-21 15:21 ` Matthew Wilcox
2020-05-21 16:06 ` Muchun Song [this message]
2020-05-21 16:16 ` [External] " Greg KH
2020-05-21 16:47 ` Matthew Wilcox
2020-05-22 7:52 ` [External] " Muchun Song
2020-05-22 11:43 ` Matthew Wilcox
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='CAMZfGtVxPevhTy8LMpKUtkk1jX86doiPD0nOTRuKg25+8Vz=ag@mail.gmail.com' \
--to=songmuchun@bytedance.com \
--cc=adobriyan@gmail.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bernd.edlinger@hotmail.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=ebiederm@xmission.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=willy@infradead.org \
--cc=yhs@fb.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;
as well as URLs for NNTP newsgroup(s).