已知patch

1. rtmutex

Fixes: c014ef69b3ac ("locking/rtmutex: Add wake_state to rt_mutex_waiter") Signed-off-by: Wander Lairson Costa <wander@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: [PATCH] rtmutex: ensure we wake up the top waiter - Wander Lairson Costa Link: [PATCH v2] rtmutex: ensure we always wake up the top waiter - Wander Lairson Costa

Diffstat (limited to 'kernel/locking/rtmutex.c')

-rw-r--r--kernel/locking/rtmutex.c5

1 files changed, 3 insertions, 2 deletions

diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 010cf4e6d0b8f..728f434de2bbf 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c

@@ -901,8 +901,9 @@ static int __sched rt_mutex_adjust_prio_chain(struct task_struct *task,

* then we need to wake the new top waiter up to try

* to get the lock.

*/

- if (prerequeue_top_waiter != rt_mutex_top_waiter(lock))

- wake_up_state(waiter->task, waiter->wake_state);

+ top_waiter = rt_mutex_top_waiter(lock);

+ if (prerequeue_top_waiter != top_waiter)

+ wake_up_state(top_waiter->task, top_waiter->wake_state);

raw_spin_unlock_irq(&lock->wait_lock);

return 0;

}

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/kernel/locking/rtmutex.c?h=next-20230210&id=db370a8b9f67ae5f17e3d5482493294467784504


 

many taskes killed by one time. 

and rtmutex uid_lock deal with it very slow. 

ANDROID: uid_sys_stats: defer process_notifier work if uid_lock is contended

process_notifier() is called every time a process exits. When multiple
processes exit roughly at the same time, the uid_lock taken from inside
of process_notifier() will create contention which slows down process
exit. Defer stats accounting in such case to avoid lock contention.

https://android-review.googlesource.com/c/kernel/common/+/2371808

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值