From: Namhyung Kim Subject: [PATCH 5/5] pipe: Do not use sync wakeups Date: Sun, 29 Sep 2013 15:14:38 +0900 Message-ID: <1380435278-10927-5-git-send-email-namhyung@kernel.org> References: <1380435278-10927-1-git-send-email-namhyung@kernel.org> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra To: Alexander Viro Return-path: In-Reply-To: <1380435278-10927-1-git-send-email-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Sync wakeup is a hint to the scheduler that means a waker would go to sleep right soon. So don't use the sync wakeup unless it guarantees to sleep. Cc: Ingo Molnar Cc: Peter Zijlstra Signed-off-by: Namhyung Kim --- fs/pipe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index d2c45e14e6d8..58f4b9b009da 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -479,7 +479,7 @@ redo: /* Signal writers asynchronously that there is more room. */ if (do_wakeup) { - wake_up_interruptible_sync_poll(&pipe->wait, POLLOUT | POLLWRNORM); + wake_up_interruptible_poll(&pipe->wait, POLLOUT | POLLWRNORM); kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); } if (ret > 0) @@ -660,7 +660,7 @@ redo2: out: __pipe_unlock(pipe); if (do_wakeup) { - wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLRDNORM); + wake_up_interruptible_poll(&pipe->wait, POLLIN | POLLRDNORM); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); } if (ret > 0) { @@ -739,7 +739,7 @@ pipe_release(struct inode *inode, struct file *file) pipe->writers--; if (pipe->readers || pipe->writers) { - wake_up_interruptible_sync_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP); + wake_up_interruptible_poll(&pipe->wait, POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM | POLLERR | POLLHUP); kill_fasync(&pipe->fasync_readers, SIGIO, POLL_IN); kill_fasync(&pipe->fasync_writers, SIGIO, POLL_OUT); } -- 1.7.9.2