From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: gts-helper: Fix division loop
Date: Mon, 8 Jan 2024 08:35:17 +0200 [thread overview]
Message-ID: <fb847634-94f1-4001-bb5c-3c4c56aba9f7@gmail.com> (raw)
In-Reply-To: <20240107162253.66c1f0f1@jic23-huawei>
On 1/7/24 18:22, Jonathan Cameron wrote:
> On Thu, 4 Jan 2024 11:34:28 +0200
> Matti Vaittinen <mazziesaccount@gmail.com> wrote:
>
>> The loop based 64bit division may run for a long time when dividend is a
>> lot bigger than the divider. Replace the division loop by the
>> div64_u64() which implementation may be significantly faster.
>>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
>> Fixes: 38416c28e168 ("iio: light: Add gain-time-scale helpers")
>
> Hmm. Fix or not perf improvement?
Ha. I don't fancy calling my own doings as bugs - but when a code can
keep kernel busy looping for several seconds... :|
> I'm going to take the middle ground
> and leave the fixes tag, but not rush this in.
I think this is fine. It is nice to get this fix in stable if we have
longer living stables with GTS helpers, because that's where many people
do "real work" - and because it is likely some devices with new sensors
are being built on products using these stable releases.
Still, the current users (ROHM light sensors) don't use that big
dividends. Hence I don't think this needs any high speed fixup process :)
Thanks!
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2024-01-08 6:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 9:34 [PATCH] iio: gts-helper: Fix division loop Matti Vaittinen
2024-01-07 16:22 ` Jonathan Cameron
2024-01-08 6:35 ` Matti Vaittinen [this message]
2024-01-19 11:56 ` Subhajit Ghosh
2024-01-22 6:50 ` Matti Vaittinen
2024-01-22 9:58 ` Subhajit Ghosh
2024-02-04 13:49 ` Subhajit Ghosh
2024-02-05 9:19 ` Matti Vaittinen
2024-01-22 16:27 ` David Laight
2024-01-22 19:24 ` Jonathan Cameron
2024-01-23 10:30 ` Matti Vaittinen
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=fb847634-94f1-4001-bb5c-3c4c56aba9f7@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox