[PATCH 4/5] splice: Use sync wakeup for splice_from_pipe_next()

From: Namhyung Kim
Date: Sun Sep 29 2013 - 02:15:43 EST


Sync wakeup is a hint to the scheduler that means a waker would go to
sleep right soon. In splice_from_pipe_next(), it calls pipe_wait()
after calling wakeup_pipe_writers() so it'd be better using sync
wakeup rather than normal one.

Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
fs/splice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/splice.c b/fs/splice.c
index 0325e8b0d816..9fb7dc5ef061 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -872,7 +872,7 @@ int splice_from_pipe_next(struct pipe_inode_info *pipe, struct splice_desc *sd)
return -ERESTARTSYS;

if (sd->need_wakeup) {
- wakeup_pipe_writers(pipe, false);
+ wakeup_pipe_writers(pipe, true);
sd->need_wakeup = false;
}

--
1.7.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/