From patchwork Thu Apr 13 14:02:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 97369 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp732768qgf; Thu, 13 Apr 2017 07:03:48 -0700 (PDT) X-Received: by 10.98.18.84 with SMTP id a81mr3535749pfj.188.1492092228330; Thu, 13 Apr 2017 07:03:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g77si21506573pfg.410.2017.04.13.07.03.48; Thu, 13 Apr 2017 07:03:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbdDMODo (ORCPT + 15 others); Thu, 13 Apr 2017 10:03:44 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:36466 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754049AbdDMODm (ORCPT ); Thu, 13 Apr 2017 10:03:42 -0400 Received: by mail-pg0-f53.google.com with SMTP id g2so30917633pge.3 for ; Thu, 13 Apr 2017 07:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O1gmxgJDz6LOzxmFPbiJzmjiL96h0o723QJjD36GZfs=; b=Barovho7/T9WLTR30gj0lSLBMHhJLoF1SS/ZN2yCbtF5P4ihs2MIJ4UqvjUMGJ9V7B JMD5kRQ5NfhlcfFESe9NclRuUc+Uj4Jxk8+G6yHc/zqY4Drkc23tVFEEvqBrNOiUuZKv SRQQxGPUABsn7Gkkkr4QbEwW2tHbdTjjnXzxg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=O1gmxgJDz6LOzxmFPbiJzmjiL96h0o723QJjD36GZfs=; b=PY6mePGfyV0ELx5vcfbdM2ZH11LCGnn6icQf93bioROlWiX5qDyVEKG9rZktuqUHe7 Lqa4VmW+9//XqM+tGS83tLauuyk3HByQXLMv5+qobbT9EOmGcMSSSdgxnLoF9xjCd4s9 0Jr6YPda9oj5orP6qdcQaacaGZS314B0N+6poj34wpMrFBlmDIbxfTTsty1wWhJ8zuLn XW8gisumcwadJXUERQgkBAAZ6MtVRobF6driaqI5KPnc6FRSpT3KqZ9R5yxgNGaQ4r1q QNZh71KL2kIzVlG3Hox6XhsDrZ9h2S6vXgFTpjfCIQCyJYKKYzRePv3JRFn8EeZ7U5Rz ZEjw== X-Gm-Message-State: AN3rC/7LmrFswvcYqkMmdIuGt4CzdK6yyyvThHQb7fo+Too7oKXlkWvZ myH3jsL/hDmTNab4 X-Received: by 10.98.223.213 with SMTP id d82mr3580667pfl.222.1492092221086; Thu, 13 Apr 2017 07:03:41 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.83]) by smtp.gmail.com with ESMTPSA id z21sm43043695pgc.53.2017.04.13.07.03.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Apr 2017 07:03:40 -0700 (PDT) From: Alex Shi To: peterz@infradead.org, mingo@redhat.com, corbet@lwn.net, linux-kernel@vger.kernel.org (open list:LOCKING PRIMITIVES) Cc: linux-kernel@vger.kernel.org, Alex Shi , Steven Rostedt , Sebastian Siewior , Thomas Gleixner Subject: [PATCH 3/3] rtmutex: remove unnecessary adjust prio Date: Thu, 13 Apr 2017 22:02:54 +0800 Message-Id: <1492092174-31734-4-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1492092174-31734-1-git-send-email-alex.shi@linaro.org> References: <1492092174-31734-1-git-send-email-alex.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't need to adjust prio before new pi_waiter adding. The prio only need update after pi_waiter change or task normal_prio change. Signed-off-by: Alex Shi Cc: Steven Rostedt Cc: Sebastian Siewior To: linux-kernel@vger.kernel.org To: Ingo Molnar To: Peter Zijlstra Cc: Thomas Gleixner --- kernel/locking/rtmutex.c | 1 - 1 file changed, 1 deletion(-) -- 1.9.1 diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 05ff685..3ee8bc1 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -973,7 +973,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;