From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Peter Zijlstra <peterz@infradead.org>, jiada_wang@mentor.com
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH 1/1] sched/debug: fix potential deadlock when write to sched_features
Date: Tue, 31 Jul 2018 13:38:07 +0200 [thread overview]
Message-ID: <a0f03f69-ec5f-c667-c440-173c7d363c7f@arm.com> (raw)
In-Reply-To: <20180731103404.GV2494@hirez.programming.kicks-ass.net>
On 07/31/2018 12:34 PM, Peter Zijlstra wrote:
>
> Leaving a lot of quoted crud for Viresh..
>
> On Tue, Jul 31, 2018 at 06:22:19PM +0900, jiada_wang@mentor.com wrote:
>> From: Jiada Wang <jiada_wang@mentor.com>
>>
>> Following lockdep report can be triggered by write to
>> /sys/kernel/debug/sched_features
>
> Only if you're using this dt_cpufreq thing of course.. I wonder why this
> hasn't been reported before.
>
[...]
>
> I don't much care for all the _cpuslocked renaming done, but otherwise I
> suppose this is the easiest fix.
>
> Note however that this doesn't apply, you're missing that match_string()
> patch. Please use tip/sched/core or something.
With the patch tweaked onto tip/sched/core.
w/o the patch:
root@h960:~# echo NO_LB_BIAS > /sys/kernel/debug/sched_features
[ 293.052451]
[ 293.053978] ======================================================
[ 293.060166] WARNING: possible circular locking dependency detected
[ 293.066358] 4.18.0-rc5-00064-gae48698275b3 #1 Tainted: G S
[ 293.073153] ------------------------------------------------------
[ 293.079340] bash/3490 is trying to acquire lock:
[ 293.083966] 00000000155b9437 (cpu_hotplug_lock.rw_sem){++++}, at: static_key_disable+0x1c/0x38
[ 293.092620]
[ 293.092620] but task is already holding lock:
[ 293.098459] 0000000084a95e1c (&sb->s_type->i_mutex_key#3){+.+.}, at: sched_feat_write+0xc4/0x1e0
[ 293.107277]
[ 293.107277] which lock already depends on the new lock.
...
w/ the patch:
root@h960:~# echo NO_LB_BIAS > /sys/kernel/debug/sched_features
root@h960:~#
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
prev parent reply other threads:[~2018-07-31 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 9:22 jiada_wang
2018-07-31 10:34 ` Peter Zijlstra
2018-07-31 11:38 ` Dietmar Eggemann [this message]
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=a0f03f69-ec5f-c667-c440-173c7d363c7f@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=jiada_wang@mentor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=viresh.kumar@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
all inboxes | Powered by JetHome®