lkml.org 
[lkml]   [2009]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] procfs: provide stack information for threads
On Thu, 04 Jun 2009 13:56:29 +0200 Stefani Seibold <stefani@seibold.net> wrote:

>
> Am Donnerstag, den 04.06.2009, 04:37 -0700 schrieb Andrew Morton:
> > On Thu, 04 Jun 2009 13:23:48 +0200 Stefani Seibold <stefani@seibold.net> wrote:
> > > - slime done
> >
> > What's "slime"?
> >
>
> Sorry, that was a typo, should be "slim down".

heh, OK. Good typo.

> > > + for (i = vma->vm_start; i+PAGE_SIZE <= stkpage; i += PAGE_SIZE) {
> > > +
> > > + page = follow_page(vma, i, 0);
> > > +
> > > + if (!IS_ERR(page) && page)
> >
> > Shouldn't this be !page?
> >
>
> No, this is correct... I walk through the top of vma to the first mapped
> page, this is the high water mark of the stack.

Ah, duh, OK.

> > > + unsigned long stack_start;
> > > +
> > > + stack_start =
> > > + ((struct proc_maps_private *)
> > > + m->private)->task->stack_start;
> >
> > I'd suggested a clearer/cleaner way of implementing this.
> >
>
> Sorry, i can not see a problem here. In your last posting you wrote
> thats okay! And i have no idea how to make this expression
> clearer/cleaner.

Add a new intermediate variable:
unsigned long stack_start;
struct proc_maps_private *pmp;

pmp = m->private;
stack_start = pmp->task->stack_start;




\
 
 \ /
  Last update: 2009-06-04 20:01    [W:0.053 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site