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

Michael Lindner (mikel@att.net)
Fri, 19 Jan 2001 23:37:22 -0500


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/