lkml.org 
[lkml]   [2015]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC][PATCH] procfs: Add /proc/<pid>/mapped_files
From
On 14 January 2015 at 19:43, Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> Just thinking out loud: Could one simply mark a VMA as being used for
> stack during the clone call (is there room in vm_flags, or does
> VM_GROWSDOWN already tell the whole story?), and then write the TID into
> a new field in the VMA - I think one could make a union with vm_pgoff so
> as not to enlarge the structure.

vm_flags does not have space IIRC (that was my first approach at
implementing this) and VM_GROWSDOWN is not sufficient. If we can make
a union with vm_pgoff like you say, we probably don't need a flag
value; a non-zero value could indicate that it is a thread stack.

One problem with caching the value on clone like this though is that
the stack could change due to a setcontext, but AFAICT we don't care
about that for the process stack either.

Siddhesh
--
http://siddhesh.in


\
 
 \ /
  Last update: 2015-01-14 16:01    [W:0.216 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site