From owner-freebsd-smp Sun Jul 1 3:51:23 2001 Delivered-To: freebsd-smp@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 3377E37B406; Sun, 1 Jul 2001 03:51:16 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f61Aow671409; Sun, 1 Jul 2001 12:51:01 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f61ApMm22390; Sun, 1 Jul 2001 12:51:22 +0200 (CEST) Date: Sun, 1 Jul 2001 12:51:16 +0200 From: Bernd Walter To: "E.B. Dreger" Cc: Alfred Perlstein , "Michael C . Wu" , freebsd-smp@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Quick question: AIO / SMP / process-based threading Message-ID: <20010701125116.B22242@cicely20.cicely.de> References: <20010630222829.E84523@sneakerz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from eddy+public+spam@noc.everquick.net on Sun, Jul 01, 2001 at 03:51:10AM +0000 Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sun, Jul 01, 2001 at 03:51:10AM +0000, E.B. Dreger wrote: > > Date: Sat, 30 Jun 2001 22:28:29 -0500 > > From: Alfred Perlstein > > > > Can you point to some specific PRs about this or crashdumps before > > (or at least while) taking pot shots at the AIO implementation? > > In the mean time, until somebody can substantiate that claim... is AIO SMP > safe? I see that aiocb.aio_buf is declared as "volatile", so I would > presume so. Volatile isn't an inter CPU thing and handles only register caching created by the compiler but not memory caching which is done out of the compilers control. If you want inter CPU chorency you have to handle both. > I just want to be sure that, if an aio call runs on one CPU, another CPU > can access *aio_buf and be 100% certain that the data are coherent. If you setup *aiobuf from the same executing context as you start the aio_call you will be save. That means if the kernel decides to do the work behind using another CPU it has to enshure coherency. As long as the aio_ call is in progress you shouldn't modify the *aiobuf anyway so that's not an issue. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message