svn commit: r357004 - in head/sys: kern sys

Gleb Smirnoff glebius at freebsd.org
Mon Jan 27 20:21:09 UTC 2020


  Hans,

On Fri, Jan 24, 2020 at 08:21:54PM +0100, Hans Petter Selasky wrote:
H> > If a driver has interrupt moderation than epoch batching counter
H> > basically won't ever grow over 1. It kicks in only of driver doesn't
H> > have it, or receives interrupts at a very high rate.
H> 
H> Depending on the load an interrupt imposes, this batching counter may 
H> cause epochs to last for a long time. Have you considered using ticks 
H> for this instead? I.E. if the congestion lasts more than two ticks, then 
H> re-acquire the EPOCH?
H> 
H> For example if the network controller spends more time processing 
H> packets then there is between interrupts, then this unconditional 1000x 
H> thing can be quite dangerous.

I didn't try using ticks instead of execution counter. It could be ticks
would be better. Needs more experiments.

H> > H> 2) You need to make a new request function for interrupts which take a
H> > H> pointer to an EPOCH and replace that IH_NET in hflags!
H> > 
H> > Initially I did that way, but then pondered over this approach and have
H> > abandoned it.  Most likely we will have just few globally recognized
H> > epochs in the kernel. And even less might be associated with interrupt
H> > handlers. Complexity and performance impact of using a pointer are
H> > noted by Drew in D23347.
H> 
H> Let not the network epoch become the new Giant of EPOCH's. There might 
H> be realtime constraints for EPOCH's aswell.

Epoch isn't a lock, so it can't become the new Giant.

-- 
Gleb Smirnoff


More information about the svn-src-head mailing list