Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565318
| From | Lance Roy <ldr709@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] SRCU: More efficient reader counts. |
| Date | 2017-01-23 22:40 +0100 |
| Message-ID | <t2Uvf-3jD-1@gated-at.bofh.it> (permalink) |
| References | <t01MB-8jw-15@gated-at.bofh.it> <t2TfR-2xn-29@gated-at.bofh.it> <t2TfR-2xn-27@gated-at.bofh.it> <t2Tzd-2F5-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 23 Jan 2017 12:35:08 -0800 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote: > On Mon, Jan 23, 2017 at 12:17:25PM -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_idx_check(). > > > > This patch instead uses per-cpu lock and unlock counters. Because the both > > counters only increase and srcu_readers_active_idx_check() reads the unlock > > counter before the lock counter, this achieves the same end without having > > to increment two different counters in srcu_read_lock(). This also saves a > > smp_mb() in srcu_readers_active_idx_check(). > > > > Possible bug: There is no guarantee that the lock counter won't overflow > > during srcu_readers_active_idx_check(), as there are no memory barriers > > around srcu_flip() (see comment in srcu_readers_active_idx_check() for > > details). However, this problem was already present before this patch. > > > > Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> > > Signed-off-by: Lance Roy <ldr709@gmail.com> > > In general, the comment update looks good, but this patch undoes my > application of review feedback to your original patch. Could you please > submit the comment update as a separate patch on top of branch rcu/next > of my -rcu tree? > > git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git I have added the review feedback to the new patch. I will send the new version. If you prefer that the comment changes are in a separate patch I can change it, but I thought it would be better not to have an incorrect statement in the commit message. > Of course, if any of the changes from the review feedback are in any > way problematic, please do let me know. I don't see any problems. Thanks, Lance
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 tip/core/rcu 1/3] srcu: Implement more-efficient reader counts Lance Roy <ldr709@gmail.com> - 2017-01-23 21:20 +0100
[PATCH] SRCU: More efficient reader counts. Lance Roy <ldr709@gmail.com> - 2017-01-23 21:20 +0100
Re: [PATCH] SRCU: More efficient reader counts. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-23 21:40 +0100
Re: [PATCH] SRCU: More efficient reader counts. Lance Roy <ldr709@gmail.com> - 2017-01-23 22:40 +0100
[PATCH] srcu: Implement more-efficient reader counts Lance Roy <ldr709@gmail.com> - 2017-01-23 22:40 +0100
Re: [PATCH] srcu: Implement more-efficient reader counts "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 01:50 +0100
Re: [PATCH] srcu: Implement more-efficient reader counts Lance Roy <ldr709@gmail.com> - 2017-01-24 02:00 +0100
Re: [PATCH] srcu: Implement more-efficient reader counts "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 03:00 +0100
Re: [PATCH] srcu: Implement more-efficient reader counts Lance Roy <ldr709@gmail.com> - 2017-01-24 04:30 +0100
Re: [PATCH] srcu: Implement more-efficient reader counts "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-01-24 18:10 +0100
csiph-web