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: <CAMuHMdU+tgMqHcU8Fwr_XVE9RfNEGHnbEYHQ1DraE=YRvQxJuw@mail.gmail.com>
Date: Thu, 26 Jun 2025 16:59:39 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Jani Nikula <jani.nikula@...el.com>
Cc: linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org, 
	Thomas Gleixner <tglx@...utronix.de>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] iopoll: use fsleep() instead of usleep_range()

Hi Jani,

Thanks for your patch!

On Thu, 26 Jun 2025 at 16:51, Jani Nikula <jani.nikula@...el.com> wrote:
> Sometimes it's necessary to poll with long sleeps, and the accuracy of
> usleep_range() is overkill. Use the flexible sleep helper fsleep() for
> sleeping in the read_poll_timeout() family of macros to automatically
> choose the appropriate method of waiting.
>
> Functionally there are a few consequences for existing users:
>
> - 10 us and shorter sleeps will use usleep() instead of

s/usleep/udelay/.

>   usleep_range(). Presumably this will not be an issue.

Note that udelay() does not sleep, but loops.

>
> - When it leads to a slack of less than 25%, msleep() will be used
>   instead of usleep_range(). Presumably this will not be an issue, given
>   the sleeps will be longer in this case.
>
> - Otherwise, the usleep_range() slack gets switched from the begin of
>   the range to the end of the range, i.e. [sleep/2+1..sleep] ->
>   [sleep..sleep+sleep/2]. In theory, this could be an issue in some
>   cases, but difficult to determine before this hits the real world.
>
> Signed-off-by: Jani Nikula <jani.nikula@...el.com>

> Not really sure who to Cc, given MAINTAINERS doesn't match this. Adding
> some past committers.

Oh well ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ