The Completely Fair Scheduler's Impact On Games
eldavojohn writes "We've heard a bit about the completely fair scheduler previously, but now Kernel Trap looks at the implications this new scheduler has for 3D games in Linux. Linus Torvalds noted, 'I don't think any scheduler is perfect, and almost all of the time, the RightAnswer(tm) ends up being not one or the other, but somewhere in between. But at the same time, no technical decision is ever written in stone. It's all a balancing act. I've replaced the scheduler before, I'm 100% sure we'll replace it again. Schedulers are actually not at all that important in the end: they are a very very small detail in the kernel.' The posts that follow the brief article, reveal that Linus seems quite confident that he made the right choice in his decision to merge CFS with the Linux kernel. One thing's for certain, gaming on Linux can't suffer any more setbacks or it may be many years before we see FOSS games rival the commercial world."
Funny, in the article those framerates for Quake III show CFS beating the pants off of SD.
Besides, the biggest barrier to 3d games in Linux is video card drivers (ATI, I'm looking at you!) as 3D drivers in Linux, even the proprietary ones, have tended to be unstable.
Linus is right one this one, the scheduler is a small part.
Aren't going to happen until artists in the medium, 'good' artists rather, decide to start working for free the same way coders do. Some artists will work for publicity alone, bu they seem to be by far in the minority. On a technical level, I've not seen much problem with linux. Ogre, for example, runs quite smoothly for me.
Everything will be taken away from you.
This is irrelevant to the gaming front.
The limit to games on Linux is market share. Its not (much) easier to develop a good 3D game for linux as it is Windows, so why code for 2% of the market when you can code for 92% of the market?
Thus you will only get games where the developer has gone out of their way to ensure complete portibility and provides a port mostly out of courtousy.
The scheduler details are irrelevant for this: what Linux Games need is 10%+ marketshare on the desktop.
Test your net with Netalyzr
Perhaps people just don't want to run their games as root though....
I don't care if it's 90,000 hectares. That lake was not my doing.
Sounds like an evil circle.
To get Market Share you need games.
To get Games you need Market Share.
The CFS (Completely Fair Scheduler) won't, but maybe the new FCS (Flux Capacitance Scheduler) might. Or already did.
I have Windows XP and Gentoo Linux running side by side, and strangely, Gentoo scores 10 to 12 FPS faster in World of Warcraft, Warcraft III and even Doom 3. Granted they are commercial games, but if they can run in WINE that fast, I wonder what a direct Linux implementation would do. I just love seeing folks buying the headlines instead of blazing their own paths.
That's why the world is in the shape its in... the majority is always waiting for someone to save the day. You want desktop Linux? Then make it your desktop. Otherwise stop bitching and post some valid comments.
" What luck for rulers that men do not think" - Adolf Hitler
That is why Linus should have listened to Con Kolivas when he tried to introduce a pluggable scheduler system. With a modular system we could have CFS and the staircase scheduler and both problems solved.
Personally, I'd like things like schedulers to be pluggable. But that's just me. Or maybe not.
Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
Schedulers are actually not at all that important in the end: they are a very very small detail in the kernel - Torvalds
Actually, I'd like to see the OS kernel consist entirely of only the scheduler and the thinnest APIs to secure drivers granting access to the HW. Everything else, including IPC, could be in userspace.
That would make distributing the OS a lot easier. And the simplicity could be a lot easier to secure, to develop for, to customize a deployment for minimum HW (like eg. a "self-winding" 10mW Bluetooth ring with "accessory" features). Practically every device could run the same "OS", with modules bolted on for increased functionality on heavier HW.
--
make install -not war
Linux is like a car... :) A tail light or the license plate might be mostly modular, but the drive train isn't. The scheduler is very fundamental to the kernel, and must be running at all times. No doubt a system could be devised to make it work, but the pointer that Linus and others have been trying to make is that the most important reason for selecting one scheduler other another at this time is the dedication of the scheduler's maintainer and developer, not whether 3D games experience a slight decrease in performance. Even if they *could* both be used, Linus would still stick to his guns, because he believes that the developer behind the project is more important than the project itself.
I tend to agree - open source is driven by developers (developers developers developers!) - if the selected scheduler happens to be a bit slow for 3D games, someone will patch it, and the maintainer will integrate the patch. However if there aren't many active developers working on the project, and the maintainer doesn't seem dedicated, then it doesn't matter how great the code is right now; some time down the road work will be needed, and then the project runs into trouble.
In the open source world it's easier to patch up a slower design in a well-supported project than have to fork or reorganize an entire project because of lacking support.
I'm not a gamer at all, but for years I've said that Quicken was the only thing keeping me from switching Linux full-time. (Yes, I know there are FOSS bookkeeping packages out there. Quicken is excellent, though, so any switch is a step down in my mind.)
Then I realized it doesn't matter which operating system I run as long as I can do what I need to do. I was only trying to switch to Linux for ideological reasons, not for any practical reason. The act of switching over was going to involve a lot of time, effort, and possibly expense, and if there was no "business reason" to go through all that, it would largely be for nought. If I had a mission-critical app I needed to run that only ran on Mac or Linux or whatever, then I'd switch, but I'd have to jump over with both feet. I don't want my music, pictures, documents, finances, etc., spread all over multiple machines (or multiple partitions of different types.) My mission-critical app is Quicken...so I continue to run Windows.
So don't look at it as "I'd switch over completely, but..." Instead, look at it as "Apps drive the OS I use. I need the following app(s): ________, which is/are well supported on _______, so my OS is ________."
I've figured out how to get games running with Linux!
1. Set up your Linux system. Use onboard video and don't overspend on your processor.
2. Buy a PS2, a Wii, or a 360.
3. Play games on your game console and do everything else on Linux.
From TFA
Actually the quote from the in the summary from Linus is part of a larger email where hes dismissing the idea of using the plugscheduler (I can't seem to recall the exact name) that would make the CPU scheduler plugin based like the IO scheduler currently is. His reasoning against it were largely BECAUSE what they learned from having the IO scheduler plugin based and its something Linus as well as the subsystem maintainers DON'T want to repeat.
Anyways, you can still just apply Con's patch to the kernel to use his scheduler instead of the old scheduler (and if he keeps maintaining it, you'll be able to use SD instead of CFS). Don't forget that we haven't even had a kernel released using CFS!
I keep wondering...X is a single threaded server, communicating with a (generally) single threaded game. Worse, wine inserts the wineserver process, so I have three single threaded things trying to synchronize to get interactivity. A low latency event like a keypress might require all three processes to be scheduled in succession, to get a response on the screen. A poor man's way to do this is with the kernel's scheduler, but a far superior way to do it is to have multiple threads in the X server. Scheduling an interactive event isn't hard. Getting crap on the screen in the same scheduling timeslice is hard (impossible?) since it requires a second scheduling point. As I understand, this is how BeOS achieved substantial interactivity in the presence of load -- my having a multi-threaded graphics server *and* kernel.
So, how much can be gained by rewriting X, or going to a different graphics server? Or do I completely misunderstand the effect of X?
-- Bob
1^2=1; (-1)^2=1; 1^2=(-1)^2; 1=-1; 1=0.
Usability research has shown, that variation in waiting time is actually a bigger irritation for users than waiting time itself.
I have seen several projects, where user interface response time problems have been "improved" by making adding a minimum response time. The average response time increases, but variation decreases, and the user often reports the program as having become faster... the logic to this seems to be, that the user wants the user interface to have a predictable response.
I think the reference for this is Søren Lauesens books about usability programming, but I cannot remember for sure right now.
Free and open source is a horrible model for any non-subscription based games. Think about a game like Oblivion, for example. If Bethesda had released that under the GPL, where would they make their money from? Unless you make money from subscriptions, like Second Life or World of Warcraft, FOSS games make no business sense.
Yeah they are too busy bitching about the difference between CFS and SD.
And then the news post here, says "Linux cannot suffer any setbacks in gaming". I think you'll find that compared to the original scheduler, CFS pretty much rocks for gaming. As much or less than SD, who the fuck cares?
It's better than the original scheduler, so where's the setback?
If it's not as good as SD, oh well, cry me a river. I don't agree with Linus' "there is no maintainer" idea, but more the concept that CFS removes more lines from the kernel than it replaces, and does a better job, whereas SD adds complexity for roughly the same effect. What could be a perfectly good technical reason in previous LKML posts got turned into politiking.
Difference between SD and CFS.. fractions of a frame per second. WOW. That really means Linus made the wrong decision! The impact on games, where 1/500th of a second really MAKES A DIFFERENCE is too high! Put the old scheduler back you fucking crazy-ass Finn!!
Well then, everyone, let's head over to Project Peach: http://peach.blender.org/
Yes, the blenderheads are at it again, and they are doing a game this time...
[--- PGP key and more on http://www.root42.de ---]
Games maybe cpu hogs, but the person playing the game probably thinks that whatever is causing the lag is the pig. I think that is the whole point.
The computer should spend cycles on the things the user is interested in, it should not be optimized primarily for the big service companies. The linux camp in 2007 just seems like some alternate dinosaur-computing reality: IBM, Sun, Novell, Oracle. I don't think of free or open when I see any of those names and I'm sure that none of those companies want to take computing in the direction I favor.
In the computing world, the enemy of your enemy is not your friend.