netdev
[Top] [All Lists]

Re: [announce] [patch] limiting IRQ load, irq-rewrite-2.4.11-B5

To: Andreas Dilger <adilger@xxxxxxxxxxxxx>
Subject: Re: [announce] [patch] limiting IRQ load, irq-rewrite-2.4.11-B5
From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
Date: Fri, 5 Oct 2001 16:52:16 +0200
Cc: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>, mingo@xxxxxxx, jamal <hadi@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>, Benjamin LaHaise <bcrl@xxxxxxxxxx>, netdev@xxxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxx>, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
In-reply-to: <20011003162210.L8954@xxxxxxxxxxxxxx>
References: <Pine.GSO.4.30.0110031138150.4833-100000@xxxxxxxxxxxxxxxx> <Pine.LNX.4.33.0110031828060.8633-100000@xxxxxxxxxxxxxxxxxxxxx> <15291.32311.499838.886628@xxxxxxxxxxxx> <20011003162210.L8954@xxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Andreas Dilger writes:

 > If you get to the stage where you are turning off IRQs and going to a
 > polling mode, then don't turn IRQs back on until you have a poll (or
 > two or whatever) that there is no work to be done.  This will at worst
 > give you 50% polling success, but in practise you wouldn't start polling
 > until there is lots of work to be done, so the real success rate will
 > be much higher.
 > 
 > At this point (no work to be done when polling) there are clearly no
 > interrupts would be generated (because no packets have arrived), so it
 > should be reasonable to turn interrupts back on and stop polling (assuming
 > non-broken hardware).  You now go back to interrupt-driven work until
 > the rate increases again.  This means you limit IRQ rates when needed,
 > but only do one or two excess polls before going back to IRQ-driven work.

 Hello!

 Yes this has been considered and actually I think Jamal did this in one of
 the pre NAPI patch. I tried something similar... but instead of using a number
 of excess polls I was doing excess polls for a short time (a jiffie). This 
 was the showstopper mentioned the previous mails. :-) 

 Anyway it up to driver to decide this policy. If the driver returns 
 "not_done" it is simply polled again. So low-rate network drivers can have 
 a different policy compared to an OC-48 driver. Even continues polling is
 therefore possible and even showstoppers. :-)  There are protection for
 polling livelocks.

 Cheers.
                                                --ro

<Prev in Thread] Current Thread [Next in Thread>