kernel-ark/fs/proc
Alexey Dobriyan 335eb53158 proc: faster /proc/$PID lookup
Currently lookup for /proc/$PID first goes through spinlock and whole list
of misc /proc entries only to confirm that, yes, /proc/42 can not possibly
match random proc entry.

List is is several dozens entries long (52 entries on my setup).

None of this is necessary.

Try to convert dentry name to integer first.
If it works, it must be /proc/$PID.
If it doesn't, it must be random proc entry.

Based on patch from Al Viro.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-08 15:57:22 -07:00
..
array.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2014-08-06 08:06:39 -07:00
base.c proc: faster /proc/$PID lookup 2014-08-08 15:57:22 -07:00
cmdline.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
consoles.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
cpuinfo.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
devices.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
fd.c proc: add and remove /proc entry create checks 2014-08-08 15:57:22 -07:00
fd.h proc: Move proc_fd() to fs/proc/fd.h 2013-05-01 17:29:39 -04:00
generic.c proc: add and remove /proc entry create checks 2014-08-08 15:57:22 -07:00
inode.c fs/proc/inode.c: use RCU_INIT_POINTER(x, NULL) 2014-04-07 16:36:04 -07:00
internal.h proc: add and remove /proc entry create checks 2014-08-08 15:57:22 -07:00
interrupts.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
Kconfig kcore: add Kconfig help text 2013-11-13 12:09:33 +09:00
kcore.c fs/proc/kcore.c: use PAGE_ALIGN instead of ALIGN(PAGE_SIZE) 2014-08-08 15:57:22 -07:00
kmsg.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
loadavg.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
Makefile of: remove /proc/device-tree 2014-03-11 20:48:32 +00:00
meminfo.c mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces 2014-08-06 18:01:19 -07:00
namespaces.c new helper: readlink_copy() 2014-04-01 23:19:15 -04:00
nommu.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
page.c mm: close PageTail race 2014-03-04 07:55:47 -08:00
proc_net.c [readdir] convert procfs 2013-06-29 12:56:32 +04:00
proc_sysctl.c Don't pass inode to ->d_hash() and ->d_compare() 2013-06-29 12:57:36 +04:00
proc_tty.c proc: use seq_puts()/seq_putc() where possible 2011-01-13 08:03:16 -08:00
root.c proc: faster /proc/$PID lookup 2014-08-08 15:57:22 -07:00
self.c new helper: readlink_copy() 2014-04-01 23:19:15 -04:00
softirqs.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
stat.c /proc/stat: convert to single_open_size() 2014-07-03 09:21:54 -07:00
task_mmu.c mm: softdirty: respect VM_SOFTDIRTY in PTE holes 2014-08-06 18:01:22 -07:00
task_nommu.c seq_file: remove "%n" usage from seq_file users 2013-11-15 09:32:20 +09:00
uptime.c cputime: Default implementation of nsecs -> cputime conversion 2014-03-13 15:56:43 +01:00
version.c fs/proc: don't use module_init for non-modular core code 2014-01-23 16:37:02 -08:00
vmcore.c fs/proc/vmcore.c: remove NULL assignment to static 2014-06-06 16:08:12 -07:00