Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751156AbdGMGTW (ORCPT ); Thu, 13 Jul 2017 02:19:22 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:33175 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbdGMGTV (ORCPT ); Thu, 13 Jul 2017 02:19:21 -0400 From: Alex Shi To: peterz@infradead.org, mingo@redhat.com, linux-kernel@vger.kernel.org (open list:LOCKING PRIMITIVES) Cc: linux-kernel@vger.kernel.org, Alex Shi , Steven Rostedt , Sebastian Siewior , Mathieu Poirier , Juri Lelli , Thomas Gleixner Subject: [PATCH] rtmutex: remove unnecessary adjust prio Date: Thu, 13 Jul 2017 14:18:24 +0800 Message-Id: <1499926704-28841-1-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1304 Lines: 37 We don't need to adjust prio before new pi_waiter adding. The prio only need update after pi_waiter change or task priority change. Steven Rostedt pointed: "Interesting, I did some git mining and this was added with the original entry of the rtmutex.c (23f78d4a0). Looking at even that version, I don't see the purpose of adjusting the task prio here. It is done before anything changes in the task." Signed-off-by: Alex Shi Cc: Steven Rostedt Cc: Sebastian Siewior Cc: Mathieu Poirier Cc: Juri Lelli Cc: Thomas Gleixner To: linux-kernel@vger.kernel.org To: Ingo Molnar To: Peter Zijlstra Reviewed-by: Steven Rostedt (VMware) --- kernel/locking/rtmutex.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 28cd09e..d1fe41f 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -963,7 +963,6 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, return -EDEADLK; raw_spin_lock(&task->pi_lock); - rt_mutex_adjust_prio(task); waiter->task = task; waiter->lock = lock; waiter->prio = task->prio; -- 2.7.4