Re: question on incoming packets and scheduler

From: Chris Friesen
Date: Wed Oct 15 2003 - 13:18:53 EST


Davide Libenzi wrote:
On Tue, 14 Oct 2003, Chris Friesen wrote:

I have a long-running cpu hog background task, and a high-priority
critical task that waits on a socket for network traffic. When a packet
comes in, I'd like the cpu hog to be swapped out ASAP, rather than
waiting for the end of the timeslice. Is there any way to make this happen?


What do you mean for high priority? Is it an RT task? The wakeup (AKA
inserion in the run queue) happen soon :
IRQ->do_IRQ->softirq->net_rx_action->ip_rcv->...
but if your task is not RT there no guarantee that it'll preempt the
current running.

Yes, it was an RT task.

It appears that 2.4.20 fixes this issue, but there is another one remaining that the latency appears to be dependent on the number of incoming packets. See thread "incoming packet latency in 2.4.[18-20]" for details. This behaviour doesn't show up in 2.6, and I'm about to test 2.4.22.

Chris




--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@xxxxxxxxxxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/