tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch



On Tue, Feb 26, 2008 at 12:55:29PM +0900, YAMAMOTO Takashi wrote:

> > Module Name:        src
> > Committed By:       ad
> > Date:               Thu Feb 21 16:31:13 UTC 2008
> > 
> > Modified Files:
> >     src/sys/arch/amd64/include: types.h
> >     src/sys/arch/i386/include: types.h
> > 
> > Log Message:
> > #define __HAVE_ATOMIC_AS_MEMBAR, indicating that:
> > 
> > - atomic_cas_ni() does an implicit membar_exit()
> > - all other atomic operations do an implicit membar_sync()
> > 
> > While this might seem kind of arbitrary it's the basis for some important
> > optimizations.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -r1.25 -r1.26 src/sys/arch/amd64/include/types.h
> > cvs rdiff -r1.58 -r1.59 src/sys/arch/i386/include/types.h
> > 
> > Please note that diffs are not public domain; they are subject to the
> > copyright notices on the relevant files.
> 
> freebsd has acq/rel variants of atomic ops.
> have you considered something similar?

It occurred to me yesterday that we may want something similar for some
of the places that we are doing reference counting. Memory accesses being
reordered around raise or final drop of a reference count could cause
problems.

Andrew


Home | Main Index | Thread Index | Old Index