lkml.org 
[lkml]   [2003]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: question on incoming packets and scheduler
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?
>
> The code paths that I managed to trace didn't seem to be calling the
> scheduler to force the context switch. Hopefully I missed something.

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.



- Davide

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

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.036 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site