On 21 Nov, 2014, at 00:22 , Eduardo Horvath <e...@netbsd.org> wrote: > Or you could try to get the kernel to run on a SPARC V9 machine running > with RMO memory ordering. There's a lot more of those around. I'm not > convinced the existing APIs are sufficient to get that working.
It would be worrying if the kernel wouldn't run that way. The table from the McKenney paper, reproduced here http://en.wikipedia.org/wiki/Memory_ordering indicates that SPARC RMO potentially reorders the same operations as ARMv7 and POWER. Someone else would have to comment on how well NetBSD runs on multiprocessor versions of the latter processors, but it is supposed to and I haven't noticed any code which omits required barriers for machines like that (unlike the Alpha, where missing barriers for its unique quirk are easy to find). The API seems sufficient. Beyond the Alpha-barrier, he only thing I find lacking about the membar_*() API is maybe a set of functions that would eliminate the #ifndef/#endif around #ifndef __HAVE_ATOMIC_AS_MEMBAR membar_foo(); #endif repeated over and over when synchronization is done via atomic_ops(3). Dennis Ferguson