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 <[EMAIL PROTECTED]>
> > 
> > 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
[EMAIL PROTECTED]         Usergroup           [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to