From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
bigeasy@linutronix.de, rjw@rjwysocki.net, oleg@redhat.com,
rostedt@goodmis.org, mingo@kernel.org, mgorman@suse.de,
intel-gfx@lists.freedesktop.org, tj@kernel.org,
Will Deacon <will@kernel.org>,
dietmar.eggemann@arm.com, ebiederm@xmission.com
Subject: Re: [Intel-gfx] [PATCH v3 6/6] freezer, sched: Rewrite core freezer logic
Date: Tue, 25 Oct 2022 07:52:07 +0300 [thread overview]
Message-ID: <Y1drd2gzxUJWdz5F@intel.com> (raw)
In-Reply-To: <Y1LVYaPCCP3BBS4g@intel.com>
On Fri, Oct 21, 2022 at 08:22:41PM +0300, Ville Syrjälä wrote:
> On Mon, Aug 22, 2022 at 01:18:22PM +0200, Peter Zijlstra wrote:
> > +#ifdef CONFIG_LOCKDEP
> > + /*
> > + * It's dangerous to freeze with locks held; there be dragons there.
> > + */
> > + if (!(state & __TASK_FREEZABLE_UNSAFE))
> > + WARN_ON_ONCE(debug_locks && p->lockdep_depth);
> > +#endif
>
> We now seem to be hitting this sporadically in the intel gfx CI.
>
> I've spotted it on two machines so far:
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12270/shard-tglb7/igt@gem_ctx_isolation@preservation-s3@vcs0.html
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109950v1/shard-snb5/igt@kms_flip@flip-vs-suspend-interruptible@a-vga1.html
Sadly no luck in reproducing this locally so far. In the meantime
I added the following patch into our topic/core-for-CI branch in
the hopes of CI stumbling on it again and dumping a bit more data:
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -125,8 +125,16 @@ static int __set_task_frozen(struct task_struct *p, void *arg)
/*
* It's dangerous to freeze with locks held; there be dragons there.
*/
- if (!(state & __TASK_FREEZABLE_UNSAFE))
- WARN_ON_ONCE(debug_locks && p->lockdep_depth);
+ if (!(state & __TASK_FREEZABLE_UNSAFE)) {
+ static bool warned = false;
+
+ if (!warned && debug_locks && p->lockdep_depth) {
+ debug_show_held_locks(p);
+ WARN(1, "%s/%d holding locks while freezing\n",
+ p->comm, task_pid_nr(p));
+ warned = true;
+ }
+ }
#endif
WRITE_ONCE(p->__state, TASK_FROZEN);
--
2.37.4
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-10-25 4:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220822111816.760285417@infradead.org>
[not found] ` <20220822114649.055452969@infradead.org>
2022-10-21 17:22 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: Rewrite core freezer logic Ville Syrjälä
2022-10-25 4:52 ` Ville Syrjälä [this message]
2022-10-25 10:49 ` Peter Zijlstra
2022-10-26 10:32 ` Ville Syrjälä
2022-10-26 11:43 ` Peter Zijlstra
2022-10-26 12:12 ` Peter Zijlstra
2022-10-26 12:14 ` Peter Zijlstra
2022-10-27 5:58 ` Chen Yu
2022-10-27 7:39 ` Peter Zijlstra
2022-10-27 13:09 ` Ville Syrjälä
2022-10-27 16:53 ` Peter Zijlstra
2022-11-02 16:57 ` Ville Syrjälä
2022-11-02 22:16 ` Peter Zijlstra
2022-11-07 11:47 ` Ville Syrjälä
2022-11-10 20:27 ` Ville Syrjälä
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=Y1drd2gzxUJWdz5F@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=dietmar.eggemann@arm.com \
--cc=ebiederm@xmission.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rjw@rjwysocki.net \
--cc=rostedt@goodmis.org \
--cc=tj@kernel.org \
--cc=will@kernel.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