Files
linux-stable-mirror/include/linux
Robin Holt 34441427aa revert "procfs: provide stack information for threads" and its fixup commits
Originally, commit d899bf7b ("procfs: provide stack information for
threads") attempted to introduce a new feature for showing where the
threadstack was located and how many pages are being utilized by the
stack.

Commit c44972f1 ("procfs: disable per-task stack usage on NOMMU") was
applied to fix the NO_MMU case.

Commit 89240ba0 ("x86, fs: Fix x86 procfs stack information for threads on
64-bit") was applied to fix a bug in ia32 executables being loaded.

Commit 9ebd4eba7 ("procfs: fix /proc/<pid>/stat stack pointer for kernel
threads") was applied to fix a bug which had kernel threads printing a
userland stack address.

Commit 1306d603f ('proc: partially revert "procfs: provide stack
information for threads"') was then applied to revert the stack pages
being used to solve a significant performance regression.

This patch nearly undoes the effect of all these patches.

The reason for reverting these is it provides an unusable value in
field 28.  For x86_64, a fork will result in the task->stack_start
value being updated to the current user top of stack and not the stack
start address.  This unpredictability of the stack_start value makes
it worthless.  That includes the intended use of showing how much stack
space a thread has.

Other architectures will get different values.  As an example, ia64
gets 0.  The do_fork() and copy_process() functions appear to treat the
stack_start and stack_size parameters as architecture specific.

I only partially reverted c44972f1 ("procfs: disable per-task stack usage
on NOMMU") .  If I had completely reverted it, I would have had to change
mm/Makefile only build pagewalk.o when CONFIG_PROC_PAGE_MONITOR is
configured.  Since I could not test the builds without significant effort,
I decided to not change mm/Makefile.

I only partially reverted 89240ba0 ("x86, fs: Fix x86 procfs stack
information for threads on 64-bit") .  I left the KSTK_ESP() change in
place as that seemed worthwhile.

Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Stefani Seibold <stefani@seibold.net>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-11 17:33:41 -07:00
..
2008-02-06 10:41:02 -08:00
2010-04-25 08:54:42 +02:00
2009-06-11 21:36:09 -04:00
2007-02-09 17:39:36 -05:00
2009-11-04 09:50:58 -08:00
2010-04-23 10:39:48 -07:00
2006-10-02 07:57:12 -07:00
2010-03-16 08:55:32 +01:00
2009-12-14 23:55:34 +01:00
2010-04-01 01:31:13 -07:00
2010-03-12 15:52:40 -08:00
2005-04-16 15:20:36 -07:00
2010-04-06 10:55:33 -04:00
2009-04-28 07:37:28 +02:00
2010-04-07 08:38:04 -07:00
2006-11-30 04:40:22 +01:00
2008-06-06 11:29:12 -07:00
2010-04-12 07:55:15 -04:00
2008-02-14 21:13:33 -08:00
2009-01-08 08:31:12 -08:00
2006-10-03 23:01:26 +02:00
2009-06-18 13:04:04 -07:00
2009-01-31 00:05:59 +05:30
2007-10-16 09:43:17 -07:00
2009-08-30 22:26:34 +02:00
2009-09-15 16:51:30 +02:00
2010-03-12 10:03:42 +01:00