All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: rostedt@goodmis.org, byungchul.park@lge.com,
	mathieu.desnoyers@efficios.com,
	Josh Triplett <josh@joshtriplett.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: Tasks RCU vs Preempt RCU
Date: Fri, 18 May 2018 19:29:18 -0700	[thread overview]
Message-ID: <20180519022918.GV3803@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180518183623.GA163151@joelaf.mtv.corp.google.com>

On Fri, May 18, 2018 at 11:36:23AM -0700, Joel Fernandes wrote:
> Hi,
> 
> I was thinking about tasks-RCU and why its needed. Since preempt-RCU allows
> tasks to be preempted in read-sections, can we not just reuse that mechanism
> for the trampolines since we track all preempted tasks so we would wait on
> all tasks preempted within a trampoline?
> 
> I am trying to understand what will _not_ work if we did that.. I'm guessing
> the answer is that that would mean the trampoline has to be wrapped with
> rcu_read_{lock,unlock} which may add some overhead, but please let me know
> if I'm missing something else..
> 
> The advantage I guess is possible elimination of an RCU variant, and also
> possibly eliminating the tasks RCU thread that monitors.. Anyway I was
> thinking more in terms of the effort of reduction of the RCU flavors etc and
> reducing complexity ideas.

The problem is that if they are preempted while executing in a trampoline,
RCU-preempt doesn't queue them nor does it wait on them.

And the problem with wrapping them with rcu_read_{lock,unlock} is that
there would be a point before the trampoline executed rcu_read_lock()
but while it was on the trampoline.  Nothing good comes from this.  ;-)

							Thanx, Paul

  reply	other threads:[~2018-05-19  2:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 18:36 Tasks RCU vs Preempt RCU Joel Fernandes
2018-05-19  2:29 ` Paul E. McKenney [this message]
2018-05-19 22:59   ` Joel Fernandes
2018-05-20  0:49     ` Paul E. McKenney
2018-05-20  0:56       ` Joel Fernandes
2018-05-20 15:28       ` Steven Rostedt
2018-05-20 19:18         ` Joel Fernandes
2018-05-22  1:59           ` Steven Rostedt
2018-05-22  4:34             ` Joel Fernandes
2018-05-22  4:54             ` Joel Fernandes
2018-05-22 12:38               ` Steven Rostedt
2018-05-22 16:09                 ` Paul E. McKenney
2018-05-22 17:27                   ` Steven Rostedt
2018-05-22 17:47                     ` Paul E. McKenney
2018-05-23  1:19                       ` Joel Fernandes
2018-05-23  3:10                 ` Joel Fernandes

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=20180519022918.GV3803@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=byungchul.park@lge.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.