Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

vfp_fpscr_handler() from vfp_handler()



Hello,
in vfp_handler() (the handler for FPU fault, which will manage the FPU
lazy context switch), we call vfp_fpscr_handler() at the beggining.

The point should be to avoid a full FPU context switch is we just
want to read or write to the FPSCR from user code.

But a printf() here shows that vfp_fpscr_handler() can successfully emulate
the instruction only once in a while. so we're paying a function call and
a few tests in the FPU handler for nothing.

After 15mn from a clean boot and running opencpn:
chartplotter-dd:/home/bouyer>vmstat -e | grep fp
cpu0 vfp coproc use                   284    0 misc
cpu0 vfp coproc re-use              11749   12 misc
cpu1 vfp coproc use                   232    0 misc
cpu1 vfp coproc re-use               9432    9 misc

but nothing from vfp_fpscr_handler(). I actually have this printf in place
for a few days on different boards and saw it fire only a couple of time.

Would anyone mind if I remove this call from vfp_handler() ? It should save
a few cycle for threads using the FPU ...

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index