fuse: give wakeup hints to the scheduler
Use synchronous wakeup interface to wakeup the userspace daemon. Scheduler can make use of this hint to find a better CPU for the waker task. Change-Id: I7d077235f9b8fe771869dd7e6fccee7d356d858b Suggested-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
This commit is contained in:
parent
85866d270d
commit
4e2e0b5cf0
1 changed files with 9 additions and 5 deletions
|
@ -327,12 +327,16 @@ static u64 fuse_get_unique(struct fuse_iqueue *fiq)
|
|||
return ++fiq->reqctr;
|
||||
}
|
||||
|
||||
static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req)
|
||||
static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req,
|
||||
bool sync)
|
||||
{
|
||||
req->in.h.len = sizeof(struct fuse_in_header) +
|
||||
len_args(req->in.numargs, (struct fuse_arg *) req->in.args);
|
||||
list_add_tail(&req->list, &fiq->pending);
|
||||
wake_up(&fiq->waitq);
|
||||
if (sync)
|
||||
wake_up_sync(&fiq->waitq);
|
||||
else
|
||||
wake_up(&fiq->waitq);
|
||||
kill_fasync(&fiq->fasync, SIGIO, POLL_IN);
|
||||
}
|
||||
|
||||
|
@ -368,7 +372,7 @@ static void flush_bg_queue(struct fuse_conn *fc)
|
|||
fc->active_background++;
|
||||
spin_lock(&fiq->lock);
|
||||
req->in.h.unique = fuse_get_unique(fiq);
|
||||
queue_request(fiq, req);
|
||||
queue_request(fiq, req, 0);
|
||||
spin_unlock(&fiq->lock);
|
||||
}
|
||||
}
|
||||
|
@ -497,7 +501,7 @@ static void __fuse_request_send(struct fuse_conn *fc, struct fuse_req *req)
|
|||
req->out.h.error = -ENOTCONN;
|
||||
} else {
|
||||
req->in.h.unique = fuse_get_unique(fiq);
|
||||
queue_request(fiq, req);
|
||||
queue_request(fiq, req, 1);
|
||||
/* acquire extra reference, since request is still needed
|
||||
after request_end() */
|
||||
__fuse_get_request(req);
|
||||
|
@ -637,7 +641,7 @@ static int fuse_request_send_notify_reply(struct fuse_conn *fc,
|
|||
req->in.h.unique = unique;
|
||||
spin_lock(&fiq->lock);
|
||||
if (fiq->connected) {
|
||||
queue_request(fiq, req);
|
||||
queue_request(fiq, req, 0);
|
||||
err = 0;
|
||||
}
|
||||
spin_unlock(&fiq->lock);
|
||||
|
|
Loading…
Reference in a new issue