Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1459622
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact |
| Date | 2016-08-10 21:20 +0200 |
| Message-ID | <s4Gqm-b4-49@gated-at.bofh.it> (permalink) |
| References | <s4bZf-5Sz-15@gated-at.bofh.it> <s4oWt-5LB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Aug 09, 2016 at 04:47:38PM -0700, John Stultz wrote: > On Tue, Aug 9, 2016 at 2:51 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > > > Currently the percpu-rwsem switches to (global) atomic ops while a > > writer is waiting; which could be quite a while and slows down > > releasing the readers. > > > > This patch cures this problem by ordering the reader-state vs > > reader-count (see the comments in __percpu_down_read() and > > percpu_down_write()). This changes a global atomic op into a full > > memory barrier, which doesn't have the global cacheline contention. > > > > This also enables using the percpu-rwsem with rcu_sync disabled in order > > to bias the implementation differently, reducing the writer latency by > > adding some cost to readers. > > So this by itself doesn't help us much, but including the following > from Oleg does help quite a bit: Correct, Oleg was going to send his rcu_sync rework on top of this. But since its holiday season things might be tad delayed.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact Peter Zijlstra <peterz@infradead.org> - 2016-08-09 12:00 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact John Stultz <john.stultz@linaro.org> - 2016-08-10 01:50 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact Oleg Nesterov <oleg@redhat.com> - 2016-08-10 20:30 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact Om Dhyade <odhyade@codeaurora.org> - 2016-08-13 03:50 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact John Stultz <john.stultz@linaro.org> - 2016-08-24 23:20 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact Tejun Heo <tj@kernel.org> - 2016-08-24 23:40 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact John Stultz <john.stultz@linaro.org> - 2016-08-25 01:00 +0200
Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact Peter Zijlstra <peterz@infradead.org> - 2016-08-10 21:20 +0200
[PATCH] cgroup: avoid synchronize_sched() in __cgroup_procs_write() Oleg Nesterov <oleg@redhat.com> - 2016-08-11 19:00 +0200
[tip:locking/core] locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-08-18 13:10 +0200
[tip:locking/core] locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() tip-bot for Peter Zijlstra <tipbot@zytor.com> - 2016-08-18 15:50 +0200
csiph-web