Le Monday 22 June 2009 10:02:31 Florian Fainelli, vous avez écrit :
> Le Sunday 21 June 2009 01:04:05 Jonas Gorski, vous avez écrit :
> > 2009/6/21 Michael Buesch <[email protected]>:
> > > On Saturday 20 June 2009 23:56:51 Jonas Gorski wrote:
> > >> 2009/6/20 Michael Buesch <[email protected]>:
> > >> > On Saturday 20 June 2009 00:09:56 Jonas Gorski wrote:
> > >> >> > If we do _not_ gain performance, it certainly is not a good idea
> > >> >> > to waste space.
> > >> >>
> > >> >> I would be very surprised if we wouldn't. Every kernel emulated
> > >> >> floating point operation results in an exception and the
> > >> >> appropriate handling (fpu emulation is ugly), while soft-float
> > >> >> should stay completely in user space.
> > >> >>
> > >> >> Also, the mips fpu emulator itself suggests that.
> > >> >>
> > >> >> Quoting linux/arch/mips/math-emu/cp1emu.c:
> > >> >> > * Note if you know that you won't have an fpu, then you'll get
> > >> >> > much * better performance by compiling with -msoft-float!
> > >> >>
> > >> >> To get some numbers: Perhaps could somebody test with 'sample' from
> > >> >> libmpcdec the difference in speed between in-kernel emulation and
> > >> >> soft-float? https://dev.openwrt.org/ticket/4715 suggests that the
> > >> >> library depends heavily on floating point when not using fixed
> > >> >> point math.
> > >> >
> > >> > No you completely got me wrong. I am talking about the performance
> > >> > gain in real life. userspace soft float certainly _is_ faster than
> > >> > kernel float. But _if_ userspace soft float is bigger in size than
> > >> > kernel float, it probably is not worth the space tradeoff, because
> > >> > floating point is hardly used on a router.
> > >>
> > >> I apology, I really did misunderstand you.
> > >>
> > >> > Did somebody test this:
> > >> > * Image with kernel FP emu disabled and userspace softemu enabled.
> > >> > * Image with kernel FP emu enabled and userspace softemu disabled.
> > >> >
> > >> > Which one is smaller?
> > >>
> > >> Disabling the kernel fpu emu isn't intended in linux, so I had to hack
> > >> the emulation away, mainly by removing any fpu references in
> > >> arch/mips/kernel/ until it compiled.
> > >> I don't know if it really works, I don't have a second device for
> > >> testing.
> > >>
> > >> I used the brcm47xx/default profile for testing, making distclean
> > >> before compiling.
> > >>
> > >> With kernel-fpuemu and no softfloat:
> > >> 2560000 openwrt-brcm47xx-squashfs.trx
> > >> Without fpuemu and with softfloat:
> > >> 2625536 openwrt-brcm47xx-squashfs.trx
> > >>
> > >> So the image with soft-float instead of the in-kernel fpu emulation
> > >> uses one block more. For me this would be an acceptable increase.
> > >
> > > So what about the following. We introduce another option in the kernel
> > > config to disable fpuemu. This way the user can select either useremu,
> > > kernelemu or no emu at all. This probably is a win-win situation then.
> > > Because if I do care about space, I can turn off _both_ emulators. And
> > > you, who do care about performance, can set the openwrt default to
> > > kernelemu-off useremu-on.
> >
> > This would probably the best option. We should then test which
> > applications/libraries need floating point support and mark these with
> > an appropriate dependency.
> > Going with no float support might require additional tweaking, as
> > busybox seems to use floating point.
>

Sotware floating point emulation is now enabled by default for mips and mipsel 
and the kernel FPU emulator is disabled by default with changesets 16605 and 
16606.
-- 
Best regards, Florian Fainelli
Email : [email protected]
http://openwrt.org
-------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to