-----Original Message-----
From: Peter Jeremy [mailto:peter.jer...@alcatel-lucent.com] 
Sent: 22 December 2010 21:17
To: Deano
Cc: zfs-discuss@opensolaris.org
Subject: Re: [zfs-discuss] stupid ZFS question - floating point operations

On 2010-Dec-23 04:48:19 +0800, Deano <de...@rattie.demon.co.uk> wrote:
> modern CPU are float monsters indeed its likely some things would be 
>faster if converted to use the float ALU
Peter wrote
> _Some_ modern CPUs are good at FP, a lot aren't.  The SPARC T-1 was
particularly
> poor as it only had a single FPU.  Likewise, performance in the x86 world
is highly
> variable, depending on the vendor and core you pick.  AFAIK, iA64 and PPC
are
> consistently good - but neither are commonly found in conjunction with
ZFS.  You
> may also need to allow for software assist:  Very few CPUs implement all
of the
> IEEE FP standard in hardware and most (including SPARC) require software
to
> implement parts of the standard.  If your algorithm happens to make
significant use
> of things other than normalised numbers and zero, your performance may be
severely
> affected by the resultant traps and software assistance.
I can't speak for old architecture like SPARC but all modern ALU designs
support most of the subset of useful IEEE in hardware and at high speed.
In particular x86 has extremely good float ALU performance, compared to some
architectures it is relatively low but certainly not something to avoid.

A CPU design that isn't at *least* 5 GFLOPS per core is archaic. This is
only accelerating due to the consumer market that many CPUs end up in. From
graphics to video decoding to audio synthesis, floating point math
dominants.

Not to say they aren't able to perform very many integer ALU ops as well,
just that the old mantra that FPU is to be avoided hasn't been true for
years.

> Any use of floating point within the kernel also means changes to when FPU
context
> is saved - and, unless this can be implemented lazily, it will adversely
impact the
> cost of all context switches and potentially system calls.
Of course the cost of the extra register movement involved in context
switches is a concern, but this cost can be evaluated against the gains. I
like to see someone actually profile the costs in SunOs as many kernel
architectures I know accept FPU (and other specialist registers) restoration
when needed as a worthwhile cost.

Bye,
Deano

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to