[Devel] [PATCH RHEL7 COMMIT] ms/fuse: Wake up req->waitq of only if not background
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Apr 3 12:49:29 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.94.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.10
------>
commit eb55312dac35fb34dd49ec2acd4f532b7a8d1f49
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Wed Apr 3 12:49:27 2019 +0300
ms/fuse: Wake up req->waitq of only if not background
ms commit 5e0fed717a38
Currently, we wait on req->waitq in request_wait_answer() function only,
and it's never used for background requests. Since wake_up() is not a
light-weight macros, instead of this, it unfolds in really called function,
which makes locking operations taking some cpu cycles, let's avoid its call
for the case we definitely know it's completely useless.
Signed-off-by: Miklos Szeredi <mszeredi at redhat.com>
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
fs/fuse/dev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 18379fa9ca12..269753235c60 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -472,7 +472,8 @@ void request_end(struct fuse_conn *fc, struct fuse_req *req)
if (!bg)
req->end = NULL;
}
- wake_up(&req->waitq);
+ if (!bg)
+ wake_up(&req->waitq);
fuse_put_request(fc, req);
}
EXPORT_SYMBOL_GPL(request_end);
More information about the Devel
mailing list