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

Re: splxxx replacements?

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Nov 2006 10:35:31 -0800 (PST)

:Thanks for some explanation. However, it seems the crit_enter/exit only 
:works on one CPU in an SMP environment too (looking back at previous 
:posting in thread). Is there really a practical as well as conceptual 

    There are several differences.

    * The crit*() calls can nest.  The spl*() calls were able to nest, but
      there was no nesting count tracking so if code screwed up the nesting
      (forgot a splx() for example) the whole system could get confused.

    * spl*() calls imply a limited number of interrupt sources.  32 in our
      case.  I don't want that abstraction to be visible to machine 
      independant code.

    * The code generated to handle the crit*() calls is a lot less cumbersome
      then the code generated to handle the spl*() calls.

    * For any modern device, interrupt overhead is in the low microseconds
      range and the interrupt is not typically time-sensitive the way 
      a serial interrupt is.  Interrupting an interrupt is really

    * A multi-layer abstraction (where one interrupt can interrupt another
      interrupt)... also known as preemption in FreeBSDland, is a bad idea
      that can lead to all sorts of unexpected side effects.  I just don't
      want to have to deal with it.

					Matthew Dillon 

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