Subject: Re: Floating point calculation in the kernel
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 02/24/2005 18:19:06
>> Or tweak the port you're using to save/restore FPU state when your
>> code wants to use it. (Though I suspect using the word "tweak" may
>> underestimate the work involved in this option.)
> Actually, it would be very easy on x86. I think I did it once while
> playing with winmodem crap...
I don't see any explicit mention of which port was in use in the
original message. Statistics do imply it as probably i386 - and the
message mentions npxdna_xmm appearing in a stack trace, and a
superficial grep makes me think that's i386-specific; I see it in only
two files under sys/arch (i386/isa/npx.c and xen/i386/npx.c).
I assume that what you did was an explicit save before and restore
after the kernel float stuff? Any thoughts on how hard it would be to
do saves and restores as necessary to make floating point in the kernel
Just Work? (I feel certain it's _possible_; I'm just wondering how
hard it would be to do, and how much of a speed penalty would ensue.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B