remarkable-linux/fs/proc
KOSAKI Motohiro 1306d603fc proc: partially revert "procfs: provide stack information for threads"
Commit d899bf7b (procfs: provide stack information for threads) introduced
to show stack information in /proc/{pid}/status.  But it cause large
performance regression.  Unfortunately /proc/{pid}/status is used ps
command too and ps is one of most important component.  Because both to
take mmap_sem and page table walk are heavily operation.

If many process run, the ps performance is,

[before d899bf7b]

% perf stat ps >/dev/null

 Performance counter stats for 'ps':

     4090.435806  task-clock-msecs         #      0.032 CPUs
             229  context-switches         #      0.000 M/sec
               0  CPU-migrations           #      0.000 M/sec
             234  page-faults              #      0.000 M/sec
      8587565207  cycles                   #   2099.425 M/sec
      9866662403  instructions             #      1.149 IPC
      3789415411  cache-references         #    926.409 M/sec
        30419509  cache-misses             #      7.437 M/sec

   128.859521955  seconds time elapsed

[after d899bf7b]

% perf stat  ps  > /dev/null

 Performance counter stats for 'ps':

     4305.081146  task-clock-msecs         #      0.028 CPUs
             480  context-switches         #      0.000 M/sec
               2  CPU-migrations           #      0.000 M/sec
             237  page-faults              #      0.000 M/sec
      9021211334  cycles                   #   2095.480 M/sec
     10605887536  instructions             #      1.176 IPC
      3612650999  cache-references         #    839.160 M/sec
        23917502  cache-misses             #      5.556 M/sec

   152.277819582  seconds time elapsed

Thus, this patch revert it. Fortunately /proc/{pid}/task/{tid}/smaps
provide almost same information. we can use it.

Commit d899bf7b introduced two features:

 1) Add the annotattion of [thread stack: xxxx] mark to
    /proc/{pid}/task/{tid}/maps.
 2) Add StackUsage field to /proc/{pid}/status.

I only revert (2), because I haven't seen (1) cause regression.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-11 09:34:06 -08:00
..
array.c proc: partially revert "procfs: provide stack information for threads" 2010-01-11 09:34:06 -08:00
base.c elf: kill USE_ELF_CORE_DUMP 2009-12-16 07:20:12 -08:00
cmdline.c
cpuinfo.c
devices.c
generic.c proc: rename de_get() to pde_get() and inline it 2009-12-16 07:19:57 -08:00
inode.c proc: rename de_get() to pde_get() and inline it 2009-12-16 07:19:57 -08:00
internal.h proc: rename de_get() to pde_get() and inline it 2009-12-16 07:19:57 -08:00
interrupts.c
Kconfig
kcore.c fs: includecheck fix: proc, kcore.c 2009-10-08 07:36:38 -07:00
kmsg.c
loadavg.c
Makefile
meminfo.c hwpoison: fix/proc/meminfo alignment 2009-10-29 07:39:25 -07:00
mmu.c
nommu.c seq_file: constify seq_operations 2009-09-23 07:39:29 -07:00
page.c mm: export stable page flags 2009-12-16 12:19:59 +01:00
proc_devtree.c Convert /proc/device-tree/ to seq_file 2009-10-30 17:20:51 +11:00
proc_net.c
proc_sysctl.c sysctl: Don't look at ctl_name and strategy in the generic code 2009-11-11 00:53:43 -08:00
proc_tty.c
root.c
softirqs.c
stat.c sched, cpuacct: Fix niced guest time accounting 2009-10-25 17:31:30 +01:00
task_mmu.c mm hugetlb: add hugepage support to pagemap 2009-12-15 08:53:24 -08:00
task_nommu.c procfs: use proper units for noMMU statm 2009-12-15 08:53:24 -08:00
uptime.c [PATCH] Fix idle time field in /proc/uptime 2009-09-24 10:16:24 +02:00
version.c
vmcore.c