All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>, Kyle Meyer <kyle.meyer@hpe.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	linux-acpi@vegr.kernel.org
Subject: Re: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver exists
Date: Mon, 7 Jun 2021 16:44:15 +0530	[thread overview]
Message-ID: <20210607111415.ede2s5ay7255x5pm@vireshk-i7> (raw)
In-Reply-To: <CAJZ5v0g-NMLa1UVYKpF2ehgk=6dJkKRonUY0AGw6HyRCDaQMmw@mail.gmail.com>

On 07-06-21, 13:02, Rafael J. Wysocki wrote:
> On Mon, Jun 7, 2021 at 9:26 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > I am not sure how this is supposed to work. If we return 0 from
> > acpi_cpufreq_init(),
> > then the driver will never be used, since it's acpi_cpufreq_init()
> > will never get
> > called again later.
> 
> Unless the module is unloaded and loaded again, that is.

Right.

> > cpufreq drivers don't follow the generic device/driver model where a driver gets
> > probed again if a device appears and so this is broken.
> 
> It is broken anyway as per the changelog of this patch.
> 
> On systems with several hundred logical CPUs this really can be troublesome.

Hmm, I agree.

> > Please revert this patch.
> 
> Well, you can argue that the problem at hand is outside the kernel and
> so it's not a kernel's business to address it.

Exactly, what we did here is add a band-aid to make a userspace tool
happy, the kernel was doing the right thing earlier.

> After all, systemd-udevd could learn to avoid attempting to load the
> module again if it fails with -EEXIST,

That is one way, right.

> but I'm not sure how different
> that really would be from what this patch does, in practice.

The very first difference is we won't be adding an incorrect hack in
the kernel to solve this userspace problem. Else in order to make
acpi-cpufreq driver work, after a user unloads intel-pstate, user
would be required to unload the acpi-cpufreq and load it again, which
will surely look confusing to the user. Why unload to load it again ?

Leaving a module inserted in an unusable state is not the right
solution to fix a problem IMHO.

-- 
viresh

  reply	other threads:[~2021-06-07 11:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 22:19 Kyle Meyer
2021-05-21 22:19 ` Kyle Meyer
2021-05-24 14:16 ` Rafael J. Wysocki
2021-06-07  7:25   ` Viresh Kumar
2021-06-07 11:02     ` Rafael J. Wysocki
2021-06-07 11:14       ` Viresh Kumar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-18 19:34 kyle.meyer
2021-05-21 13:01 ` 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=20210607111415.ede2s5ay7255x5pm@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=kyle.meyer@hpe.com \
    --cc=linux-acpi@vegr.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tiwai@suse.de \
    --subject='Re: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver exists' \
    /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

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.