Messages in this thread | | | Date | Thu, 10 Oct 2013 17:36:03 +0200 | From | Oleg Nesterov <> | Subject | Re: [PATCH 0/6] Optimize the cpu hotplug locking -v2 |
| |
On 10/10, Peter Zijlstra wrote: > > That said, Oleg wants to use the same scheme for percpu_rwsem,
Yes, and later then (I hope) get_online_cpus() will be just current->cpuhp_ref++ || percpu_down_read().
(just in case, we only need ->cpuhp_ref to ensure that the readers can't starve the writers as it currently possible. iow to block the new readers but ensure that the recursive get/down_read can't block)
And please look at sb_wait_write/sb_start_write. It uses the same logic except:
- it doesn't have the "true" fast-path for readers
- its "slow" mode is slower than necessary
- it is buggy (afaics)
> and I'm > not sure his write-side (something in uprobes) wants to do the same.
surely not ;)
Oleg.
| |