Re: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available

Bjorn Wesen (bjorn@sparta.lu.se)
Sat, 20 Jan 2001 12:39:20 +0100 (MET)


On Sat, 20 Jan 2001, Martin MaD Douda wrote:
> On Fri, 19 Jan 2001, Michael Lindner wrote:
> > data is generated as a result of data received via a select(),
> > the next delivery occurs a clock tick later, with the machine
> > mostly idle.
>
> The machine is in fact not idle - there is a task running - idle task.
> Could the problem be that scheduler does not preempt this task to run
> something more useful?

Normally, the "idle task" (task[0]) does this pseudo-code:

while(1) {
if(need_resched)
schedule();
}

to minimize latency out of idle so if that actually is running it should
not be a problem (unless need_resched is not set by the wakeup calls)

Perhaps the kapm-idled kernel thread is killing your latency, you could
try disabling APM and APM-making-idle-calls especially. Also check ps aux
and see if anything else is taking your idle CPU %.

-BW

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