[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7478840c18fc45379697609757c6c747@AcuMS.aculab.com>
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