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

Re: Irqtune: some stats (was Fix for your serial/PPP problems)



On Mon, 26 Aug 1996, Philippe Troin wrote:

> 
> I've done some statistics regarding irqtune and kernels 2.0.14 and 
> 2.0.15.

There are some nasty panic problems running this kernel with
apache httpd.  I'm not sure about the details ...

> 
> The protocol was the following:
> 1) ftp to my ISP
> 2) put a file
> 3) get the same file 10 times with a 'mget file file <etc...>'

** snip **

> 
> I'm not subscribed to the linux kernel mailing list, but you can 
> forward this message over there.

I got this from the linux-kernel list:


>>From torvalds@cs.Helsinki.FI Tue Aug 27 08:23:03 1996
>Date: Fri, 23 Aug 1996 09:08:43 +0300 (EET DST)
>From: Linus Torvalds <torvalds@cs.Helsinki.FI>
>To: Russell Berry <rberry@albany.net>
>Cc: Gerry Jensen <gerry@blue.optimed.com>, linux-kernel@vger.rutgers.edu
>Subject: Re: irqtune: improve serial port performance by 3x?
>
>
>
>On Thu, 22 Aug 1996, Russell Berry wrote:
>> 
>> I got this, installed it on both my machines (home/work), and can see a marked 
>> increase in ppp performance.  However, I'm concerned about interrupt priorities, 
>> does this effect _ONLY_ the timer interrupt priorities, or does it actually tweak
>> the way the kernel interprets all system interrupts???
>
>I don't like the fact that irqtune helsp interrupt performance, because the
>way Linux tries to handle interrupts it _shouldn't_ make a difference. The
>fact that irqtune obviously _does_ make a difference would indicate that the
>irq handling has some problem, and irqtune just masks that problem by
>changing the interrupt priority levels. 
>
>Essentially, Linux does a "EOI" immediately when it gets the interrupt, and
>that EOI _should_ mean that all other interrupts will get through, regardless
>of whether they have lower or higher priority (because the EOI tells the
>interrupt controller that it can forget about the interrupt that we're now
>handling).  As such there should be no effect from irqtune, because the
>interrupt priorities shouldn't really matter. 
>
>However, Linux uses the "nonspecific" EOI to do this, and while that should
>work, it may turn out that some interrupt controllers don't like it, and for
>some reason mask the wrong interrupt. People who see a difference with
>irqtune, could you test this patch instead (it changes the low-level
>interrupt handlers to use the "specific" EOI to tell the controller that that
>specific interrupt is now handled). 
>
>I'd be very interested in reactions to this patch indeed, can you please 
>try it out and tell me whether this makes any difference?
>
>(This is against 2.0.14, but it should patch in cleanly against just about
>any reasonably recent kernel. Certainly all of the 2.0.x series)
>
>		Linus

 ** patch left in tact **

----
--- v2.0.14/linux/include/asm-i386/irq.h	Sun Mar 10 09:28:56 1996
+++ linux/include/asm-i386/irq.h	Fri Aug 23 08:18:12 1996
@@ -81,7 +81,7 @@
  * a bit - without them it seems that the harddisk driver won't work on
  * all hardware. Arghh.
  */
-#define ACK_FIRST(mask) \
+#define ACK_FIRST(mask,nr) \
 	"inb $0x21,%al\n\t" \
 	"jmp 1f\n" \
 	"1:\tjmp 1f\n" \
@@ -90,10 +90,10 @@
 	"outb %al,$0x21\n\t" \
 	"jmp 1f\n" \
 	"1:\tjmp 1f\n" \
-	"1:\tmovb $0x20,%al\n\t" \
+	"1:\tmovb $0x60+"#nr",%al\n\t" \
 	"outb %al,$0x20\n\t"
 
-#define ACK_SECOND(mask) \
+#define ACK_SECOND(mask,nr) \
 	"inb $0xA1,%al\n\t" \
 	"jmp 1f\n" \
 	"1:\tjmp 1f\n" \
@@ -102,11 +102,12 @@
 	"outb %al,$0xA1\n\t" \
 	"jmp 1f\n" \
 	"1:\tjmp 1f\n" \
-	"1:\tmovb $0x20,%al\n\t" \
+	"1:\tmovb $0x60+"#nr",%al\n\t" \
 	"outb %al,$0xA0\n\t" \
 	"jmp 1f\n" \
 	"1:\tjmp 1f\n" \
-	"1:\toutb %al,$0x20\n\t"
+	"1:\tmovb $0x62,%al\n\t" \
+	"outb %al,$0x20\n\t"
 
 #define UNBLK_FIRST(mask) \
 	"inb $0x21,%al\n\t" \
@@ -207,7 +208,7 @@
 	"pushl $-"#nr"-2\n\t" \
 	SAVE_ALL \
 	ENTER_KERNEL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
 	"movl %esp,%ebx\n\t" \
@@ -224,7 +225,7 @@
 SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
 	ENTER_KERNEL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \
@@ -238,7 +239,7 @@
 SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
 	ENTER_KERNEL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	LEAVE_KERNEL \
 	RESTORE_MOST);
 	
@@ -255,7 +256,7 @@
 	"pushl $-"#nr"-2\n\t" \
 	SAVE_ALL \
 	ENTER_KERNEL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"movl %esp,%ebx\n\t" \
 	"pushl %ebx\n\t" \
@@ -283,7 +284,7 @@
 	"pushl $-"#nr"-2\n\t" \
 	SAVE_ALL \
 	ENTER_KERNEL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
 	"movl %esp,%ebx\n\t" \
@@ -301,7 +302,7 @@
 "\n"__ALIGN_STR"\n" \
 SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	SMP_PROF_IPI_CNT \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \
@@ -312,7 +313,7 @@
 "\n"__ALIGN_STR"\n" \
 SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	RESTORE_MOST);
 
 #define BUILD_RESCHEDIRQ(nr) \
@@ -345,7 +346,7 @@
 SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
 	"pushl $-"#nr"-2\n\t" \
 	SAVE_ALL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
 	"movl %esp,%ebx\n\t" \
@@ -360,7 +361,7 @@
 "\n"__ALIGN_STR"\n" \
 SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \
@@ -372,7 +373,7 @@
 "\n"__ALIGN_STR"\n" \
 SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
 	SAVE_MOST \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	RESTORE_MOST);
 	
 #define BUILD_TIMER_IRQ(chip,nr,mask) \
@@ -386,7 +387,7 @@
 SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
 	"pushl $-"#nr"-2\n\t" \
 	SAVE_ALL \
-	ACK_##chip(mask) \
+	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"movl %esp,%ebx\n\t" \
 	"pushl %ebx\n\t" \
-----



> 
> I stick with irqtune right now. BTW, I saw no ill side effect when 
> using it.
> 
> Phil.
> 
> 

I believe there are users testing the patch with improved ppp
performace now -- sans irqtune.  By the way, there seems to be 
a samba tuning issue with kernels >2.0.10.  I'm not sure what
the variable is, but performance can suffer in certain samba
configurations.  I have more details somewhere if anybody
needs them.  I'm sure these issues will be addressed very soon.
The kernel dudes are all aware of them and seem pretty enthused
about fixin' stuff.  Its an interesting list, by the way.  I just
wish I knew what the heck they were talkin' about!

Thanks

Richard G. Roberto
richr@bear.com
201-739-2886 - whippany, nj


--
*******************************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, offer or
agreement or any information about any transaction, customer account or account
activity contained in this communication.
*******************************************************************************



Reply to: