Re: [PATCH v2] locking/percpu-rwsem: Optimize readers and reduce global impact

From: Om Dhyade
Date: Fri Aug 12 2016 - 21:44:42 EST


Thank you Dimtry for sharing the patches.

Update from my tests:
Use-case: Android application launches.

I tested the patches on android N build, i see max latency ~7ms.
In my tests, the wait is due to: copy_process(fork.c) blocks all threads in __cgroup_procs_write including threads which are not part of the forking process's thread-group.

Dimtry had provided a hack patch which reverts to per-process rw-sem which had max latency of ~2ms.

android user-space binder library does 2 cgroup write operations per transaction, apart from the copy_process(fork.c) wait, i see pre-emption in _cgroup_procs_write causing waits.

Thanks.

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project