[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-525628c73bd6af65f27d927e699e7460d7d55ed3@git.kernel.org>
Date: Mon, 23 Nov 2015 08:24:11 -0800
From: tip-bot for Byungchul Park <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, mingo@...nel.org, efault@....de, tglx@...utronix.de,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, byungchul.park@....com
Subject: [tip:sched/core] sched/fair:
Modify the comment about lock assumptions in migrate_task_rq_fair()
Commit-ID: 525628c73bd6af65f27d927e699e7460d7d55ed3
Gitweb: http://git.kernel.org/tip/525628c73bd6af65f27d927e699e7460d7d55ed3
Author: Byungchul Park <byungchul.park@....com>
AuthorDate: Wed, 18 Nov 2015 09:34:59 +0900
Committer: Ingo Molnar <mingo@...nel.org>
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 <byungchul.park@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1447806899-20303-1-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists