From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754165AbbKWQYv (ORCPT ); Mon, 23 Nov 2015 11:24:51 -0500 Received: from terminus.zytor.com ([198.137.202.10]:44527 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbbKWQYs (ORCPT ); Mon, 23 Nov 2015 11:24:48 -0500 Date: Mon, 23 Nov 2015 08:24:11 -0800 From: tip-bot for Byungchul Park Message-ID: Cc: hpa@zytor.com, mingo@kernel.org, efault@gmx.de, tglx@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, peterz@infradead.org, byungchul.park@lge.com Reply-To: efault@gmx.de, tglx@linutronix.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, byungchul.park@lge.com, torvalds@linux-foundation.org In-Reply-To: <1447806899-20303-1-git-send-email-byungchul.park@lge.com> References: <1447806899-20303-1-git-send-email-byungchul.park@lge.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched/fair: Modify the comment about lock assumptions in migrate_task_rq_fair() Git-Commit-ID: 525628c73bd6af65f27d927e699e7460d7d55ed3 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 525628c73bd6af65f27d927e699e7460d7d55ed3 Gitweb: http://git.kernel.org/tip/525628c73bd6af65f27d927e699e7460d7d55ed3 Author: Byungchul Park AuthorDate: Wed, 18 Nov 2015 09:34:59 +0900 Committer: Ingo Molnar CommitDate: Mon, 23 Nov 2015 09:48:20 +0100 sched/fair: Modify the comment about lock assumptions in migrate_task_rq_fair() The comment describing migrate_task_rq_fair() says that the caller should hold p->pi_lock. But in some cases the caller can hold task_rq(p)->lock instead of p->pi_lock. So the comment is broken and this patch fixes it. Signed-off-by: Byungchul Park Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1447806899-20303-1-git-send-email-byungchul.park@lge.com Signed-off-by: Ingo Molnar --- kernel/sched/fair.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f7017ad..ff8ec86 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5058,8 +5058,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f /* * Called immediately before a task is migrated to a new cpu; task_cpu(p) and * cfs_rq_of(p) references at time of call are still valid and identify the - * previous cpu. However, the caller only guarantees p->pi_lock is held; no - * other assumptions, including the state of rq->lock, should be made. + * previous cpu. The caller guarantees p->pi_lock or task_rq(p)->lock is held. */ static void migrate_task_rq_fair(struct task_struct *p) {