splxxx replacements?

Matthew Dillon dillon at apollo.backplane.com
Thu Nov 16 10:50:42 PST 2006


: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 
:difference?

    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
      inefficient.

    * 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.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list