archive mirror
 help / color / mirror / Atom feed
From: Kirill Tkhai <>
To: Miklos Szeredi <>
Subject: Re: [PATCH 2/2] fuse: Move clear_bit() up in request_end()
Date: Tue, 7 Aug 2018 15:32:25 +0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 07.08.2018 15:22, Miklos Szeredi wrote:
> On Tue, Jul 31, 2018 at 12:25 PM, Kirill Tkhai <> wrote:
>> Nobody can clear FR_BACKGROUND bit on processing
>> request in parallel, so it's possible to do it
>> out of fc->lock.
> Moving such a cheap operation outside the splinlock won't make any
> difference in real life.

It's not about difference in real life, it's about readability.
Testing the bit outside the lock and clearing it inside the lock
confuses a reader, and makes he to thing there is a tricky synchronization,
while there is no tricky synchronization.

> And anyway the biggest problem with fc->lock is not contention (hold
> for long period of time), I would guess, but cachline pingponging
> (being acquired on different CPUs one after the other).
> So there's definitely work to do regarding locking in fuse, but it
> needs a bigger axe.

I've moved background stuff at a separate lock in my sandbox tree,
and this was pretty easy. Not yet sent to you, since I'm going to do
some performance testing on this. I've locked for tests used to measure
the performance in fuse git log, but there is no one pointing in the log
I found. Could you tell, what fuse driver do you use to measure performance
and which test you use?


      reply	other threads:[~2018-08-07 14:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 10:25 [PATCH 0/2] fuse: Small cleanup series Kirill Tkhai
2018-07-31 10:25 ` [PATCH 1/2] fuse: Use list_first_entry() in flush_bg_queue() Kirill Tkhai
2018-08-07 12:26   ` Miklos Szeredi
2018-07-31 10:25 ` [PATCH 2/2] fuse: Move clear_bit() up in request_end() Kirill Tkhai
2018-08-07 12:22   ` Miklos Szeredi
2018-08-07 12:32     ` Kirill Tkhai [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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).