Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2003 09:15:53 +0100
From:      Doug Rabson <dfr@nlsystems.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        Bruce Evans <bde@zeta.org.au>
Subject:   Re: cvs commit: src/sys/sys bus.h kobj.h param.h src/sys/kern subr_bus.c subr_kobj.c
Message-ID:  <1066378553.1063.5.camel@herring.nlsystems.com>
In-Reply-To: <55345.1066342295@critter.freebsd.dk>
References:  <55345.1066342295@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2003-10-16 at 23:11, Poul-Henning Kamp wrote:
> In message <20031016210328.T930@gamplex.bde.org>, Bruce Evans writes:
> 
> >>   * Change the kobj method lookup algorithm to one which is SMP-safe. This
> >>     relies only on the constraint that an observer of a sequence of writes
> >>     of pointer-sized values will see exactly one of those values, not a
> >>     mixture of two or more values. This assumption holds for all processors
> >>     which FreeBSD supports.
> >
> >This assumption should be avoided by using atomic_load() (and
> >atomic_store_mumble()).  See a discussion of "atomicity of unlocked
> >reads" last month.  First implement atomic_load().  There is currently
> >only atomic_load_acq_<type>().  "acq" gives acquire semantics which
> >is more than what is needed here and our implementations may do more
> >than what is required anyway for some arches.  "<type>" is part of a
> >bad API.
> 
> There are _so_ many things which explode if this assumption does not
> hold that I think doing anything but gold-plating it would be a
> total waste of time.

I agree. I certainly don't plan to spend hours implementing this for six
architectures and write manpages for it. If someone else wants to, fine.
I'll even use it where its relavent but right now, I'd like to spend my
spare time on more interesting things.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1066378553.1063.5.camel>