lwkt_token_is_stale patch

Matthew Dillon dillon at apollo.backplane.com
Fri Feb 29 11:30:34 PST 2008


:Hi,
:
:Now that the release is over, is there any chance that the following 
:patch gets commited?
:
:   http://leaf.dragonflybsd.org/mailarchive/kernel/2008-02/msg00015.html

    Absolutely.  I'll check it out right now.

:Any feedback is welcome!
:
:And the possible race for UP I describe in the mail:
:
:   http://leaf.dragonflybsd.org/mailarchive/kernel/2008-02/msg00013.html
:
:Do you think this can happen?
:
:Regards,
:
:   Michael

    Hmm.  Yes, if the compiler breaks the operation down into multiple
    instructions the decrement could get lost.  The compiler will virtually
    never do that, but the only way for us to guarantee that it doesn't
    (that is, to guarantee that the decrement is performed with a 
    single instruction) is to call the atomic_subtract_int_nonlocked()
    inline.

    I will make that change.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Submit mailing list