Messages in this thread | | | Subject | Re: [PATCH 1/2] percpu-rw-semaphores: use light/heavy barriers | From | Peter Zijlstra <> | Date | Tue, 23 Oct 2012 22:45:10 +0200 |
| |
On Tue, 2012-10-23 at 21:23 +0200, Oleg Nesterov wrote: > I have to admit, I have > no idea how much cli/sti is slower compared to preempt_disable/enable. > A lot.. esp on stupid hardware (insert pentium-4 reference), but I think its more expensive for pretty much all hardware, preempt_disable() is only a non-atomic cpu local increment and a compiler barrier, enable the same and a single conditional.
| |