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

Re: [Xen-devel] [GSoc] Adding Floating Point support to Mini-OS



Hello,

Felix Schmoll, on mer. 29 mars 2017 20:53:14 +0200, wrote:
> -While implementing our own kernel last semester me and my team-mate
> came to believe that pusha/popa were faster that pushing/popping the
> individual registers, since it is just a single command. The Mini-OS
> kernel however does the latter. Is that a conscience performance-trade
> for something or did we just underly a misconception, in that it
> compiles to the same thing in the end?

That's very old code :) I guess if there had been any performance trade,
since that was more than a decade ago, the trade is moot with nowadays'
processor architectures being very different :)

I guess one argument could be to allow flexibility for other register
order, or something like that. Probably not something strong anyway, so
I'd say don't believe there was much thinking there :)

> -Lazy floating point register saving is similar to Copy-on-write, is that 
> correct?

Mmm, not so exactly, depends how you understand "similar" and
"copy-on-write" :)

It's true that it makes sense to compare with copy-on-write, in the
sense that as long as the next thread does not touch FP stuff, one
can keep the previous thread FP state as it is, leading to noticeable
optimization of loading/storing those 512bit-ish registers :)

I however don't think you want to try to implement the "copy"
optimization part of memory copy-on-write, in the sense that when you
create a new thread, better just copy the FP state from the creator, and
not try to share the state like copy-on-write does with memory between
processes.  Optimizing the context switch cost is the most of what
you'll want to optimize.

> -There is nothing preventing me from using some floating-point library
> for the user-space test program, right?

Sure.  You just run the risk of pulling stuff which would require more
OS support from mini-os than currently implemented :)

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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