Hi,
I'm following CK kernel development, and the mailing list had the following posting:
---------- Message: 19 Date: Fri, 07 Jan 2005 23:16:14 +1100 From: Con Kolivas kernel@kolivas.org Subject: Re: [ck] wine is bloody slow with 2.6.10-ck2 To: Michal ?erav?k michalz@olomouc.com Cc: CK Kernel ck@vds.kolivas.org Message-ID: 41DE7D8E.8090102@kolivas.org Content-Type: text/plain; charset="iso-8859-2"
Michal ?erav?k wrote:
Hi,
I have been running photoshop under wine with 2.6.8.1-ck9 and 2.6.9 and it was good. Is there any workaround for 2.6.10-ckx and wine to get normal speed? It's the same with prelink and without.
Nice your wineserver +19. If that's not enough, just run wine at +19. Wineserver gets into a silly priority inversion scenario with the main wine threads.
Cheers, Con ----------
Note that Con indicated several times that Wine is a very "special" piece of software, it has wildly differing gaming behaviour (threading behaviour) than native Linux games.
For those of you who don't know what priority inversion is (I'll try to explain it, but I'm sure my explanation sucks ;): one (high priority) thread is waiting on a lock, and in order to keep this high priority, another thread owning that lock gets more CPU to get that lock released. Problem is that that thread should have a lower priority, but since the high priority thread always has to wait on the lock, the low priority thread effectively has a much higher priority.
These could just be the usual known slow wineserver communication effects at work here, but I wanted to make sure you know about these issues on the CK list.
Andreas Mohr
These could just be the usual known slow wineserver communication effects at work here, but I wanted to make sure you know about these issues on the CK list.
I suspect that the issue is much deeper than just the wineserver effects; Windows scheduling requirements are fundamentally different than the scheduling that the Linux kernel tries to supply, and the differences can be hard to troubleshoot.
Photoshop, for example, relies on the ability of a thread to Sleep for precisely 5 ms, and then wake up in a certain priority state. The Linux kernel inverts that (I forget the exact details, but we dug into this in great detail this past fall), and so the Photoshop thread has a great deal of difficulty. AFAIR, we had issues with the thread sleeping for 115 ms instead of 5 ms, and we alternately had problems with the thread starving other threads in the system, so that nothing else was being served.
On my todo list is an item to start a conversation with the Kernel guys about these scheduling differences, and to see if we can ask for a few tuning hooks to help us better match Windows. But I keep trying to goad Alexandre into doing it, and he keeps reminding me that I'm not supposed to bother him with anything until after the Window Manager rewrite is done... <grin>.
But they seem receptive right now, so maybe I'll see what I can do.
Cheers,
Jeremy
On Sun, 09 Jan 2005 09:20:46 -0600, Jeremy White wrote:
On my todo list is an item to start a conversation with the Kernel guys about these scheduling differences, and to see if we can ask for a few tuning hooks to help us better match Windows. But I keep trying to goad Alexandre into doing it, and he keeps reminding me that I'm not supposed to bother him with anything until after the Window Manager rewrite is done... <grin>.
But they seem receptive right now, so maybe I'll see what I can do.
There seem to be a bunch of things we want/need from the kernel guys, maybe we should try making a list of what we'd like to have and send it all at once? Things I'm aware of:
- An mmap API that lets us specify the range we want to allow - NT style scheduling (2.4 style, basically/round robin) - Mike M was talking about a new type of kernel wait object to avoid the need to roundtrip to the wineserver for certain types of block/release and I think he even had a patch for it. - The flags Linus talked about with the Samba team for helping us map case-insensitive filing systems onto case-sensitive ones.
I am tempted to suggest we have a kernel-hacking session rather than ask Linus and his gang to do it for us, but these all seem to touch very sensitive areas like the VM and scheduler so maybe it's best to see if they'll do it ...
On Sun, 09 Jan 2005 13:25:00 +0100, Andreas Mohr wrote:
I have been running photoshop under wine with 2.6.8.1-ck9 and 2.6.9 and it was good. Is there any workaround for 2.6.10-ckx and wine to get normal speed?
We had great fun with wacko scheduling problems in CrossOver for iTunes and such, and I recently had a support ticket where a guy claimed with 2.6.10 and CX 4.0 he had massive slowdowns that made it unusable - but with 4.1 (a bugfix release) it went back to normal speed.
Now IIRC we *did* have some scheduling changes in there, but I didn't work on that, Mike McCormack and Jeremy White did. I seem to remember Mike doing things like rearranging the file descriptors in the servers poll array but I don't remember the details and I don't remember if these patches went upstream (they were kind of last minute). Mike?
thanks -mike