lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZbAlFKE_fZ_riRVu@kekkonen.localdomain>
Date: Tue, 23 Jan 2024 20:44:04 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: linux-pm@...r.kernel.org, "Rafael J. Wysocki" <rafael@...nel.org>,
	linux-pci@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	Jaroslav Kysela <perex@...ex.cz>,
	Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>,
	laurent.pinchart@...asonboard.com, David Airlie <airlied@...il.com>,
	Paul Elder <paul.elder@...asonboard.com>,
	linux-media@...r.kernel.org,
	Thomas Hellström <thomas.hellstrom@...ux.intel.com>,
	intel-gfx@...ts.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@...el.com>,
	Mark Brown <broonie@...nel.org>,
	Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@...el.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	intel-xe@...ts.freedesktop.org,
	Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
	Alex Elder <elder@...nel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-sound@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
	Daniel Vetter <daniel@...ll.ch>, netdev@...r.kernel.org
Subject: Re: [PATCH v4 1/3] pm: runtime: Simplify pm_runtime_get_if_active()
 usage

Hi Bjorn,

Thanks for the review.

On Tue, Jan 23, 2024 at 11:24:23AM -0600, Bjorn Helgaas wrote:
> On Tue, Jan 23, 2024 at 11:56:42AM +0200, Sakari Ailus wrote:
> > There are two ways to opportunistically increment a device's runtime PM
> > usage count, calling either pm_runtime_get_if_active() or
> > pm_runtime_get_if_in_use(). The former has an argument to tell whether to
> > ignore the usage count or not, and the latter simply calls the former with
> > ign_usage_count set to false. The other users that want to ignore the
> > usage_count will have to explitly set that argument to true which is a bit
> > cumbersome.
> > 
> > To make this function more practical to use, remove the ign_usage_count
> > argument from the function. The main implementation is renamed as
> > pm_runtime_get_conditional().
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
> > Reviewed-by: Alex Elder <elder@...aro.org> # drivers/net/ipa/ipa_smp2p.c
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> > Acked-by: Takashi Iwai <tiwai@...e.de> # sound/
> > Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@...ux.intel.com> # drivers/accel/ivpu/
> > Acked-by: Rodrigo Vivi <rodrigo.vivi@...el.com> # drivers/gpu/drm/i915/
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@...el.com>
> 
> Acked-by: Bjorn Helgaas <bhelgaas@...gle.com> # drivers/pci/
> 
> - Previous PM history uses "PM: " in the subject lines (not "pm: ").

Oops. I'm not sure why I used lower case. (Maybe I've written too many
times "media:" prefix to the subject?) I'll fix this in v5.

> 
> - I don't know whether it's feasible, but it would be nice if the
>   intel_pm_runtime_pm.c rework could be done in one shot instead of
>   being split between patches 1/3 and 2/3.
> 
>   Maybe it could be a preliminary patch that uses the existing
>   if_active/if_in_use interfaces, followed by the trivial if_active
>   updates in this patch.  I think that would make the history easier
>   to read than having the transitory pm_runtime_get_conditional() in
>   the middle.

I think I'd merge the two patches. The second patch is fairly small, after
all, and both deal with largely the same code.

> 
> - Similarly, it would be nice if pm_runtime_get_conditional() never
>   had to be published in pm_runtime.h, instead of being temporarily
>   added there by this patch and then immediately made private by 2/3.
>   Maybe that's not practical, I dunno.

-- 
Regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ