El Saturday 23 June 2007 18:35:18 Kyle Moffett escribió: > If you want the kernel to > treat one job or the other as more important then you must *TELL* it > that, end of story.
Yes, that makes sense now that it's been explained to me conveniently. As long as a normal user is not left alone with such task (as it won't happen), I'm more than happy with the solution. > > Yes, I see your point. In a scenario of dropping frames it seems > > that CFS does a better job. It's just that an ideal scheduler > > shouldn't drop frames in this case (it should give 70% to the video > > even without nicing the encoder). > > It can't do that. The with-CFS kernel just sees 2 CPU-heavy > processes and guesses that it should give them equal CPU. "stock" > kernels have an algorithm designed to promote some tasks for > "interactivity", but in practice it also tended to cause other > processes to be denied CPU for arbitrarily long periods of time, > hence why CFS is an improvement. Under the old scheduler even if you > had 2 DVD player processes each chewing 45% CPU, you could still have > dropped frames because for a second or two one would be more > "interactive" than the other, and vice versa. Under CFS/SD, they are > both classified equally and so get equal CPU allocation *AND* latency. This adds even more sense to all the explanations I've heard up to now. Thanks :) > I don't see any reason someone couldn't write a simple little GUI > program to enumerate the user-owned X processes (somewhat like the > Windows Task-Manager but less complicated) and allow them to change > priorities. Alternatively your desktop environment could set up a > little privileged wrapper which appropriately executes the HD video > player. One of the primary rules of kernel development is that you > cannot put policy in the kernel, and a statement of the form > "PROCESS1 is more important than PROCESS2" is pure policy and must be > done from userspace. We even give appropriate enforcement mechanisms > to userspace to take such action (nice levels). Yes, an app to change priorities would be very nice, though I'd be happy with just sensible defaults. Probably once CFS or SD go mainline more application developers will make their apps run at the appropriate nice level (or else distributions will provide this when packaging the apps), so end users won't have any problems. > Cheers, > Kyle Moffett Thank you, Alberto. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/