Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Joel Fernandes
On Tue, May 22, 2018 at 08:38:32AM -0400, Steven Rostedt wrote: > On Mon, 21 May 2018 21:54:14 -0700 > Joel Fernandes wrote: > > > > Yes, lets brain storm this if you like. One way I was thinking if we can > > manually check every CPU and see what state its in (usermode,

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Joel Fernandes
On Tue, May 22, 2018 at 08:38:32AM -0400, Steven Rostedt wrote: > On Mon, 21 May 2018 21:54:14 -0700 > Joel Fernandes wrote: > > > > Yes, lets brain storm this if you like. One way I was thinking if we can > > manually check every CPU and see what state its in (usermode, kernel, idle > > etc)

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Joel Fernandes
On Tue, May 22, 2018 at 10:47:11AM -0700, Paul E. McKenney wrote: > On Tue, May 22, 2018 at 01:27:00PM -0400, Steven Rostedt wrote: > > On Tue, 22 May 2018 09:09:49 -0700 > > "Paul E. McKenney" wrote: > > > > > Just for the record, if you guys realy want to take over

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Joel Fernandes
On Tue, May 22, 2018 at 10:47:11AM -0700, Paul E. McKenney wrote: > On Tue, May 22, 2018 at 01:27:00PM -0400, Steven Rostedt wrote: > > On Tue, 22 May 2018 09:09:49 -0700 > > "Paul E. McKenney" wrote: > > > > > Just for the record, if you guys realy want to take over Tasks RCU, > > > I have no

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 01:27:00PM -0400, Steven Rostedt wrote: > On Tue, 22 May 2018 09:09:49 -0700 > "Paul E. McKenney" wrote: > > > Just for the record, if you guys realy want to take over Tasks RCU, > > I have no objections. For one thing, I don't anticipate any

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 01:27:00PM -0400, Steven Rostedt wrote: > On Tue, 22 May 2018 09:09:49 -0700 > "Paul E. McKenney" wrote: > > > Just for the record, if you guys realy want to take over Tasks RCU, > > I have no objections. For one thing, I don't anticipate any other use > > cases for it

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Steven Rostedt
On Tue, 22 May 2018 09:09:49 -0700 "Paul E. McKenney" wrote: > Just for the record, if you guys realy want to take over Tasks RCU, > I have no objections. For one thing, I don't anticipate any other use > cases for it (famous last words!). But you break it, you buy

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Steven Rostedt
On Tue, 22 May 2018 09:09:49 -0700 "Paul E. McKenney" wrote: > Just for the record, if you guys realy want to take over Tasks RCU, > I have no objections. For one thing, I don't anticipate any other use > cases for it (famous last words!). But you break it, you buy it! ;-) It really matters

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 08:38:32AM -0400, Steven Rostedt wrote: > On Mon, 21 May 2018 21:54:14 -0700 > Joel Fernandes wrote: > > > > Yes, lets brain storm this if you like. One way I was thinking if we can > > manually check every CPU and see what state its in (usermode,

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Paul E. McKenney
On Tue, May 22, 2018 at 08:38:32AM -0400, Steven Rostedt wrote: > On Mon, 21 May 2018 21:54:14 -0700 > Joel Fernandes wrote: > > > > Yes, lets brain storm this if you like. One way I was thinking if we can > > manually check every CPU and see what state its in (usermode, kernel, idle > > etc)

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Steven Rostedt
On Mon, 21 May 2018 21:54:14 -0700 Joel Fernandes wrote: > Yes, lets brain storm this if you like. One way I was thinking if we can > manually check every CPU and see what state its in (usermode, kernel, idle > etc) using an IPI mechanism. Once all CPUs have been seen to

Re: Tasks RCU vs Preempt RCU

2018-05-22 Thread Steven Rostedt
On Mon, 21 May 2018 21:54:14 -0700 Joel Fernandes wrote: > Yes, lets brain storm this if you like. One way I was thinking if we can > manually check every CPU and see what state its in (usermode, kernel, idle > etc) using an IPI mechanism. Once all CPUs have been seen to be in usermode, > or

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Joel Fernandes
(Resending because my previous mail client terribly wrapped things..) On Mon, May 21, 2018 at 09:59:51PM -0400, Steven Rostedt wrote: [...] > > > > Just thinking out loud and probably some food for thought.. > > > > The rcu_read_lock/unlock primitive are extrememly fast, so I don't > >

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Joel Fernandes
(Resending because my previous mail client terribly wrapped things..) On Mon, May 21, 2018 at 09:59:51PM -0400, Steven Rostedt wrote: [...] > > > > Just thinking out loud and probably some food for thought.. > > > > The rcu_read_lock/unlock primitive are extrememly fast, so I don't > >

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Joel Fernandes
On Mon, May 21, 2018 at 6:59 PM Steven Rostedt wrote: [...] > > > > Just thinking out loud and probably some food for thought.. > > > > The rcu_read_lock/unlock primitive are extrememly fast, so I don't personally > > think there's a time hit. > > > > Could we get around the

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Joel Fernandes
On Mon, May 21, 2018 at 6:59 PM Steven Rostedt wrote: [...] > > > > Just thinking out loud and probably some food for thought.. > > > > The rcu_read_lock/unlock primitive are extrememly fast, so I don't personally > > think there's a time hit. > > > > Could we get around the trampoline code ==

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Steven Rostedt
On Sun, 20 May 2018 12:18:46 -0700 Joel Fernandes wrote: > > There is no feasible way to know when a task is on a trampoline > > without adding overhead that negates the speed up we receive by making > > individual trampolines to begin with. > > Are you speaking of

Re: Tasks RCU vs Preempt RCU

2018-05-21 Thread Steven Rostedt
On Sun, 20 May 2018 12:18:46 -0700 Joel Fernandes wrote: > > There is no feasible way to know when a task is on a trampoline > > without adding overhead that negates the speed up we receive by making > > individual trampolines to begin with. > > Are you speaking of time overhead or space

Re: Tasks RCU vs Preempt RCU

2018-05-20 Thread Joel Fernandes
On Sun, May 20, 2018 at 11:28:43AM -0400, Steven Rostedt wrote: > > [ Steve interrupts his time off ] Hope you're enjoying your vacation :) > On Sat, 19 May 2018 17:49:38 -0700 > "Paul E. McKenney" wrote: > > > I suggested to Steven that the rcu_read_lock() and

Re: Tasks RCU vs Preempt RCU

2018-05-20 Thread Joel Fernandes
On Sun, May 20, 2018 at 11:28:43AM -0400, Steven Rostedt wrote: > > [ Steve interrupts his time off ] Hope you're enjoying your vacation :) > On Sat, 19 May 2018 17:49:38 -0700 > "Paul E. McKenney" wrote: > > > I suggested to Steven that the rcu_read_lock() and rcu_read_unlock() might > > be

Re: Tasks RCU vs Preempt RCU

2018-05-20 Thread Steven Rostedt
[ Steve interrupts his time off ] On Sat, 19 May 2018 17:49:38 -0700 "Paul E. McKenney" wrote: > I suggested to Steven that the rcu_read_lock() and rcu_read_unlock() might > be outside of the trampoline, but this turned out to be infeasible. Not > that I remember

Re: Tasks RCU vs Preempt RCU

2018-05-20 Thread Steven Rostedt
[ Steve interrupts his time off ] On Sat, 19 May 2018 17:49:38 -0700 "Paul E. McKenney" wrote: > I suggested to Steven that the rcu_read_lock() and rcu_read_unlock() might > be outside of the trampoline, but this turned out to be infeasible. Not > that I remember why! ;-) Because the

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Joel Fernandes
On Sat, May 19, 2018 at 05:49:38PM -0700, Paul E. McKenney wrote: [...] > > > 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.

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Joel Fernandes
On Sat, May 19, 2018 at 05:49:38PM -0700, Paul E. McKenney wrote: [...] > > > 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.

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Paul E. McKenney
On Sat, May 19, 2018 at 03:59:05PM -0700, Joel Fernandes wrote: > On Fri, May 18, 2018 at 07:29:18PM -0700, Paul E. McKenney wrote: > > 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 > > >

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Paul E. McKenney
On Sat, May 19, 2018 at 03:59:05PM -0700, Joel Fernandes wrote: > On Fri, May 18, 2018 at 07:29:18PM -0700, Paul E. McKenney wrote: > > 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 > > >

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Joel Fernandes
On Fri, May 18, 2018 at 07:29:18PM -0700, Paul E. McKenney wrote: > 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

Re: Tasks RCU vs Preempt RCU

2018-05-19 Thread Joel Fernandes
On Fri, May 18, 2018 at 07:29:18PM -0700, Paul E. McKenney wrote: > 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

Re: Tasks RCU vs Preempt RCU

2018-05-18 Thread Paul E. McKenney
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

Re: Tasks RCU vs Preempt RCU

2018-05-18 Thread Paul E. McKenney
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

Tasks RCU vs Preempt RCU

2018-05-18 Thread Joel Fernandes
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

Tasks RCU vs Preempt RCU

2018-05-18 Thread Joel Fernandes
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