linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: "Uwe Kleine-König" <ukleinek@debian.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-pm@vger.kernel.org, x86@kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-rt-users@vger.kernel.org,
	xiao sheng wen <atzlinux@sina.com>
Subject: Re: [PATCH] cpufreq: intel_pstate: Make hwp_notify_lock a raw spinlock
Date: Mon, 30 Sep 2024 12:56:16 +0200	[thread overview]
Message-ID: <20240930105616._7EmK9OS@linutronix.de> (raw)
In-Reply-To: <20240919081121.10784-2-ukleinek@debian.org>

On 2024-09-19 10:11:21 [+0200], Uwe Kleine-König wrote:
> notify_hwp_interrupt() is called via sysvec_thermal() ->
> smp_thermal_vector() -> intel_thermal_interrupt() in hard irq context.
> For this reason it must not use a simple spin_lock that sleeps with
> PREEMPT_RT enabled. So convert it to a raw spinlock.
> 
> Reported-by: xiao sheng wen <atzlinux@sina.com>
> Link: https://bugs.debian.org/1076483
> Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
> ---
> Hello,
> 
> this is deep in x86 land where I have *very* little experience and
> knowledge. Is sysvec_thermal() (defined in arch/x86/kernel/irq.c) really
> running in hard irq context? The stacktrace in the Debian bug report
> suggests that.
> 
> So please double check my reasoning before applying this patch.

Yes, these things are not threaded. Ideally you should have proper
thermal setup so that you don't get any interrupts in regard to this and
start throttling. Once that interrupt fires and starts throttling then
your worst-case latency increases due to the interrupt and lower CPU
frequency.
Delaying the thermal interrupt to a thread might not be wise.

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

> Thanks
> Uwe

Sebastian

  parent reply	other threads:[~2024-09-30 10:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19  8:11 [PATCH] cpufreq: intel_pstate: Make hwp_notify_lock a raw spinlock Uwe Kleine-König
2024-09-23  1:53 ` xiao sheng wen(肖盛文)
2024-09-26  7:48   ` Uwe Kleine-König
2024-09-27  9:43     ` xiao sheng wen(肖盛文)
2024-09-27 10:47 ` srinivas pandruvada
2024-09-28 11:51   ` Uwe Kleine-König
2024-10-01  1:44     ` xiao sheng wen(肖盛文)
2024-09-30 10:56 ` Sebastian Andrzej Siewior [this message]
2024-10-01 18:39 ` Rafael J. Wysocki
2024-10-02  8:24   ` Uwe Kleine-König
2024-10-02 12:12     ` Rafael J. Wysocki

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=20240930105616._7EmK9OS@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=atzlinux@sina.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=ukleinek@debian.org \
    --cc=viresh.kumar@linaro.org \
    --cc=x86@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).