[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <162081530827.29796.4612627849821173058.tip-bot2@tip-bot2>
Date: Wed, 12 May 2021 10:28:28 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@...radead.org>,
Don Hiatt <dhiatt@...italocean.com>,
Hongyu Ning <hongyu.ning@...ux.intel.com>,
Vincent Guittot <vincent.guittot@...aro.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/fair: Add a few assertions
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 9099a14708ce1dfecb6002605594a0daa319b555
Gitweb: https://git.kernel.org/tip/9099a14708ce1dfecb6002605594a0daa319b555
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Tue, 17 Nov 2020 18:19:35 -05:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 12 May 2021 11:43:26 +02:00
sched/fair: Add a few assertions
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Tested-by: Don Hiatt <dhiatt@...italocean.com>
Tested-by: Hongyu Ning <hongyu.ning@...ux.intel.com>
Tested-by: Vincent Guittot <vincent.guittot@...aro.org>
Link: https://lkml.kernel.org/r/20210422123308.015639083@infradead.org
---
kernel/sched/fair.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c209f68..6bdbb7b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6288,6 +6288,11 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
task_util = uclamp_task_util(p);
}
+ /*
+ * per-cpu select_idle_mask usage
+ */
+ lockdep_assert_irqs_disabled();
+
if ((available_idle_cpu(target) || sched_idle_cpu(target)) &&
asym_fits_capacity(task_util, target))
return target;
@@ -6781,8 +6786,6 @@ unlock:
* certain conditions an idle sibling CPU if the domain has SD_WAKE_AFFINE set.
*
* Returns the target CPU number.
- *
- * preempt must be disabled.
*/
static int
select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
@@ -6795,6 +6798,10 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
/* SD_flags and WF_flags share the first nibble */
int sd_flag = wake_flags & 0xF;
+ /*
+ * required for stable ->cpus_allowed
+ */
+ lockdep_assert_held(&p->pi_lock);
if (wake_flags & WF_TTWU) {
record_wakee(p);
Powered by blists - more mailing lists