Linux-rt-users Archive on lore.kernel.org
 help / color / Atom feed
From: Ran Wang <ran.wang_1@nxp.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jiafei Pan <jiafei.pan@nxp.com>,
	"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Sebastian Siewior <bigeasy@linutronix.de>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: RE: [PATCH] rt: cpufreq: Fix cpu hotplug hang
Date: Tue, 23 Feb 2021 02:26:02 +0000
Message-ID: <AM6PR04MB5413DB3654A87D50C909004CF1809@AM6PR04MB5413.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20210222140107.qk2ymlwyyxspluge@linutronix.de>

Hello Rafael,


On Monday, February 22, 2021 10:01 PM, Sebastian Siewior wrote:
> 
> On 2021-02-19 16:44:20 [+0800], Ran Wang wrote:
> > When selecting PREEMPT_RT, cpufreq_driver->stop_cpu(policy) might got
> > stuck due to irq_work_sync() pending for work on lazy_list. That’s
> > because lazy_list may have no chance to be served in softirq context
> > sometimes. Below is one of scenarios that was captured:
> >
> > ...
> > ret_from_fork
> >  kthread
> >   smpboot_thread_fn
> >    cpuhp_thread_fun
> >     cpuhp_invoke_callback: state: 193
> >      cpuhp_cpufreq_online
> >       cpufreq_online
> >        cpufreq_driver->stop_cpu(policy);
> >         cpufreq_dbs_governor_stop
> >          sugov_stop  // kernel/sched/cpufreq_schedutil.c
> >           irq_work_sync(&sg_policy->irq_work);
> >
> > This is observed on LX2160ARDB (16 A72 cores) with cpufreq governor of
> > ‘schedutil’ or ‘ondemand’.
> 
> While staring at it, why do we invoke schedule_work_on() and
> kthread_queue_work() from inside irq_work() instead invoking it directly? It raises an interrupt in which it kicks a user thread.
> Couldn't we do it without irq_work?

Could you please help comment on above question (I just follow CPU Freq scaling framework, can't tell why) Thank you very much.

Regards,
Ran

  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  8:44 Ran Wang
2021-02-22 14:01 ` Sebastian Siewior
2021-02-23  2:26   ` Ran Wang [this message]
2021-02-23  3:13     ` Viresh Kumar
2021-02-24 16:37       ` Sebastian Siewior
2021-02-25  2:31         ` Ran Wang
2021-03-23  7:00         ` Ran Wang

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=AM6PR04MB5413DB3654A87D50C909004CF1809@AM6PR04MB5413.eurprd04.prod.outlook.com \
    --to=ran.wang_1@nxp.com \
    --cc=bigeasy@linutronix.de \
    --cc=jiafei.pan@nxp.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --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

Linux-rt-users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rt-users/0 linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ https://lore.kernel.org/linux-rt-users \
		linux-rt-users@vger.kernel.org
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rt-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git