]> www.infradead.org Git - users/willy/linux.git/commit
fs/epoll: avoid barrier after an epoll_wait(2) timeout
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 5 Dec 2018 00:14:08 +0000 (11:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 6 Dec 2018 22:09:01 +0000 (09:09 +1100)
commit58f26c84d9f09a123adca39fd7fbb0b85a8a813f
tree2c1c64fe98b562739acfddbaf05b4b62750741a9
parent80cbd68a11d80cbbb4d84ad0ae55fd7ecd986213
fs/epoll: avoid barrier after an epoll_wait(2) timeout

Upon timeout, we can just exit out of the loop, without the cost of the
changing the task's state with an smp_store_mb call.  Just exit out of the
loop and be done - setting the task state afterwards will be, of course,
redundant.

Link: http://lkml.kernel.org/r/20181108051006.18751-7-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Jason Baron <jbaron@akamai.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
fs/eventpoll.c