remarkable-linux/fs/proc
Johannes Weiner 65376df582 proc: revert /proc/<pid>/maps [stack:TID] annotation
Commit b76437579d ("procfs: mark thread stack correctly in
proc/<pid>/maps") added [stack:TID] annotation to /proc/<pid>/maps.

Finding the task of a stack VMA requires walking the entire thread list,
turning this into quadratic behavior: a thousand threads means a
thousand stacks, so the rendering of /proc/<pid>/maps needs to look at a
million combinations.

The cost is not in proportion to the usefulness as described in the
patch.

Drop the [stack:TID] annotation to make /proc/<pid>/maps (and
/proc/<pid>/numa_maps) usable again for higher thread counts.

The [stack] annotation inside /proc/<pid>/task/<tid>/maps is retained, as
identifying the stack VMA there is an O(1) operation.

Siddesh said:
 "The end users needed a way to identify thread stacks programmatically and
  there wasn't a way to do that.  I'm afraid I no longer remember (or have
  access to the resources that would aid my memory since I changed
  employers) the details of their requirement.  However, I did do this on my
  own time because I thought it was an interesting project for me and nobody
  really gave any feedback then as to its utility, so as far as I am
  concerned you could roll back the main thread maps information since the
  information is available in the thread-specific files"

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Cc: Shaohua Li <shli@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-03 08:28:43 -08:00
..
array.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-01-20 17:09:18 -08:00
base.c proc read mm's {arg,env}_{start,end} with mmap semaphore taken. 2016-01-20 17:09:18 -08:00
cmdline.c
consoles.c
cpuinfo.c
devices.c
fd.c proc: add a reschedule point in proc_readfd_common() 2016-01-09 02:56:10 -05:00
fd.h
generic.c proc: change proc_subdir_lock to a rwlock 2015-09-10 13:29:01 -07:00
inode.c kmemcg: account certain kmem allocations to memcg 2016-01-14 16:00:49 -08:00
internal.h proc: Allow creating permanently empty directories that serve as mount points 2015-07-01 10:36:41 -05:00
interrupts.c
Kconfig fs, proc: add help for CONFIG_PROC_CHILDREN 2015-07-17 16:39:52 -07:00
kcore.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
kmsg.c
loadavg.c
Makefile
meminfo.c proc: meminfo: estimate available memory more conservatively 2016-01-14 16:00:49 -08:00
namespaces.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-01-20 17:09:18 -08:00
nommu.c vfs: add seq_file_path() helper 2015-06-23 18:01:07 -04:00
page.c mm: differentiate page_mapped() from page_mapcount() for compound pages 2016-01-15 17:56:32 -08:00
proc_net.c
proc_sysctl.c fs: Drop unlikely before IS_ERR(_OR_NULL) 2015-09-29 15:13:58 +02:00
proc_tty.c
root.c vfs: Commit to never having exectuables on proc and sysfs. 2015-07-10 10:39:25 -05:00
self.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
softirqs.c
stat.c
task_mmu.c proc: revert /proc/<pid>/maps [stack:TID] annotation 2016-02-03 08:28:43 -08:00
task_nommu.c proc: revert /proc/<pid>/maps [stack:TID] annotation 2016-02-03 08:28:43 -08:00
thread_self.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
uptime.c
version.c
vmcore.c