cvs commit: src/sys/dev/io iodev.c
John Baldwin
jhb at freebsd.org
Fri Aug 8 17:25:16 UTC 2008
On Friday 08 August 2008 01:08:15 pm Alan Cox wrote:
> John Baldwin wrote:
>
> >
> >Also, I don't see why memrw() is not MPSAFE actually (on amd64 and i386 at
> >least). Stephan (ups@) even has a comment to that effect. The MTRR stuff
> >backing memioctl() on x86 might need locking, but I think that is all
mem(4)
> >is missing.
> >
> >
> >
>
> There is nothing there that requires Giant specifically. However, the
> use of some lock in memrw() does have an arguably useful but small
> effect: overlapping operations will be serialized. So, if you're ever
> trying to debug something involving memrw(), you won't be staring at
> essentially random state.
On amd64 there is already an sx lock over the pmap bits to temporarily map the
page. If desired, that could always be expanded. As it is, Giant is dropped
if you block on a lockmgr or sx lock (or go to sleep), so Giant doesn't
always serialize operations anyway.
--
John Baldwin
More information about the cvs-src
mailing list