From: Petr Mladek <pmladek@suse.com>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Zhang Rui <rui.zhang@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Eduardo Valentin <edubezval@gmail.com>, Tejun Heo <tj@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] thermal/intel_powerclamp: Convert to CPU hotplug state
Date: Fri, 11 Nov 2016 11:07:13 +0100 [thread overview]
Message-ID: <20161111100713.GF2324@pathway.suse.cz> (raw)
In-Reply-To: <20161111093330.GE2324@pathway.suse.cz>
On Fri 2016-11-11 10:33:30, Petr Mladek wrote:
> Then I tried to revert the conversion to the kthread worker
> API (2nd patch from this patchset), see below. And it still
> hangs during the suspend inside
>
> powerclamp_cpu_predown()
> kthread_stop(*percpu_thread);
>
>
> Note that both kthread_flush_worker() and kthread_stop()
> waits until the kthread gets scheduled and do some job.
> Also note that the kthread is bound to the given CPU.
>
> My guess is that the kthread cannot be scheduled at this stage.
> I wonder if the CPU is already partially down or that tasks
> are freezed so that "normal" tasks are not scheduled at
> this point. I am still trying to understand the code
> related to suspend, cpu hotplug, and scheduler.
And yes, the problem seems to be that the kthread is freezed
so that it could not run. The suspend works when I disable:
clamp_thread()
// set_freezable();
// try_to_freeze();
In fact, we should not need these calls. They are needed only
when we want to stop the kthread on exact location so that
it does not produce I/O that would block/break suspend.
But this is not the case of intel_powerclamp.
I am going to do some more tests and will send a fix. It should
be enough to remove the KTW_FREEZABLE flag from the
kthread_create_worker_on_cpu() call.
Best Regards,
Petr
next prev parent reply other threads:[~2016-11-11 10:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 12:32 [PATCH 0/3] thermal/intel_powerclamp: Conversion to kthread worker API and new CPU hotplug state Petr Mladek
2016-10-17 12:32 ` [PATCH 1/3] thermal/intel_powerclamp: Remove duplicated code that starts the kthread Petr Mladek
2016-10-17 12:32 ` [PATCH 2/3] thermal/intel_powerclamp: Convert the kthread to kthread worker API Petr Mladek
2016-10-17 12:32 ` [PATCH 3/3] thermal/intel_powerclamp: Convert to CPU hotplug state Petr Mladek
2016-10-21 20:21 ` Jacob Pan
2016-10-24 15:48 ` Petr Mladek
2016-10-24 16:55 ` Jacob Pan
2016-10-27 14:53 ` Petr Mladek
2016-10-27 15:17 ` Sebastian Andrzej Siewior
2016-10-27 20:27 ` Jacob Pan
2016-11-11 9:33 ` Petr Mladek
2016-11-11 10:07 ` Petr Mladek [this message]
2016-11-11 17:34 ` Petr Mladek
2016-11-14 19:12 ` Jacob Pan
2016-11-15 11:36 ` Zhang Rui
2016-11-15 16:40 ` Jacob Pan
2016-11-21 11:57 ` Petr Mladek
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=20161111100713.GF2324@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=bigeasy@linutronix.de \
--cc=edubezval@gmail.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rui.zhang@intel.com \
--cc=tglx@linutronix.de \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).