]> git.baikalelectronics.ru Git - kernel.git/commit
fs/epoll: use faster rb_first_cached()
authorDavidlohr Bueso <dave@stgolabs.net>
Fri, 8 Sep 2017 23:15:18 +0000 (16:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 9 Sep 2017 01:26:49 +0000 (18:26 -0700)
commit96b919fba8b193412773f1088f124045c62bfab8
tree8fefe90ed4da5ac94000fd160d42c5c39a225670
parent60fc4f31543752ecae025b1b52f9903e67ff138a
fs/epoll: use faster rb_first_cached()

...  such that we can avoid the tree walks to get the node with the
smallest key.  Semantically the same, as the previously used rb_first(),
but O(1).  The main overhead is the extra footprint for the cached rb_node
pointer, which should not matter for epoll.

Link: http://lkml.kernel.org/r/20170719014603.19029-15-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c