This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Re: Hitachi djprobe mechanism
- From: Richard J Moore <richardj_moore at uk dot ibm dot com>
- To: Andi Kleen <ak at suse dot de>
- Cc: ak at suse dot de, Mathieu Desnoyers <compudj at krystal dot dyndns dot org>, Masami Hiramatsu <hiramatu at sdl dot hitachi dot co dot jp>, Karim Yaghmour <karim at opersys dot com>, Masami Hiramatsu <masami dot hiramatsu at gmail dot com>, michel dot dagenais at polymtl dot ca, Roland McGrath <roland at redhat dot com>, Satoshi Oshima <soshima at redhat dot com>, sugita at sdl dot hitachi dot co dot jp, systemtap at sources dot redhat dot com
- Date: Fri, 29 Jul 2005 09:39:03 +0100
- Subject: Re: Hitachi djprobe mechanism
- Sensitivity:
that's a very good point. cmpxchg is not always considered for atomic
storing, though one does have to handle the complication of crossing page
boundaries.
- -
Richard J Moore
IBM Advanced Linux Response Team - Linux Technology Centre
MOBEX: 264807; Mobile (+44) (0)7739-875237
Office: (+44) (0)1962-817072
Andi Kleen
<ak@suse.de>
Sent by: To
ak@suse.de Mathieu Desnoyers
<compudj@krystal.dyndns.org>
cc
29/07/2005 Karim Yaghmour <karim@opersys.com>,
08:54 Masami Hiramatsu
<masami.hiramatsu@gmail.com>, Masami
Hiramatsu
<hiramatu@sdl.hitachi.co.jp>, Roland
McGrath <roland@redhat.com>, Richard
J Moore/UK/IBM@IBMGB,
systemtap@sources.redhat.com,
sugita@sdl.hitachi.co.jp, Satoshi
Oshima <soshima@redhat.com>,
michel.dagenais@polymtl.ca
bcc
Subject
Re: Hitachi djprobe mechanism
Mathieu Desnoyers <compudj@krystal.dyndns.org> writes:
>
> And as the jmp instruction is 5 bytes, there seems to be no hope to find
an
> atomic operation that will write that.
Any 64bit architecture can write 8 bytes mostly atomically (at least
towards
readers) and many 32bit architectures (like newer x86 with cmpxchg or sse)
can too.
An 8 byte read-modify-store is not protected against multiple writers,
but that is no problem for probes which can protect against that
with a different lock.
x86 could actually do it atomically even for writers with cmpxchg8.
-Andi