tech-kern archive

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

Re: software interrupts & scheduling oddities



On Thu, Jul 05, 2012 at 07:40:11PM -0400, Mouse wrote:
> > Maybe this has happened to you: you tune your NetBSD router for
> > fastest packet-forwarding speed.  Presented with a peak packet load,
> > [...] the user interface doesn't get any CPU cycles.  [...]  [I]f
> > there is any software interrupt pending, then it will run before any
> > user process gets a timeslice.  So if the softint rate is really
> > high, then userland will scarcely ever run.  Or that is my current
> > understanding.  Is it incorrect?
> 
> "No", I think.  At least, that's how I'd expect it to work, and I've
> occasionally seen behaviour close enough to that to make me think it's
> reasonably accurate.
> 
> I find your discovery about changing a user process's priority making a
> difference surprising.

Me, too.  Before I made that discovery, I had intended to defer packet
processing to a kernel thread that ran at a middling user priority.  The
kernel would shift packet processing from softints to the kernel thread
if it became apparent that the system wasn't switching to userland.
User programs that needed to stay interactive would run at a higher
priority than packet processing; programs that could afford to be
delayed (cron, syslogd, ...) would run at a lower priority than packet
processing.

Dave

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index