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] [day] [month] [year] [list]
Date:   Mon, 14 Jun 2021 08:18:37 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Geert Uytterhoeven' <geert@...ux-m68k.org>,
        Dave Chinner <david@...morbit.com>
CC:     Dave Chinner <dchinner@...hat.com>,
        Chandan Babu R <chandanrlinux@...il.com>,
        "Darrick J . Wong" <djwong@...nel.org>,
        "Allison Henderson" <allison.henderson@...cle.com>,
        Christoph Hellwig <hch@....de>,
        "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>,
        Linux-Next <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "noreply@...erman.id.au" <noreply@...erman.id.au>
Subject: RE: [PATCH] xfs: Fix 64-bit division on 32-bit in
 xlog_state_switch_iclogs()

From: Geert Uytterhoeven
> Sent: 11 June 2021 07:55
> Hi Dave,
> 
> On Fri, Jun 11, 2021 at 12:02 AM Dave Chinner <david@...morbit.com> wrote:
> > On Thu, Jun 10, 2021 at 01:00:01PM +0200, Geert Uytterhoeven wrote:
...
> > 64 bit division on 32 bit platforms is still a problem in this day
> > and age?
> 
> They're not a problem.  But you should use the right operations from
> <linux/math64.h>, iff you really need these expensive operations.

(64bit) division isn't exactly cheap on 64bit cpus.

Some timing tables for x86 give latencies of well over 1 bit/clock
for Intel cpus, AMD ryzen manage 2 bits/clock.
Signed divide is also significantly more expensive than
unsigned divide.

Integer divide performance is clearly not important enough
to throw silicon at.
The same tables show fdiv having a latency of 16 clocks.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ