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





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



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