Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2001 12:51:16 +0200
From:      Bernd Walter <ticso@mail.cicely.de>
To:        "E.B. Dreger" <eddy+public+spam@noc.everquick.net>
Cc:        Alfred Perlstein <bright@sneakerz.org>, "Michael C . Wu" <keichii@peorth.iteration.net>, freebsd-smp@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Quick question: AIO / SMP / process-based threading
Message-ID:  <20010701125116.B22242@cicely20.cicely.de>
In-Reply-To: <Pine.LNX.4.20.0107010345230.29177-100000@www.everquick.net>; from eddy%2Bpublic%2Bspam@noc.everquick.net on Sun, Jul 01, 2001 at 03:51:10AM %2B0000
References:  <20010630222829.E84523@sneakerz.org> <Pine.LNX.4.20.0107010345230.29177-100000@www.everquick.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bright@sneakerz.org>
> > 
> > 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




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