diff options
| author | Davidlohr Bueso <[email protected]> | 2017-09-08 23:15:15 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-09-09 01:26:49 +0000 |
| commit | 410bd5ecb276593e7ec1552014083215d4a43c3a (patch) | |
| tree | 3d507f3ba123be043d8a4e7582c8a48a0f71cb07 /fs/proc/root.c | |
| parent | lib/interval-tree: correct comment wrt generic flavor (diff) | |
| download | kernel-410bd5ecb276593e7ec1552014083215d4a43c3a.tar.gz kernel-410bd5ecb276593e7ec1552014083215d4a43c3a.zip | |
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/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/root.c')
| -rw-r--r-- | fs/proc/root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index deecb397daa3..926fb27f4ca2 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -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", }; |
