This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: Hitachi djprobe mechanism
- From: Andi Kleen <ak at suse dot de>
- To: Mathieu Desnoyers <compudj at krystal dot dyndns dot org>
- Cc: Andi Kleen <ak at suse dot de>, Karim Yaghmour <karim at opersys dot com>,Masami Hiramatsu <masami dot hiramatsu at gmail dot com>,Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>,Roland McGrath <roland at redhat dot com>,Richard J Moore <richardj_moore at uk dot ibm dot com>,systemtap at sources dot redhat dot com, sugita at sdl dot hitachi dot co dot jp,Satoshi Oshima <soshima at redhat dot com>, michel dot dagenais at polymtl dot ca
- Date: Mon, 1 Aug 2005 17:37:37 +0200
- Subject: Re: Hitachi djprobe mechanism
- References: <20050728110717.A30199@unix-os.sc.intel.com> <20050728183234.GC18093@Krystal> <20050728133456.A32210@unix-os.sc.intel.com> <20050729055308.GA4200@Krystal> <p73d5p2gi7o.fsf@bragg.suse.de> <20050729155025.GA357@Krystal> <20050730155526.GH3726@bragg.suse.de> <20050730164747.GA5377@Krystal> <20050731220304.GJ3726@bragg.suse.de> <20050731225941.GA14028@Krystal>
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