Messages in this thread | | | Date | Wed, 11 Sep 2002 17:50:11 +0530 | From | Dipankar Sarma <> | Subject | Re: [PATCH] Read-Copy Update 2.5.34 |
| |
On Wed, Sep 11, 2002 at 01:24:21PM +0200, Ingo Molnar wrote: > > i dont really understand why it has to change the scheduler. You want a > facility to force a reschedule on any given CPU, correct? >
Hi Ingo,
Yes, like force_cpu_reschedule().
Apart from that RCU adds some minor things in the scheduler code -
1. Per-CPU context switch counter increment in the fast path 2. For preemptive kernels, a conditional branch in the voluntary context switch code path checking whether the current task may have had an involuntary context switch earlier [rcu_preempt_put()]. 3. Adding a field to the task structure - cpu_preempt_cntr. 4. RCU checking hook into the scheduler_tick(), but this is not in the fast path.
#2 and #3 are necessary to support call_rcu_preempt() which allows preemption-safe reads of data protected by RCU. A preempted task may still contain references to RCU protected data and the RCU grace period needs to be prolonged until all such tasks before the update do voluntary context switches.
I did some reflex benchmarking to make sure that I didn't introduce any false sharing by mistake in scheduler fast path and the results look comparable -
(4CPU P3 Xeon with 1MB L2 + 1GB RAM)
vanilla-2.5.34 rcu_poll-2.5.34 -------------- --------------- 80 , 40 , 1.593 1.569 112 , 40 , 1.544 1.554 144 , 40 , 1.595 1.552 176 , 40 , 1.568 1.605 198 , 40 , 1.562 1.577 230 , 40 , 1.563 1.583 244 , 40 , 1.671 1.638
Not sure how reliable these numbers are.
Thanks -- Dipankar Sarma <dipankar@in.ibm.com> http://lse.sourceforge.net Linux Technology Center, IBM Software Lab, Bangalore, India. - 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/
| |