uid_sys_stats: change to use rt_mutex
authorWei Wang <wvw@google.com>
Mon, 13 Mar 2017 19:22:21 +0000 (12:22 -0700)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:42:16 +0000 (13:12 +0530)
commita870c9b4c9404ecb38449e22699ab4e85f996599
tree4a14a63ea2d3732650b0b284a54b3792c0097603
parentdabcf1d17a04db801ac0d9068b3b20520369b8be
uid_sys_stats: change to use rt_mutex

We see this happens multiple times in heavy workload in systrace
and AMS stuck in uid_lock.

Running process:        Process 953
Running thread: android.ui
State:  Uninterruptible Sleep
Start:
1,025.628 ms
Duration:
27,955.949 ms
On CPU:
Running instead:        system_server
Args:
{kernel callsite when blocked:: "uid_procstat_write+0xb8/0x144"}

Changing to rt_mutex can mitigate the priority inversion

Bug: 34991231
Bug: 34193533
Test: on marlin
Change-Id: I28eb3971331cea60b1075740c792ab87d103262c
Signed-off-by: Wei Wang <wvw@google.com>
drivers/misc/uid_sys_stats.c