All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Jens Axboe <axboe@kernel.dk>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq: intel_pstate: Fix for HWP interrupt before driver is ready
Date: Tue, 7 Sep 2021 15:41:23 +0200	[thread overview]
Message-ID: <CAJZ5v0hLXuF8HXcW61TqiBxYnskkb-nkah=XzX2SH8EKGJB-RA@mail.gmail.com> (raw)
In-Reply-To: <980bc41a8bedbd81c199a78ce9f2ab2ef7b9341f.camel@linux.intel.com>

On Mon, Sep 6, 2021 at 9:57 PM Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
>
> On Mon, 2021-09-06 at 20:25 +0200, Rafael J. Wysocki wrote:
> > On Mon, Sep 6, 2021 at 8:14 PM Srinivas Pandruvada
> > <srinivas.pandruvada@linux.intel.com> wrote:
> > >
> > > On Mon, 2021-09-06 at 19:54 +0200, Rafael J. Wysocki wrote:
> > > >
> [...]
>
> > > >
> > > We are handling offline for other thermal interrupt sources from
> > > same
> > > interrupt in therm-throt.c, where we do similar in offline path (by
> > > TGLX). If cpufreq offline can cause such issue of changing CPU,
> >
> > This is not cpufreq offline, but intel_pstate_update_status() which
> > may be triggered via sysfs.  And again, the theoretically problematic
> > thing is dereferencing cpudata (which may be cleared by a remote CPU)
> > from the interrupt handler without protection.
>
> This will be a problem.
>
> >
> > > I can call intel_pstate_disable_hwp_interrupt() via override from
> > > https://elixir.bootlin.com/linux/latest/C/ident/thermal_throttle_offline
> > > after masking APIC interrupt.
> >
> > But why would using RCU be harder than this?
> I think, this will require all_cpu_data and cpu_data to be rcu
> protected. This needs to be well tested.
>
> I think better to revert the patch for the next release.

Done, thanks!

  reply	other threads:[~2021-09-07 13:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04  5:37 [PATCH] cpufreq: intel_pstate: Fix for HWP interrupt before driver is ready Srinivas Pandruvada
2021-09-06 16:17 ` Rafael J. Wysocki
2021-09-06 16:43   ` Jens Axboe
2021-09-06 16:54     ` Srinivas Pandruvada
2021-09-06 16:58       ` Rafael J. Wysocki
2021-09-06 17:23         ` Srinivas Pandruvada
2021-09-06 17:54           ` Rafael J. Wysocki
2021-09-06 18:14             ` Srinivas Pandruvada
2021-09-06 18:25               ` Rafael J. Wysocki
2021-09-06 19:56                 ` Srinivas Pandruvada
2021-09-07 13:41                   ` Rafael J. Wysocki [this message]
2021-09-06 16:53   ` Srinivas Pandruvada

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='CAJZ5v0hLXuF8HXcW61TqiBxYnskkb-nkah=XzX2SH8EKGJB-RA@mail.gmail.com' \
    --to=rafael@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.