Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1312553
| From | Andrew Morton <akpm@linux-foundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation |
| Date | 2016-01-19 23:20 +0100 |
| Message-ID | <qSMN3-5zF-7@gated-at.bofh.it> (permalink) |
| References | <qSIT9-33H-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 19 Jan 2016 13:02:39 -0500 Johannes Weiner <hannes@cmpxchg.org> wrote:
> b764375 ("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 threads. 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.
Four years ago, ouch.
Any thoughts on the obvious back-compatibility concerns? ie, why did
Siddhesh implement this in the first place? My bad for not ensuring
that the changelog told us this.
https://lkml.org/lkml/2012/1/14/25 has more info:
: Memory mmaped by glibc for a thread stack currently shows up as a
: simple anonymous map, which makes it difficult to differentiate between
: memory usage of the thread on stack and other dynamic allocation.
: Since glibc already uses MAP_STACK to request this mapping, the
: attached patch uses this flag to add additional VM_STACK_FLAGS to the
: resulting vma so that the mapping is treated as a stack and not any
: regular anonymous mapping. Also, one may use vm_flags to decide if a
: vma is a stack.
But even that doesn't really tell us what the actual *value* of the
patch is to end-users.
I note that this patch is a partial revert - the smaps and numa_maps
parts of b764375 remain in place. What's up with that?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Johannes Weiner <hannes@cmpxchg.org> - 2016-01-19 19:10 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Andrew Morton <akpm@linux-foundation.org> - 2016-01-19 23:20 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Johannes Weiner <hannes@cmpxchg.org> - 2016-01-20 00:40 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-01-20 00:40 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2016-01-20 04:30 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> - 2016-01-20 04:20 +0100
Re: [PATCH] proc: revert /proc/<pid>/maps [stack:TID] annotation Andrew Morton <akpm@linux-foundation.org> - 2016-01-20 06:30 +0100
[PATCH] proc: add missing 'mm' variable in nommu is_stack() Arnd Bergmann <arnd@arndb.de> - 2016-01-21 12:00 +0100
csiph-web