]> Git Repo - linux.git/commit
proc: use slower rb_first()
authorAlexey Dobriyan <[email protected]>
Tue, 10 Apr 2018 23:32:20 +0000 (16:32 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Apr 2018 17:28:34 +0000 (10:28 -0700)
commit4f1134370a29a5f2d0f4b4be4c5e2fddd38f0f9d
tree0fcae1f568cf1c2870f615e214f3e92a77afcd30
parent05c3f29283af9e3da0ab7414f666cb37f530950a
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]>
fs/proc/generic.c
fs/proc/internal.h
fs/proc/proc_net.c
fs/proc/root.c
This page took 0.050098 seconds and 4 git commands to generate.