DragonFly kernel List (threaded) for 2003-12
Re: libcaps thread testing code committed
"Matthew Dillon" <dillon@xxxxxxxxxxxxxxxxxxxx> wrote in message
> Thread testing code has been committed for libcaps. Note that
> regs are not saved and restored yet (though there is assembly
to do it
> present). I did some preliminary switch overhead tests with
fp save and
> restore and without. 2 million lwkt_swich() calls execute in
> second while the same test which also saves and restore FP
> in 0.45 seconds. So it's the difference between
> and 225ns/context-switch (on an AMD-64).
> So far my investigation into using a delayed-FP-save has been
> unsuccessful. The only way to generate an FP exception on
> is with a CR0 bit and needless to say this cannot be done from
> userland. We can designate integer threads to avoid saving
> restoring FP regs in those threads, but otherwise I don't see
> to avoid it.... remember, anything that adds a system call
> about a microsecond to the switch code, so implementing
> that requires a system call will wind up being slower then
> unconditionally saving and restoring the FP regs.
As much as I normally champion maintaining support for older
systems, like 386's, this could be an opportunity to set a minimum
requirement spec that more matches modern hardware.
Intel seems determined to move the world away from x87, and afik at
this point even GCC is capible of targetting all fp code against
SSE. SSE support is present in most Athlons and all P3 and up
cpus... would it be possible to just drop support for x87 fpu and
move to SSE only?