DragonFly kernel List (threaded) for 2003-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: libcaps thread testing code committed
"Matthew Dillon" <dillon@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:200312070449.hB74nM2B058830@xxxxxxxxxxxxxxxxxxxxxxx
> Thread testing code has been committed for libcaps. Note that
the FP
> 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
0.15
> second while the same test which also saves and restore FP
regs ran
> in 0.45 seconds. So it's the difference between
75ns/context-switch
> 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
FP-use
> is with a CR0 bit and needless to say this cannot be done from
> userland. We can designate integer threads to avoid saving
and
> restoring FP regs in those threads, but otherwise I don't see
any way
> to avoid it.... remember, anything that adds a system call
will add
> about a microsecond to the switch code, so implementing
anything
> that requires a system call will wind up being slower then
just
> 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?
Joshua Coombs
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]