Messages in this thread | | | Date | Wed, 08 Mar 2006 13:07:37 +1100 | From | Nick Piggin <> | Subject | Re: [PATCH] Document Linux's memory barriers |
| |
David Howells wrote:
>The attached patch documents the Linux kernel's memory barriers. > >Signed-Off-By: David Howells <dhowells@redhat.com> >--- > >
Good :)
>+============================== >+IMPLIED KERNEL MEMORY BARRIERS >+============================== >+ >+Some of the other functions in the linux kernel imply memory barriers. For >+instance all the following (pseudo-)locking functions imply barriers. >+ >+ (*) interrupt disablement and/or interrupts >
Is this really the case? I mean interrupt disablement only synchronises with the local CPU, so it probably should not _have_ to imply barriers (eg. some architectures are playing around with "virtual" interrupt disablement).
[...]
>+ >+Either interrupt disablement (LOCK) and enablement (UNLOCK) will barrier >+memory and I/O accesses individually, or interrupt handling will barrier >+memory and I/O accesses on entry and on exit. This prevents an interrupt >+routine interfering with accesses made in a disabled-interrupt section of code >+and vice versa. >+ >
But CPUs should always be consistent WRT themselves, so I'm not sure that it is needed?
Thanks, Nick
-- Send instant messages to your online friends http://au.messenger.yahoo.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |