Re: atomic RAM ?

From: Michael Schnell
Date: Thu Apr 08 2010 - 08:31:03 EST


On 04/08/2010 02:14 PM, David Miller wrote:
> Using the spinlock array idea also doesn't work in userspace
> because any signal handler that tries to do an atomic on the
> same object will deadlock on the spinlock.
>
Yep. I was beeing afraid of signal issues when thinking about this stuff
(on and off for several months :) ), too.

That is why I finally think that a _completely_ hardware based solution
for each necessary atomic operation is necessary, as well to do Futex
(if not using said "atomic region" workaround for non-SMP), as to do SMP.

I finally think that this might be possible in a decent way with custom
instructions using a - say - 1K Word internal FPGA memory space. But
this might need some changes in the non-arch dependent Kernel and/or
library code as the atomic macros would work on "handles" instead of
pointers (of course these handles would be the old pointers with
"normal" archs) and the words used by the macros would need to be
explicitly allocated and deallocated instead of potentially being just
static variables - even though the "atomic_allocate" macro would just
create a static variable for "normal archs" and return it's address.

-Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/