From: Nuno L. <li...@xp...> - 2005-02-09 03:56:47
|
Ben Voigt, dando pulos de alegria, escreveu : > Is the current behavior causing a context switch every time network data is > sent? That would just have the effect of drastically lowering the dynamic > priority of the coLinux daemon (and therefore all coLinux processes in > general). Yes for the current stable release (0.6.2). Didn't check if this happens with Ballard's patch. That is one of the reasons (and I tend to believe the main one) why network performance for packets sent out of colinux is much slower than the inverse. > If a coLinux process is communicating with a local host process, buffering > still increases performance, unless the Linux process is blocking. In that > case, the coLinux kernel should give processor time to other processes, then > back to Windows. This is the same behavior as if both processes were > running under the host OS I think. Or, does the coLinux process scheduler > not know how to yield to Windows? It appears to, since the coLinux daemon > uses almost no CPU when all the processes are blocking for input. When the idle routine of the colinux kernel is invoked, control is passed back to windows. I'm not sure of all other times this happens. > So, round-trip time should only increase if there are other CPU-hungry > coLinux processes, which might be allowed to run. But this should happen I > think, because under the host OS other processes might be scheduled between > the two endpoints of network communication. Toward this end, buffering I/O > and then processing it on each context switch in and out of coLinux should > be best. The only way this differs from the host OS is that under Windows, > I think there is some dynamic priority boost for an application which > receives I/O. But the boost would still be given as soon as the Windows > kernel resumes. I agree with you, but no experience on this. > As a side question, how often and for what length timeslice is the coLinux > daemon typically scheduled to run? Not sure enough to answer this. > Please let me know if I'm seriously misunderstanding the co-operative > operation of the kernel. I believe your comments are correct. If you're interested in peeking at the code, there's an LXR engine to browse the source at http://lxr.xpto.ath.cx Regards, ~Nuno Lucas |