[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y128txhh.fsf@ubik.fi.intel.com>
Date: Mon, 28 Oct 2024 10:58:34 +0200
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Nam Cao <namcao@...utronix.de>, Anna-Maria Behnsen
<anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Andreas Hindborg
<a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Miguel Ojeda
<ojeda@...nel.org>, Kees Cook <kees@...nel.org>,
linux-kernel@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, "Martin K. Petersen"
<martin.petersen@...cle.com>, Alexandre Belloni
<alexandre.belloni@...tlin.com>, "Rafael J. Wysocki" <rafael@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>, Sebastian Reichel
<sre@...nel.org>, Will Deacon <will@...nel.org>, Jon Mason
<jdmason@...zu.us>, Jaehoon Chung <jh80.chung@...sung.com>, Hans Verkuil
<hverkuil-cisco@...all.nl>, Jassi Brar <jassisinghbrar@...il.com>, Pavel
Machek <pavel@....cz>, Dmitry Torokhov <dmitry.torokhov@...il.com>,
Jonathan Cameron <jic23@...nel.org>, Andi Shyti <andi.shyti@...nel.org>,
Alex Deucher <alexander.deucher@....com>, Jani Nikula
<jani.nikula@...ux.intel.com>, Rob Clark <robdclark@...il.com>, Lucas De
Marchi <lucas.demarchi@...el.com>, Zack Rusin <zack.rusin@...adcom.com>,
"Michael S. Tsirkin" <mst@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>, Uwe
Kleine-König <ukleinek@...nel.org>, Takashi Iwai
<tiwai@...e.com>,
alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH 00/44] hrtimers: Switch to new hrtimer interface
functions (4/5)
Nam Cao <namcao@...utronix.de> writes:
> This is the forth part of a 5-part series (split for convenience). All 5
> parts are:
>
> Part 1: https://lore.kernel.org/lkml/cover.1729864615.git.namcao@linutronix.de
> Part 2: https://lore.kernel.org/lkml/cover.1729864823.git.namcao@linutronix.de
> Part 3: https://lore.kernel.org/lkml/cover.1729865232.git.namcao@linutronix.de
> Part 4: https://lore.kernel.org/lkml/cover.1729865485.git.namcao@linutronix.de
> Part 5: https://lore.kernel.org/lkml/cover.1729865740.git.namcao@linutronix.de
Which one do I need to click on to see the actual hrtimer_setup*()
implementations? Why is it even a separate series? Please, don't make
people click on things.
> To use hrtimer, hrtimer_init() (or one of its variant) must be called, and
> also the timer's callfack function must be setup separately.
"callback", right?
> That can cause misuse of hrtimer. For example, because:
> - The callback function is not setup
> - The callback function is setup while it is not safe to do so
These are not examples, these are hypotheticals. Do either of these
things actually happen in the codebase?
> To prevent misuse of hrtimer, this series:
> - Introduce new functions hrtimer_setup*(). These new functions are
> similar to hrtimer_init*(), except that they also sanity-check and
> initialize the callback function.
No, it doesn't. This series only converts some drivers. I'd like to see
the sanity-checking in question, since it's the big selling point.
But IMO, "switching to a cleaner hrtimer API" or some words to that
effect is a better justification than sanity checking.
I'm not objecting to the idea, it's just carried out weirdly.
> - Introduce hrtimer_update_function() which checks that it is safe to
> change the callback function. The 'function' field of hrtimer is then
> made private.
Also not in this series.
> - Convert all users to use the new functions.
> - Some minor cleanups on the way.
Thanks,
--
Alex
Powered by blists - more mailing lists