DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: nvidia machdep.c patch still useful ?

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Apr 2004 10:19:57 -0800 (PST)

:> It doesn't look too well thought out, does it ;)
:> >     NVidia is that they are using %gs in the kernel and we aren't
:> >     saving/restoring it.
:> >
:> >     I guess we should just start doing that and to hell with the extra
:> >     few nanoseconds of switching overhead.
:> Seems like the price isn't that high :)   Are all the changes localized
:> to machdep.c ?
:Looks like /usr/src/sys/i386/include/frame.h ...
:I suppose I add gs to all of those, then look to see who's doing saves
:and restores and patch those too. Would that mean also mean that I could
:also get rid of the load_gs() bits that exist here and there ?

    I looked at it some more and I think the FBsd signal handler code 
    is what is broken.  And I mispoke.. this is user level %gs use, not
    kernel level.  Our signal handler should not be resetting it.  5.x's
    signal handler doesn't, so neither should we.

    But 5.x's signal handler is resetting %fs, and I think we probably need
    to leave that part of it in.  Can you test with just the load_gs()
    removed (leaving the tf_fs = _udatasel intact) ?  It looks like our
    switch code already handles %gs properly, so I think all that needs
    to be done is to remove that load_gs().

					Matthew Dillon 

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