lkml.org 
[lkml]   [2006]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.17-rc6 7/9] Remove some of the kmemleak false positives
On 14/06/06, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
> > This seems pretty over-engineered. I wouldn't go this far unless
> > you're actually seeing performance/correctness problems, and a simple
> > with/without pointers flag isn't enough. It also doesn't address the
> > most troublesome source of false pointers: stacks. There is all sorts
> > of junk lying around on stacks, and you can have an old dead pointer
> > sitting there pinning old dead memory for a long time.
>
> in an earlier thread i suggested to not scan kernel stacks at all, but
> to delay the registration of new blocks to return-from-syscall time (via
> having a per-task list of newly allocated but not yet registered
> blocks). That way we dont get false positives for stuff that is on the
> kernel stack temporarily and then freed, and we correctly register newly
> allocated blocks as well.

I didn't have time to try this idea. However, the number of false
positives doesn't seem to be increased (or they are only reported
temporarily) if you don't scan the stacks at all (especially if you
scan the memory at a relatively quiet time). That's why I added a
config option for this.

The problem looks a bit more complicated for kernel threads as they
always use the kernel stack.

Another idea would be to only scan the stacks of the sleeping tasks
(and you could also get the frame pointer from the call to the
schedule function).

--
Catalin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-14 15:48    [W:0.072 / U:1.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site