All of lore.kernel.org
 help / color / mirror / Atom feed
* + epoll-optimize-setting-task-running-after-blocking.patch added to -mm tree
@ 2015-02-09 21:46 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2015-02-09 21:46 UTC (permalink / raw)
  To: dave, dbueso, viro, mm-commits


The patch titled
     Subject: epoll: optimize setting task running after blocking
has been added to the -mm tree.  Its filename is
     epoll-optimize-setting-task-running-after-blocking.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/epoll-optimize-setting-task-running-after-blocking.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/epoll-optimize-setting-task-running-after-blocking.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Davidlohr Bueso <dave@stgolabs.net>
Subject: 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_INTERRUPTABLE).  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>
---

 fs/eventpoll.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN fs/eventpoll.c~epoll-optimize-setting-task-running-after-blocking fs/eventpoll.c
--- a/fs/eventpoll.c~epoll-optimize-setting-task-running-after-blocking
+++ a/fs/eventpoll.c
@@ -1639,9 +1639,9 @@ fetch_events:
 
 			spin_lock_irqsave(&ep->lock, flags);
 		}
-		__remove_wait_queue(&ep->wq, &wait);
 
-		set_current_state(TASK_RUNNING);
+		__remove_wait_queue(&ep->wq, &wait);
+		__set_current_state(TASK_RUNNING);
 	}
 check_events:
 	/* Is it worth to try to dig for events ? */
_

Patches currently in -mm which might be from dave@stgolabs.net are

epoll-optimize-setting-task-running-after-blocking.patch
signal-use-current-state-helpers.patch
ipcsem-use-current-state-helpers.patch
linux-next.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-09 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-09 21:46 + epoll-optimize-setting-task-running-after-blocking.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.