linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Andrea Arcangeli <andrea@suse.de>,
	Paul McKenney <paul.mckenney@us.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Read-Copy Update 2.5.34
Date: Wed, 11 Sep 2002 17:50:11 +0530	[thread overview]
Message-ID: <20020911175011.D28198@in.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0209111323360.12332-100000@localhost.localdomain>; from mingo@elte.hu on Wed, Sep 11, 2002 at 01:24:21PM +0200

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.

  reply	other threads:[~2002-09-11 12:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-11 11:19 [PATCH] Read-Copy Update 2.5.34 Dipankar Sarma
2002-09-11 11:24 ` Ingo Molnar
2002-09-11 12:20   ` Dipankar Sarma [this message]
2002-09-11 14:03     ` Robert Love
2002-09-11 14:29       ` Dipankar Sarma
2002-09-11 18:52         ` Robert Love
2002-09-11 16:35       ` Dipankar Sarma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020911175011.D28198@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paul.mckenney@us.ibm.com \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).