aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2015-02-13 17:39:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:40 -0500
commit4d5755b147665912c938504033d958f1115b68ff (patch)
tree61d7a0fb45a279b10439caaa323373ba6f5729a0 /fs
parent0f3c5aab5e00527eb3167aa9d1725cca9320e01e (diff)
epoll: optimize setting task running after blocking
After waking up a task waiting for an event, we explicitly mark it as TASK_RUNNING (which is necessary as we do the checks for wakeups as TASK_INTERRUPTIBLE). Once running and dealing with actually delivering the events, we're obviously not planning on calling schedule, thus we can relax the implied barrier and simply update the state with __set_current_state(). Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/eventpoll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index d77f94491352..1e009cad8d5c 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1639,9 +1639,9 @@ fetch_events:
1639 1639
1640 spin_lock_irqsave(&ep->lock, flags); 1640 spin_lock_irqsave(&ep->lock, flags);
1641 } 1641 }
1642 __remove_wait_queue(&ep->wq, &wait);
1643 1642
1644 set_current_state(TASK_RUNNING); 1643 __remove_wait_queue(&ep->wq, &wait);
1644 __set_current_state(TASK_RUNNING);
1645 } 1645 }
1646check_events: 1646check_events:
1647 /* Is it worth to try to dig for events ? */ 1647 /* Is it worth to try to dig for events ? */