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

Re: synching with minios



On 11 Dec 2012, at 11:06, "Robert N. M. Watson" <robert.watson@xxxxxxxxxxxx> 
wrote:

> 
> On 11 Dec 2012, at 10:25, Anil Madhavapeddy wrote:
> 
>> Absolutely. It just requires soft floating point support instead of hardware 
>> calls.  This is available in the ARM backend already, but is an unusual 
>> requirement for x86.
>> 
>> However, it's a requirement before we can merge Gabor Pali's FreeBSD kernel 
>> backend into the main tree, so it's on the TODO list to sort out. Note that 
>> most of the libraries we use only make occasional use of floating point 
>> (unless they're explicit numerical computation libraries), so this won't be 
>> a performance hit either.
> 
> The usual in-kernel workaround is to use a very small amount of fixed-point 
> rather than depend on the presence of floating point -- not just to avoid the 
> functional footprint, but for performance reasons. This is not the ideal 
> solution for everyone, but I do find myself slightly surprised that the base 
> OCaml runtime *must* use FP. You should be able to measure the additional 
> cost on VM/OS context switching with FP enabled as a result. (At least, I 
> would surmise.)

The OCaml runtime doesn't require floating point, but recall that we don't 
control what libraries that are linked in to the final kernel binary.

Many of the OCaml libraries use floating point here and there, and it's easier 
to emulate this as soft floating point than it is to forbid the use of FP by 
modifying the compiler.  It's actually exceptionally easy to forbid floating 
point, as we just need to remove a few functions from the Pervasives module 
such as the (+.) and (-.) operators (OCaml has separate floating point and 
integer operators).

-anil


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.