Messages in this thread | | | Subject | Re: [PATCH 1/11] oprofile: add check_user_page_readable() | From | Greg Banks <> | Date | Tue, 09 Nov 2004 22:52:45 +1100 |
| |
On Tue, 2004-11-09 at 22:26, Andrew Morton wrote: > > The i386 callgraph code attempts to follow user stacks, from > > an interrupt (perfmon, NMI, or timer) > > Yikes.
There are a number of problems with this, for example modern libcs built with -fomit-frame-pointer limit it's usefulness. But when it does get meaningful traces it's really quite useful.
> > > And why is that usage > > > pattern not racy in the presence of paging activity? > > > > The i386 backtracer takes the ¤t->mm->page_table_lock, > > But that cannot be taken from interrupt context. A trylock would be OK I > guess.
The code reads:
#ifdef CONFIG_SMP if (!spin_trylock(¤t->mm->page_table_lock)) return; #endif
i.e. it tries to get the lock and abandons the trace if it can't.
Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI.
- 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/
| |