From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: pauld@redhat.com, vincent.guittot@linaro.org, hpa@zytor.com,
linux-kernel@vger.kernel.org, peterz@infradead.org,
mingo@redhat.com, tglx@linutronix.de, mingo@kernel.org,
linux-tip-commits@vger.kernel.org
Subject: Re: [tip:sched/core] sched/fair: Use rq_lock/unlock in online_fair_sched_group
Date: Fri, 9 Aug 2019 18:21:22 +0200 [thread overview]
Message-ID: <dfc8f652-ca98-e30a-546f-e6a2df36e33a@arm.com> (raw)
In-Reply-To: <tip-6b8fd01b21f5f2701b407a7118f236ba4c41226d@git.kernel.org>
On 8/8/19 1:01 PM, tip-bot for Phil Auld wrote:
[...]
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 19c58599e967..d9407517dae9 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(rq, &rf);
> update_rq_clock(rq);
> attach_entity_cfs_rq(se);
> sync_throttle(tg, i);
> - raw_spin_unlock_irq(&rq->lock);
> + rq_unlock(rq, &rf);
> }
> }
Shouldn't this be:
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d9407517dae9..1054d2cf6aaa 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -10288,11 +10288,11 @@ void online_fair_sched_group(struct task_group
*tg)
for_each_possible_cpu(i) {
rq = cpu_rq(i);
se = tg->se[i];
- rq_lock(rq, &rf);
+ rq_lock_irq(rq, &rf);
update_rq_clock(rq);
attach_entity_cfs_rq(se);
sync_throttle(tg, i);
- rq_unlock(rq, &rf);
+ rq_unlock_irq(rq, &rf);
}
}
Currently, you should get a 'inconsistent lock state' warning with
CONFIG_PROVE_LOCKING.
next prev parent reply other threads:[~2019-08-09 16:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 13:37 [PATCH] sched: use rq_lock/unlock in online_fair_sched_group Phil Auld
2019-08-05 14:06 ` Phil Auld
2019-08-06 13:03 ` Peter Zijlstra
2019-08-06 13:58 ` Phil Auld
2019-08-09 13:33 ` Phil Auld
2019-08-09 17:43 ` Valentin Schneider
2019-08-15 13:39 ` Phil Auld
2019-08-08 11:01 ` [tip:sched/core] sched/fair: Use " tip-bot for Phil Auld
2019-08-09 16:21 ` Dietmar Eggemann [this message]
2019-08-09 17:28 ` Phil Auld
2019-08-12 9:56 ` Dietmar Eggemann
2019-08-12 12:52 ` tip-bot for Phil Auld
2019-08-12 13:13 ` Phil Auld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfc8f652-ca98-e30a-546f-e6a2df36e33a@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).