Gilboa Davara wrote:

Why?
- Write code that can run more-or-less the same as kernel module and as
a user-space library. (And under multiple different OS')
- Implement fast spinlocks and/or RW locks in user mode. (Again, that
behave the same under kernel mode and user mode.)
- Atomic counters.
- Anything else that can use the "lock" prefix.

- Gilboa
I'll just point out that all of the above only make sense if you are guaranteed low contention. If not, using the OS supplied locking mechanisms will bring much better performance, due to the fact that locked tasks do not take CPU time (are scheduled out).

If you can guarantee extremely low contention, yes, there is *SOME* sense. If not, I think this is premature optimization.

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to