Subject: Re: SMP re-eetrancy in "bottom half" drivers
To: None <ups@tree.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 05/18/2005 06:59:18
> > Yes; your old patch for i386 SMP effectively collapsed all SPLs to a
> > single level. That way, no driver should interrupt another.
> 
> One level may be a little extreme since you may run into trouble with
> pmap operations in drivers that need interprocessor interrupts for TLB
> shootdowns.
> Serial devices (and others) may also take a dim few on the latency
> issues this may cause.

sure.  the following is the hack part of the old patch.

YAMAMOTO Takashi

@@ -23,12 +26,22 @@
 #define        IPL_NONE        0x0     /* nothing */ 
 #define        IPL_SOFTCLOCK   0x4     /* timeouts */
 #define        IPL_SOFTNET     0x5     /* protocol stacks */
+#ifndef MULTIPROCESSOR
 #define        IPL_BIO         0x6     /* block I/O */
 #define        IPL_NET         0x7     /* network */ 
 #define        IPL_SOFTSERIAL  0x8     /* serial */  
 #define        IPL_TTY         0x9     /* terminal */
 #define        IPL_VM          0xa     /* memory allocation */
 #define        IPL_AUDIO       0xb     /* audio */
+#else /* MULTIPROCESSOR */
+/* XXX XXX for locking order */
+#define        IPL_BIO         0x7     /* block I/O */
+#define        IPL_NET         0x7     /* network */ 
+#define        IPL_SOFTSERIAL  0x7     /* serial */  
+#define        IPL_TTY         0x7     /* terminal */
+#define        IPL_VM          0x7     /* memory allocation */
+#define        IPL_AUDIO       0x7     /* audio */
+#endif /* MULTIPROCESSOR */
 #define        IPL_CLOCK       0xc     /* clock */
 #define IPL_SCHED      IPL_CLOCK
 #define        IPL_HIGH        0xd     /* everything */