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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/