Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-24 Thread Paul E. McKenney
On Mon, Jan 23, 2017 at 07:26:45PM -0800, Lance Roy wrote: > > Yeah, we did have this same conversation awhile back, didn't we? > > > > Back then, did I think to ask if this could be minimized or even prevented > > by adding memory barriers appropriately? ;-) > > > >

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
> Yeah, we did have this same conversation awhile back, didn't we? > > Back then, did I think to ask if this could be minimized or even prevented > by adding memory barriers appropriately? ;-) > > Thanx, Paul Yes, it can be fixed by adding a

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Paul E. McKenney
On Mon, Jan 23, 2017 at 04:53:34PM -0800, Lance Roy wrote: > On Mon, 23 Jan 2017 16:42:52 -0800 > "Paul E. McKenney" wrote: > > > On Mon, Jan 23, 2017 at 01:35:18PM -0800, Lance Roy wrote: > > > SRCU uses two per-cpu counters: a nesting counter to count the number of > > > active critical section

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
On Mon, 23 Jan 2017 16:42:52 -0800 "Paul E. McKenney" wrote: > On Mon, Jan 23, 2017 at 01:35:18PM -0800, Lance Roy wrote: > > SRCU uses two per-cpu counters: a nesting counter to count the number of > > active critical sections, and a sequence counter to ensure that the nesting > > counters don't

Re: [PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Paul E. McKenney
On Mon, Jan 23, 2017 at 01:35:18PM -0800, Lance Roy wrote: > SRCU uses two per-cpu counters: a nesting counter to count the number of > active critical sections, and a sequence counter to ensure that the nesting > counters don't change while they are being added together in > srcu_readers_active_id

[PATCH] srcu: Implement more-efficient reader counts

2017-01-23 Thread Lance Roy
SRCU uses two per-cpu counters: a nesting counter to count the number of active critical sections, and a sequence counter to ensure that the nesting counters don't change while they are being added together in srcu_readers_active_idx_check(). This patch instead uses per-cpu lock and unlock counter