android_kernel_xiaomi_sm8450/fs/pstore
John Stultz 1c7b03d00c pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
[ Upstream commit 76d62f24db07f22ccf9bc18ca793c27d4ebef721 ]

Wei Wang reported seeing priority inversion caused latencies
caused by contention on pmsg_lock, and suggested it be switched
to a rt_mutex.

I was initially hesitant this would help, as the tasks in that
trace all seemed to be SCHED_NORMAL, so the benefit would be
limited to only nice boosting.

However, another similar issue was raised where the priority
inversion was seen did involve a blocked RT task so it is clear
this would be helpful in that case.

Cc: Wei Wang <wvw@google.com>
Cc: Midas Chien<midaschieh@google.com>
Cc: Connor O'Brien <connoro@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: kernel-team@android.com
Fixes: 9d5438f462 ("pstore: Add pmsg - user-space accessible pstore object")
Reported-by: Wei Wang <wvw@google.com>
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221214231834.3711880-1-jstultz@google.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-14 10:16:22 +01:00
..
blk.c pstore/blk: Introduce "best_effort" mode 2020-05-31 19:49:01 -07:00
ftrace.c pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
inode.c pstore: Fix warning in pstore_kill_sb() 2021-03-25 09:04:08 +01:00
internal.h pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
Kconfig mark pstore-blk as broken 2021-07-14 16:56:12 +02:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
platform.c pstore: Don't use semaphores in always-atomic-context code 2022-04-08 14:39:56 +02:00
pmsg.c pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion 2023-01-14 10:16:22 +01:00
ram_core.c pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP 2023-01-14 10:15:14 +01:00
ram.c pstore/ram: Fix error return code in ramoops_probe() 2023-01-14 10:15:14 +01:00
zone.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00