[prev in list] [next in list] [prev in thread] [next in thread] 

List:       oprofile-list
Subject:    Re: Profiling functions on the call stack
From:       David Smith <dsmith () algonet ! se>
Date:       2002-08-29 15:22:01
[Download RAW message or body]

Sorry, there are problems with this patch.

1. The interrupt can occur in the middle of a task switch, which means
that  current->active_mm may not be the actual active memory structure.
That is fine (or at least stable) as long as the mm struct is not used
in anything critical (page table lookup is using %cr3 directly instead
of the mm struct, and that's the only really critical point).
However, using current->active_mm->page_table_lock against races on
SMP will not work without other changes.

2. If the interrupt occurs in a page fault, the page table might have
been updated in memory but still not reloaded by the CPU (I havn't 
managed to get this error while testing, but I can't see anything 
currently preventing it.)

All in all, unless someone has a solution to theese problems (or makes
a gordian cut and just tells me how to access user memory safely from
an interrupt :-) I'll just have to think this over a bit and come back
when and if I can fix those problems.

/David


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic