All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Dmitry Osipenko <digetx@gmail.com>
Subject: Re: [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq
Date: Thu, 17 Oct 2019 17:42:15 +0100	[thread overview]
Message-ID: <20191017164215.GA32531@bogus> (raw)
In-Reply-To: <CAJZ5v0ixS8ZS93Fgj8XGUMGcLdAy+Fgwp5z3QirccNSiiwLtDA@mail.gmail.com>

On Thu, Oct 17, 2019 at 06:34:28PM +0200, Rafael J. Wysocki wrote:
> On Thu, Oct 17, 2019 at 12:00 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
> >
> > On Thu, Oct 17, 2019 at 03:27:25PM +0530, Viresh Kumar wrote:
> > > On 16-10-19, 15:23, Sudeep Holla wrote:
> > > > Thanks for the spinning these patches so quickly.
> > > >
> > > > I did give it a spin, but unfortunately it doesn't fix the bug I reported.
> > > > So I looked at my bug report in detail and looks like the cpufreq_driver
> > > > variable is set to NULL at that point and it fails to dereference it
> > > > while trying to execute:
> > > >     ret = cpufreq_driver->verify(new_policy);
> > > > (Hint verify is at offset 0x1c/28)
> > > >
> > > > So I suspect some race as this platform with bL switcher tries to
> > > > unregister and re-register the cpufreq driver during the boot.
> > > >
> > > > I need to spend more time on this as reverting the initial PM QoS patch
> > > > to cpufreq.c makes the issue disappear.
>
> I guess you mean commit 67d874c3b2c6 ("cpufreq: Register notifiers
> with the PM QoS framework")?
>

Correct.

> That would make sense, because it added the cpufreq_notifier_min() and
> cpufreq_notifier_max() that trigger handle_update() via
> schedule_work().
>

Yes, it was not clear as I didn't trace to handle_update earlier. After
looking at depth today afternoon, I arrived at the same conclusion.

> [BTW, Viresh, it looks like cpufreq_set_policy() should still ensure
> that the new min is less than the new max, because the QoS doesn't do
> that.]
>
> > > Is this easily reproducible ? cpufreq_driver == NULL shouldn't be the case, it
> > > get updated only once while registering/unregistering cpufreq drivers. That is
> > > the last thing which can go wrong from my point of view :)
> > >
> >
> > Yes, if I boot my TC2 with bL switcher enabled, it always crashes on boot.
>
> It does look like handle_update() races with
> cpufreq_unregister_driver() and cpufreq_remove_dev (called from there
> indirectly) does look racy.

Indeed, we just crossed the mails. I just found that and posted a patch.

--
Regards,
Sudeep

  reply	other threads:[~2019-10-17 16:43 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 10:37 [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Rafael J. Wysocki
2019-10-16 10:41 ` [RFT][PATCH 1/3] PM: QoS: Introduce frequency QoS Rafael J. Wysocki
2019-10-17  9:41   ` Viresh Kumar
2019-10-17 14:16     ` Rafael J. Wysocki
2019-10-18  5:41       ` Viresh Kumar
2019-10-24 19:01   ` Leonard Crestez
2019-10-24 19:34     ` Leonard Crestez
2019-11-17  7:34   ` Doug Smythies
2019-11-17 16:13   ` Doug Smythies
2019-11-19 14:35     ` Doug Smythies
2019-11-19 19:17       ` Rafael J. Wysocki
2019-11-19 22:13         ` Rafael J. Wysocki
2019-11-20  6:55           ` Doug Smythies
2019-11-20  9:08             ` Rafael J. Wysocki
2019-10-16 10:47 ` [RFT][PATCH 2/3] cpufreq: Use per-policy " Rafael J. Wysocki
2019-10-16 18:01   ` Dmitry Osipenko
2019-10-17 21:29     ` Dmitry Osipenko
2019-10-18  9:29       ` Viresh Kumar
2019-10-18 15:31         ` Dmitry Osipenko
2019-10-16 10:47 ` [RFT][PATCH 3/3] PM: QoS: Drop frequency QoS types from device PM QoS Rafael J. Wysocki
2019-10-16 14:23 ` [RFT][PATCH 0/3] cpufreq / PM: QoS: Introduce frequency QoS and use it in cpufreq Sudeep Holla
2019-10-17  9:57   ` Viresh Kumar
2019-10-17  9:59     ` Sudeep Holla
2019-10-17 16:34       ` Rafael J. Wysocki
2019-10-17 16:42         ` Sudeep Holla [this message]
2019-10-18  5:44         ` Viresh Kumar
2019-10-18  8:24           ` Rafael J. Wysocki
2019-10-18  8:27             ` Viresh Kumar
2019-10-18  8:30               ` Rafael J. Wysocki
2019-10-18  9:24                 ` Viresh Kumar
2019-10-18  9:26                   ` Rafael J. Wysocki
2019-10-18  9:28                     ` Viresh Kumar
2019-10-17 17:14   ` Sudeep Holla
2019-10-17  9:46 ` Viresh Kumar
  -- strict thread matches above, loose matches on Subject: below --
2019-10-22 22:06 Leonard Crestez
2019-10-22 22:47 ` Rafael J. Wysocki
2019-10-23  2:20   ` Leonard Crestez
2019-10-23  8:54     ` Rafael J. Wysocki
2019-10-23  8:57       ` Rafael J. Wysocki
2019-10-23 13:33       ` Leonard Crestez
2019-10-24 13:42         ` Rafael J. Wysocki
2019-10-24 17:47           ` Leonard Crestez
2019-10-24 21:10             ` Rafael J. Wysocki
2019-10-25 18:04               ` Leonard Crestez

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=20191017164215.GA32531@bogus \
    --to=sudeep.holla@arm.com \
    --cc=digetx@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --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.