[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812131313.GA11058@pauld.bos.csb>
Date: Mon, 12 Aug 2019 09:13:13 -0400
From: Phil Auld <pauld@...hat.com>
To: tglx@...utronix.de
Cc: peterz@...radead.org, mingo@...hat.com, hpa@...or.com,
linux-kernel@...r.kernel.org, mingo@...nel.org,
vincent.guittot@...aro.org
Subject: Re: [tip:sched/core] sched/fair: Use rq_lock/unlock in
online_fair_sched_group
On Mon, Aug 12, 2019 at 05:52:04AM -0700 tip-bot for Phil Auld wrote:
> Commit-ID: a46d14eca7b75fffe35603aa8b81df654353d80f
> Gitweb: https://git.kernel.org/tip/a46d14eca7b75fffe35603aa8b81df654353d80f
> Author: Phil Auld <pauld@...hat.com>
> AuthorDate: Thu, 1 Aug 2019 09:37:49 -0400
> Committer: Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Mon, 12 Aug 2019 14:45:34 +0200
>
> sched/fair: Use rq_lock/unlock in online_fair_sched_group
>
> Enabling WARN_DOUBLE_CLOCK in /sys/kernel/debug/sched_features causes
> warning to fire in update_rq_clock. This seems to be caused by onlining
> a new fair sched group not using the rq lock wrappers.
>
> [] rq->clock_update_flags & RQCF_UPDATED
> [] WARNING: CPU: 5 PID: 54385 at kernel/sched/core.c:210 update_rq_clock+0xec/0x150
>
> [] Call Trace:
> [] online_fair_sched_group+0x53/0x100
> [] cpu_cgroup_css_online+0x16/0x20
> [] online_css+0x1c/0x60
> [] cgroup_apply_control_enable+0x231/0x3b0
> [] cgroup_mkdir+0x41b/0x530
> [] kernfs_iop_mkdir+0x61/0xa0
> [] vfs_mkdir+0x108/0x1a0
> [] do_mkdirat+0x77/0xe0
> [] do_syscall_64+0x55/0x1d0
> [] entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> Using the wrappers in online_fair_sched_group instead of the raw locking
> removes this warning.
>
> [ tglx: Use rq_*lock_irq() ]
>
> Signed-off-by: Phil Auld <pauld@...hat.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Ingo Molnar <mingo@...nel.org>
> Link: https://lkml.kernel.org/r/20190801133749.11033-1-pauld@redhat.com
> ---
> kernel/sched/fair.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 19c58599e967..1054d2cf6aaa 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -10281,18 +10281,18 @@ err:
> void online_fair_sched_group(struct task_group *tg)
> {
> struct sched_entity *se;
> + struct rq_flags rf;
> struct rq *rq;
> int i;
>
> for_each_possible_cpu(i) {
> rq = cpu_rq(i);
> se = tg->se[i];
> -
> - raw_spin_lock_irq(&rq->lock);
> + rq_lock_irq(rq, &rf);
> update_rq_clock(rq);
> attach_entity_cfs_rq(se);
> sync_throttle(tg, i);
> - raw_spin_unlock_irq(&rq->lock);
> + rq_unlock_irq(rq, &rf);
> }
> }
>
Thanks Thomas!
--
Powered by blists - more mailing lists