lkml.org 
[lkml]   [2001]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: select() on TCP socket sleeps for 1 tick even if data available
David Schwartz wrote:
>
> How can you tell when select wakes up the process? What you are seeing has
> nothing whatsoever to do with select and simply has to do with the fact that
> the kernel does not give the CPU to a process the second that process may
> want it.

I guess I can't. But on an idle machine, I would expect a process that
becomes runnable would be run immediately, not on the next clock tick.
strace reports that each select() is taking 0.009xxx seconds of real
time, and the system's CPU load (as reported by top) is under 1%.

...
> If you have scheduling latency requirements, you MUST communicate them to
> the scheduler. If your process had an altered scheduling class, then you
> would be right -- it should get the CPU immediately. Otherwise, there's no
> reason for the scheduler to give that process the CPU immediately.

OK, if this is the case, how do I alter the scheduling class?

--
Mike Lindner
-
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/

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