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]
Date:   Thu, 13 Jun 2019 14:42:57 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Marc Gonzalez <marc.w.gonzalez@...e.fr>
Cc:     Matt Wagantall <mattw@...eaurora.org>,
        Mitchel Humpherys <mitchelh@...eaurora.org>,
        Will Deacon <will.deacon@....com>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Douglas Anderson <dianders@...omium.org>
Subject: Re: [PATCH v1] iopoll: Tweak readx_poll_timeout sleep range

On Thu, Jun 13, 2019 at 2:16 PM Marc Gonzalez <marc.w.gonzalez@...e.fr> wrote:
>
> Chopping max delay in 4 seems excessive. Let's just cut it in half.
>
> Signed-off-by: Marc Gonzalez <marc.w.gonzalez@...e.fr>
> ---
> When max_us=100, old_min was 26 us; new_min would be 50 us
> Was there a good reason for the 1/4th?
> Is new_min=0 a problem? (for max=1)

You normally want a large enough range between min and max. I don't
see anything wrong with a factor of four.

> @@ -47,7 +47,7 @@
>                         break; \
>                 } \
>                 if (__sleep_us) \
> -                       usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
> +                       usleep_range(__sleep_us / 2, __sleep_us); \
>         } \

You are also missing the '+1' now, so this breaks with __sleep_us=1.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ