mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: TAKADA Yoshihito <takada@mbf.nifty.com>
To: linux-kernel@vger.kernel.org
Subject: How does RCU work?
Date: Tue, 05 Aug 2008 00:09:43 +0900 (JST)	[thread overview]
Message-ID: <20080805.000943.208968239.takada@mbf.nifty.com> (raw)

Hi.
I cannot understand mechanism. Somebody tell me it please.

In x86 kernel, CONFIG_PREEMPT_RCU=n (CONFIG_CLASSIC_RCU=y). rcu_read_lock() makes
just preempt_disable().
call_cru()/synchronize_rcu() running as a soft-IRQ.
It's current CPU does not refer to protected data that when call_rcu() run. 
Because soft-IRQ handler ran, it means current CPU is preempive. That is the CPU
called rcu_read_unlock().

Well, current CPU is unlocked, but How does kernel know it other CPUs unlocked?

call_ruc() calls force_quiescent_state() to reschedule other CPUs. 
force_quiescent_state() calls smp_send_reschedule() to sends request to reshecule.
It's just require to reschedule via inter Processor Interrupt. But call_rcu() does
not wait for target CPUs handle IPI. Or, Do CPUs have it handled IPI request when
return from smp_send_reschedule()?


             reply	other threads:[~2008-08-04 15:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 15:09 TAKADA Yoshihito [this message]
2008-08-04 18:13 ` Bert Wesarg

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=20080805.000943.208968239.takada@mbf.nifty.com \
    --to=takada@mbf.nifty.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®