This is the mail archive of the systemtap@sources.redhat.com mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hitachi djprobe mechanism


On Sun, Jul 31, 2005 at 06:59:41PM -0400, Mathieu Desnoyers wrote:
> * Andi Kleen (ak@suse.de) wrote:
> > 
> > One way would be to just search the task list for any tasks blocked with an IP
> > inside the patched region. If yes rewait for another quiescent period.
> > 
> > 
> 
> If you stop other cpus'scheduler when you do that, then it's ok.

You don't need to stop them, a snapshot of the task list is enough
since you only care about preempted sleeping processes at a single 
point of time.

Anyways, this discussion is theoretic because the IPI approach
is probably better.

> 
> I just though about an interesting way to implement the IPI, which would work
> very well (and safely) for any case where the instruction to overwrite is >= 5
> bytes. The idea :
> 
> - Send IPI to each other cpu
>   IP args : * address we plan to write to
>             * the new instruction we plan to write
>   (The IPI handler could then make an infinite loop, reading the address,
>   waiting for it to contain the new instruction.)

Seems far too complicated, just make it spin on a lock during the modification.


-Andi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]