Re: PROBLEM --> Atomic operations in mmap attached address space...

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 30 Dec 1996 01:50:59 +0000 (GMT)


> This is taken directly from the kernel code at include/asm-i386/bitops.h

Kernel space doesnt take page faults

> This works well in the Sequent !! Unfortunately it was not working
> with Linux in "mmap" mapped address space... So I tried to use what was
> being done at the kernel level with no avail... But I am pretty confident
> that the problem really lies in the way mmap is implemented !! 8-(...

The atomicity is entirely hardware. On an x86 processor the OS gets no say
in cache coherency and atomic operations. They are coherent and they are
atomic and you can't turn it off

> For performance sake i do not want to do a syscall !!! Specially if this works
> with "shmat" mapped address space !!! ;-)...

I suspect thats luck.