fuse: Optimize request_end() by not taking fiq->waitq.lock
authorKirill Tkhai <ktkhai@virtuozzo.com>
Thu, 8 Nov 2018 09:05:25 +0000 (12:05 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 13 Feb 2019 12:15:13 +0000 (13:15 +0100)
commit217316a601016d0d2913290070e6338576ae73f6
tree018240bc0794d5702b9eaca6a7b392bff21eb5fd
parent8da6e9183275c837e7d2401b3018ff81f657a19a
fuse: Optimize request_end() by not taking fiq->waitq.lock

We take global fiq->waitq.lock every time, when we are in this function,
but interrupted requests are just small subset of all requests. This patch
optimizes request_end() and makes it to take the lock when it's really
needed.

queue_interrupt() needs small change for that. After req is linked to
interrupt list, we do smp_mb() and check for FR_FINISHED again. In case of
FR_FINISHED bit has appeared, we remove req and leave the function:

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c