From owner-cvs-src@FreeBSD.ORG Thu Oct 16 04:36:28 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42D4A16A4B3; Thu, 16 Oct 2003 04:36:28 -0700 (PDT) Received: from mail.qubesoft.com (gate.qubesoft.com [217.169.36.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id C765143FA3; Thu, 16 Oct 2003 04:36:26 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from bluebottle.qubesoft.com (bluebottle.qubesoft.com [192.168.1.2]) by mail.qubesoft.com (8.12.9/8.12.9) with ESMTP id h9GBaQFH032257; Thu, 16 Oct 2003 12:36:26 +0100 (BST) (envelope-from dfr@nlsystems.com) Received: from builder02.qubesoft.com (builder02.qubesoft.com [192.168.1.8]) h9GBaCbx034424; Thu, 16 Oct 2003 12:36:24 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Bruce Evans In-Reply-To: <20031016210328.T930@gamplex.bde.org> References: <200310160916.h9G9GSqQ067982@repoman.freebsd.org> <20031016210328.T930@gamplex.bde.org> Content-Type: text/plain Message-Id: <1066304172.20052.8.camel@builder02.qubesoft.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 16 Oct 2003 12:36:12 +0100 Content-Transfer-Encoding: 7bit cc: cvs-src@freebsd.org cc: Doug Rabson cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys bus.h kobj.h param.h src/sys/kern subr_bus.c subr_kobj.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Oct 2003 11:36:28 -0000 On Thu, 2003-10-16 at 12:16, Bruce Evans wrote: > On Thu, 16 Oct 2003, Doug Rabson wrote: > > > dfr 2003/10/16 02:16:28 PDT > > > > FreeBSD src repository > > > > Modified files: > > sys/sys bus.h kobj.h param.h > > sys/kern subr_bus.c subr_kobj.c > > Log: > > * Add multiple inheritance to kobj. Each class can have zero or more base > > ... > > * 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_(). "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. "" is part of a > bad API. Without using something like , how can you know how much to read (without abusing some kind of GCC language extension)? I don't want to use atomic_load_acq_* since I don't care which order values are written to the cache.