Messages in this thread |  | | | Date | Fri, 18 Mar 2005 12:30:53 +0100 | | From | Ingo Molnar <> | | Subject | Re: Real-Time Preemption and RCU |
| |
* Ingo Molnar <mingo@elte.hu> wrote:
> [...] How about something like: > > void > rcu_read_lock(void) > { > preempt_disable(); > if (current->rcu_read_lock_nesting++ == 0) { > current->rcu_read_lock_ptr = > &__get_cpu_var(rcu_data).lock; > preempt_enable(); > read_lock(current->rcu_read_lock_ptr); > } else > preempt_enable(); > } > > this would still make it 'statistically scalable' - but is it correct?
thinking some more about it, i believe it's correct, because it picks one particular CPU's lock and correctly releases that lock.
(read_unlock() is atomic even on PREEMPT_RT, so rcu_read_unlock() is fine.)
Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |