aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <[email protected]>2018-04-10 23:32:20 +0000
committerLinus Torvalds <[email protected]>2018-04-11 17:28:34 +0000
commit4f1134370a29a5f2d0f4b4be4c5e2fddd38f0f9d (patch)
tree0fcae1f568cf1c2870f615e214f3e92a77afcd30 /fs/proc/internal.h
parentproc: selftests: shotgun testing of read/readdir/readlink/write (diff)
downloadkernel-4f1134370a29a5f2d0f4b4be4c5e2fddd38f0f9d.tar.gz
kernel-4f1134370a29a5f2d0f4b4be4c5e2fddd38f0f9d.zip
proc: use slower rb_first()
In a typical for /proc "open+read+close" usecase, dentry is looked up successfully on open only to be killed in dput() on close. In fact dentries which aren't /proc/*/... and /proc/sys/* were almost NEVER CACHED. Simple printk in proc_lookup_de() shows that. Now that ->delete hook intelligently picks which dentries should live in dcache and which should not, rbtree caching is not necessary as dcache does it job, at last! As a side effect, struct proc_dir_entry shrinks by one pointer which can go into inline name. Link: http://lkml.kernel.org/r/20180314231032.GA15854@avx2 Signed-off-by: Alexey Dobriyan <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r--fs/proc/internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index b7024f174778..0f1692e63cb6 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -51,15 +51,15 @@ struct proc_dir_entry {
kgid_t gid;
loff_t size;
struct proc_dir_entry *parent;
- struct rb_root_cached subdir;
+ struct rb_root subdir;
struct rb_node subdir_node;
char *name;
umode_t mode;
u8 namelen;
#ifdef CONFIG_64BIT
-#define SIZEOF_PDE_INLINE_NAME (192-147)
+#define SIZEOF_PDE_INLINE_NAME (192-139)
#else
-#define SIZEOF_PDE_INLINE_NAME (128-91)
+#define SIZEOF_PDE_INLINE_NAME (128-87)
#endif
char inline_name[SIZEOF_PDE_INLINE_NAME];
} __randomize_layout;