From owner-cvs-all@FreeBSD.ORG Fri Oct 17 01:16:21 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 410DA16A4B3; Fri, 17 Oct 2003 01:16:21 -0700 (PDT) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B60A43FA3; Fri, 17 Oct 2003 01:16:19 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) h9H8Fr7e004683; Fri, 17 Oct 2003 09:15:53 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Poul-Henning Kamp In-Reply-To: <55345.1066342295@critter.freebsd.dk> References: <55345.1066342295@critter.freebsd.dk> Content-Type: text/plain Message-Id: <1066378553.1063.5.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 17 Oct 2003 09:15:53 +0100 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-4.9 required=5.0 tests=EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_XIMIAN version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: cvs-src@FreeBSD.org cc: Doug Rabson cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Bruce Evans 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-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2003 08:16:21 -0000 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_(). "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. > > 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.