mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
procfs: 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 procfs. Link: http://lkml.kernel.org/r/20170719014603.19029-14-dave@stgolabs.net Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f2686bb486
commit
410bd5ecb2
4 changed files with 17 additions and 15 deletions
|
@ -210,7 +210,7 @@ struct proc_dir_entry proc_root = {
|
|||
.proc_iops = &proc_root_inode_operations,
|
||||
.proc_fops = &proc_root_operations,
|
||||
.parent = &proc_root,
|
||||
.subdir = RB_ROOT,
|
||||
.subdir = RB_ROOT_CACHED,
|
||||
.name = "/proc",
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue