* Re: WINE + Galciv + 2.6.0-test3-mm1-O15
@ 2003-08-12 15:23 Voluspa
2003-08-12 21:15 ` Con Kolivas
0 siblings, 1 reply; 12+ messages in thread
From: Voluspa @ 2003-08-12 15:23 UTC (permalink / raw)
To: linux-kernel
On 2003-08-12 14:42:02 gaxt wrote:
[...]
> Galciv plays videos quite smoothly but as soon as I run it it will
> freeze the cursor for 12-15 seconds every half-minute or so even
> within the game itself which is turn-based strategy without a lot of
> whizbang stuff. In the past, the videos would stutter but the game
> would not suffer from more than short pauses now and then.
Similar experience here running the game-test (xfree86 4.3.99.10, winex
3.1 and "Baldurs Gate I") on a PII 400 with 128 meg ram. Using
2.6.0-test3-O14.1int + O14.1-O15int.
I would say this is the best _and_ worst scheduler I've tried since Con
had to adopt his work to the new Ingo infrastructure. Slightly
smoother than pure A3 unless you manage to trigger badness. Then you (or
I, at least) get exactly 15 seconds of total freezes, mixed with
different periods of normality. And by freezes, I mean total freezes.
I can switch to an already opened text console, but there
a running "top" is dead and it won't take any keystrokes until the
freeze has gone. The only thing not dead is the "sound repeats" that
Daniel Phillips explained in:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105966612027670&w=2
--quote--
To convince yourself of this, note that when DMA refill fails to meet
its deadline you will hear repeats, not skipping, because the DMA
hardware on the sound card has been set up to automatically restart the
DMA each time the buffer expires. Try running the kernel under kgdb and
breaking to the monitor while sound is playing.
--unquote--
Mvh
Mats Johannesson
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 15:23 WINE + Galciv + 2.6.0-test3-mm1-O15 Voluspa @ 2003-08-12 21:15 ` Con Kolivas 2003-08-13 0:54 ` Voluspa 0 siblings, 1 reply; 12+ messages in thread From: Con Kolivas @ 2003-08-12 21:15 UTC (permalink / raw) To: Voluspa, linux-kernel On Wed, 13 Aug 2003 01:23, Voluspa wrote: > On 2003-08-12 14:42:02 gaxt wrote: > Similar experience here running the game-test (xfree86 4.3.99.10, winex > 3.1 and "Baldurs Gate I") on a PII 400 with 128 meg ram. Using > 2.6.0-test3-O14.1int + O14.1-O15int. Yes known issue for reason I mentioned. Currently investigating. > I would say this is the best _and_ worst scheduler I've tried since Con Can you give us some idea what your machine is like when it's not running a cpu hog win32 game in wine? Also can you try running your game nice +1 Con ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 21:15 ` Con Kolivas @ 2003-08-13 0:54 ` Voluspa 2003-08-13 18:45 ` Timothy Miller 0 siblings, 1 reply; 12+ messages in thread From: Voluspa @ 2003-08-13 0:54 UTC (permalink / raw) To: linux-kernel; +Cc: kernel On Wed, 13 Aug 2003 07:15:22 +1000 Con Kolivas wrote: > On Wed, 13 Aug 2003 01:23, Voluspa wrote: > > On 2003-08-12 14:42:02 gaxt wrote: > > Similar experience here running the game-test (xfree86 4.3.99.10, > > winex 3.1 and "Baldurs Gate I") on a PII 400 with 128 meg ram. Using > > 2.6.0-test3-O14.1int + O14.1-O15int. > > Yes known issue for reason I mentioned. Currently investigating. Yupp, you posted while I was writing. > > I would say this is the best _and_ worst scheduler I've tried since > > Con > > Can you give us some idea what your machine is like when it's not > running a cpu hog win32 game in wine? Also can you try running your > game nice +1 As I've said, it is extremely hard for me to notice the scheduler unless I run something graphic intensive, but my comments are of course not solely based on that game-test. A general feel of smoothness can always be attributed to the placebo effect, though I challenge anyone to dispute the following experience. Fourteen days ago I took home a precompiled Blender 2.28 - previous copy of this 3D render program to reside here was 2.23. Grabbing the grid which constitutes the world plane (hold third mouse button, drag) and rotating it around the axes, I noticed something not present in the old version. Jerks... In kernel time this is 2.6.0-test1/2 and Cons O11int. Since then I've done the "world rotate" on plain kernels and all O-patches without noticing any improvement. Either mouse pointer or grid gets stuck for about 1/2 to 2 seconds, making the movement unsynchronized. Can happen while moving slowly, or spinning like crazy. I don't have DRI with my mach64 (8 meg) because of choice, use Xv instead, so I had made up my mind about the blame. Sloppy programming and weak CPU. Until O15int enters the mix. Perfect sync all the time, no matter how slow, fast or long I rotate the world plane. That is why I call this scheduler the "best". The "worst" part comes from the "known issue" but also because I happened to run xmms on a directory of mp3s while rotating. I got severe blackouts in the music, ca 10 - 15 seconds long. When the blackout starts I no longer have to move the mouse, it is enough to hold down the button. The second I release it, the music returns. Xmms has not been involved in the rotating before, so can't tell if the blackouts have occurred. Could be due to the "known issue", but I'll retest with older kernels when time permits. Running the game-test with nice +1... Well, I tried that first on wineserver, then wine, then X, after which I put -1 on them consecutively. No real pattern emerged. Badness all around. And now I'm falling asleep. Bye. Mvh Mats Johannesson ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-13 0:54 ` Voluspa @ 2003-08-13 18:45 ` Timothy Miller 2003-08-13 21:21 ` Con Kolivas 0 siblings, 1 reply; 12+ messages in thread From: Timothy Miller @ 2003-08-13 18:45 UTC (permalink / raw) To: Voluspa; +Cc: linux-kernel, kernel Voluspa wrote: > When the blackout starts I no longer have to move the mouse, it is > enough to hold down the button. The second I release it, the music > returns. I think this sort of thing has been discussed before. I get the impression that xmms blocks on the X server, so when some app grabs the server, then xmms gets blocked and stops. I don't know why the display code is not in a separate thread from the audio code; although maybe they are but they interact somehow that causes this. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-13 18:45 ` Timothy Miller @ 2003-08-13 21:21 ` Con Kolivas 0 siblings, 0 replies; 12+ messages in thread From: Con Kolivas @ 2003-08-13 21:21 UTC (permalink / raw) To: Timothy Miller, Voluspa; +Cc: linux-kernel On Thu, 14 Aug 2003 04:45, Timothy Miller wrote: > Voluspa wrote: > > When the blackout starts I no longer have to move the mouse, it is > > enough to hold down the button. The second I release it, the music > > returns. > > I think this sort of thing has been discussed before. I get the > impression that xmms blocks on the X server, so when some app grabs the > server, then xmms gets blocked and stops. I don't know why the display > code is not in a separate thread from the audio code; although maybe > they are but they interact somehow that causes this. This is a pure sheduler starvation issue which I'm trying to fix. Con ^ permalink raw reply [flat|nested] 12+ messages in thread
* WINE + Galciv + Con Kolivar's 09 patch to 2.6.0-test1-mm2 @ 2003-07-26 21:49 gaxt 2003-07-29 3:25 ` Con Kolivas 2003-07-29 12:46 ` Con Kolivas 0 siblings, 2 replies; 12+ messages in thread From: gaxt @ 2003-07-26 21:49 UTC (permalink / raw) To: linux-kernel Kudos to CK In 2.4.21 galciv + wine was fine. In 2.4.21 + CK patches, galvic + wine would pause every 15 seconds or so (maybe it was when little animations played). In 2.6.0-test1-mm2 (vanilla, or + 08) Galciv would stutter horribly and freeze my machine in wine. It might run smoothly until I loaded a nautilus window or something then stutters and loss of control of the system. With 09, it is smooth as silk until I do something and then the video playbacks can be choppy but the game (turn based strategy) seems to run without the long pauses of 2.4.21 CK or 2.6.0 vanilla. I can switch between apps and go back without any problem. 09 seems to be a big improvement for whatever caused the stutter & die problems in wine+galciv. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + Con Kolivar's 09 patch to 2.6.0-test1-mm2 @ 2003-07-29 3:25 ` Con Kolivas 2003-07-29 12:48 ` WINE + Galciv + Con Kolivas's 011 patch to 2.6.0-test2 gaxt 0 siblings, 1 reply; 12+ messages in thread From: Con Kolivas @ 2003-07-29 3:25 UTC (permalink / raw) To: gaxt; +Cc: linux-kernel On Tue, 29 Jul 2003 12:30, gaxt wrote: > Con Kolivas wrote: > > File I/O ? Try booting with elevator=deadline > > Setting elevator=deadline results in wine+galciv loading without the > horrible long pauses but there is still chugging and while the AVIs > play, the rest of Gnome is unresponsive (ie can't switch windows by > clicking etc) though I can switch to Alt-F1 virtual terminal. Still not > as good as 260-test-2-vanilla Well that is weird, but no doubt IO is playing some part here. Can you please try the preview O11 patch (incremental against 2.6.0-test2-mm1 but should patch against an O10 patched vanilla) in http://kernel.kolivas.org/2.5/experimental While not specifically addressing this problem, it may help. Con ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + Con Kolivas's 011 patch to 2.6.0-test2 2003-07-29 3:25 ` Con Kolivas @ 2003-07-29 12:48 ` gaxt 0 siblings, 0 replies; 12+ messages in thread From: gaxt @ 2003-07-29 12:48 UTC (permalink / raw) To: Con Kolivas; +Cc: linux-kernel I tried O11. Still chuggy in the AVIs and then locks out input into X. I switch to Alt-F1 console and hear the video advance, switch back, it pauses, switch to Alt-F1 etc. to get it through the video and then it's fine. Incidentally, I moved my /home to another hard drive last night (same 7200 rpms) to get more space. It makes no difference to performance. 260-test2-vanilla was quite good and -mm1 and -O11 are chuggy and lock out input to X and require switching to virtual console to advance through the videos. If there is some other data I can provide you, let me know. Con Kolivas wrote: > On Tue, 29 Jul 2003 12:30, gaxt wrote: > >>Con Kolivas wrote: >> >>>File I/O ? Try booting with elevator=deadline >> >>Setting elevator=deadline results in wine+galciv loading without the >>horrible long pauses but there is still chugging and while the AVIs >>play, the rest of Gnome is unresponsive (ie can't switch windows by >>clicking etc) though I can switch to Alt-F1 virtual terminal. Still not >>as good as 260-test-2-vanilla > > > Well that is weird, but no doubt IO is playing some part here. Can you please > try the preview O11 patch (incremental against 2.6.0-test2-mm1 but should > patch against an O10 patched vanilla) in > > http://kernel.kolivas.org/2.5/experimental > > While not specifically addressing this problem, it may help. > > Con > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + Con Kolivas's 011 patch to 2.6.0-test2 2003-07-29 12:48 ` WINE + Galciv + Con Kolivas's 011 patch to 2.6.0-test2 gaxt (?) @ 2003-07-29 12:46 ` Con Kolivas 2003-08-12 14:42 ` WINE + Galciv + 2.6.0-test3-mm1-O15 gaxt -1 siblings, 1 reply; 12+ messages in thread From: Con Kolivas @ 2003-07-29 12:46 UTC (permalink / raw) To: gaxt; +Cc: linux-kernel On Tue, 29 Jul 2003 22:48, gaxt wrote: > I tried O11. Still chuggy in the AVIs and then locks out input into X. I > switch to Alt-F1 console and hear the video advance, switch back, it > pauses, switch to Alt-F1 etc. to get it through the video and then it's > fine. > > Incidentally, I moved my /home to another hard drive last night (same > 7200 rpms) to get more space. It makes no difference to performance. > 260-test2-vanilla was quite good and -mm1 and -O11 are chuggy and lock > out input to X and require switching to virtual console to advance > through the videos. > > If there is some other data I can provide you, let me know. What top shows as the PRI of all the important processes concerned during all this would be helpful. Con ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-07-29 12:46 ` Con Kolivas @ 2003-08-12 14:42 ` gaxt 2003-08-12 14:40 ` Con Kolivas 0 siblings, 1 reply; 12+ messages in thread From: gaxt @ 2003-08-12 14:42 UTC (permalink / raw) To: Con Kolivas; +Cc: linux-kernel Photoshop 6 (yes, legal owned version) in wine is flawless (as it was with 2.6.0-test3) Galciv plays videos quite smoothly but as soon as I run it it will freeze the cursor for 12-15 seconds every half-minute or so even within the game itself which is turn-based strategy without a lot of whizbang stuff. In the past, the videos would stutter but the game would not suffer from more than short pauses now and then. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 14:42 ` WINE + Galciv + 2.6.0-test3-mm1-O15 gaxt @ 2003-08-12 14:40 ` Con Kolivas 2003-08-12 18:24 ` Mike Galbraith 0 siblings, 1 reply; 12+ messages in thread From: Con Kolivas @ 2003-08-12 14:40 UTC (permalink / raw) To: gaxt; +Cc: linux-kernel, Mike Galbraith On Wed, 13 Aug 2003 00:42, gaxt wrote: > Photoshop 6 (yes, legal owned version) in wine is flawless (as it was > with 2.6.0-test3) > > Galciv plays videos quite smoothly but as soon as I run it it will > freeze the cursor for 12-15 seconds every half-minute or so even within > the game itself which is turn-based strategy without a lot of whizbang > stuff. In the past, the videos would stutter but the game would not > suffer from more than short pauses now and then. Yes, herein lies one of those mysteries that still eludes me but I have been investigating it. I can now reproduce in other applications what appears to be the problem - Two cpu hogs, X and evolution for example are running and evolution is making X the cpu hog. The problem is that X gets demoted whereas evolution doesn't. Strangely, dropping evolution to nice +1 or making X -1 seems to change which one gets demoted, and X is now much smoother. I assume the same thing is happening here between wine and wineserver, which is why you've seen reversal of priorities in your previous posts. See if renicing one of them +1 helps for the time being. I will continue investigating to find out why the heck this happens and try and fix it. Con P.S. I've cc'ed MG because he has seen the scheduler do other forms of trickery and may have thoughts on why this happens. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 14:40 ` Con Kolivas @ 2003-08-12 18:24 ` Mike Galbraith 2003-08-12 18:44 ` Timothy Miller 2003-08-13 3:34 ` Con Kolivas 0 siblings, 2 replies; 12+ messages in thread From: Mike Galbraith @ 2003-08-12 18:24 UTC (permalink / raw) To: Con Kolivas; +Cc: gaxt, linux-kernel At 12:40 AM 8/13/2003 +1000, Con Kolivas wrote: >On Wed, 13 Aug 2003 00:42, gaxt wrote: > > Photoshop 6 (yes, legal owned version) in wine is flawless (as it was > > with 2.6.0-test3) > > > > Galciv plays videos quite smoothly but as soon as I run it it will > > freeze the cursor for 12-15 seconds every half-minute or so even within > > the game itself which is turn-based strategy without a lot of whizbang > > stuff. In the past, the videos would stutter but the game would not > > suffer from more than short pauses now and then. > >Yes, herein lies one of those mysteries that still eludes me but I have been >investigating it. I can now reproduce in other applications what appears to >be the problem - Two cpu hogs, X and evolution for example are running and >evolution is making X the cpu hog. The problem is that X gets demoted whereas >evolution doesn't. Strangely, dropping evolution to nice +1 or making X -1 >seems to change which one gets demoted, and X is now much smoother. I assume >the same thing is happening here between wine and wineserver, which is why >you've seen reversal of priorities in your previous posts. See if renicing >one of them +1 helps for the time being. I will continue investigating to >find out why the heck this happens and try and fix it. > >Con > >P.S. I've cc'ed MG because he has seen the scheduler do other forms of >trickery and may have thoughts on why this happens. That sounds suspiciously similar to my scenario, but mine requires a third element to trigger. <scritch scritch scritch> What about this? In both your senario and mine, X is running low on cash while doing work at the request of a client right? Charge for it. If X is lower on cash than the guy he's working for, pick the client's pocket... take the remainder of your slice from his sleep_avg for your trouble. If you're not in_interrupt(), nothing's free. Similar to Robinhood, but you take from the rich, and keep it :) He's probably going straight to the bank after he wakes you anyway, so he likely won't even miss it. Instead of backboost of overflow, which can cause nasty problems, you could try backtheft. -Mike ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 18:24 ` Mike Galbraith @ 2003-08-12 18:44 ` Timothy Miller 2003-08-12 18:48 ` Mike Galbraith 2003-08-13 3:34 ` Con Kolivas 1 sibling, 1 reply; 12+ messages in thread From: Timothy Miller @ 2003-08-12 18:44 UTC (permalink / raw) To: Mike Galbraith; +Cc: Con Kolivas, gaxt, linux-kernel Mike Galbraith wrote: > > That sounds suspiciously similar to my scenario, but mine requires a > third element to trigger. > > <scritch scritch scritch> > > What about this? In both your senario and mine, X is running low on > cash while doing work at the request of a client right? Charge for it. > If X is lower on cash than the guy he's working for, pick the client's > pocket... take the remainder of your slice from his sleep_avg for your > trouble. If you're not in_interrupt(), nothing's free. Similar to > Robinhood, but you take from the rich, and keep it :) He's probably > going straight to the bank after he wakes you anyway, so he likely won't > even miss it. Instead of backboost of overflow, which can cause nasty > problems, you could try backtheft. How is this different from back-boost? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 18:44 ` Timothy Miller @ 2003-08-12 18:48 ` Mike Galbraith 0 siblings, 0 replies; 12+ messages in thread From: Mike Galbraith @ 2003-08-12 18:48 UTC (permalink / raw) To: Timothy Miller; +Cc: Con Kolivas, gaxt, linux-kernel At 02:44 PM 8/12/2003 -0400, Timothy Miller wrote: >Mike Galbraith wrote: > >>That sounds suspiciously similar to my scenario, but mine requires a >>third element to trigger. >><scritch scritch scritch> >>What about this? In both your senario and mine, X is running low on cash >>while doing work at the request of a client right? Charge for it. >>If X is lower on cash than the guy he's working for, pick the client's >>pocket... take the remainder of your slice from his sleep_avg for your >>trouble. If you're not in_interrupt(), nothing's free. Similar to >>Robinhood, but you take from the rich, and keep it :) He's probably >>going straight to the bank after he wakes you anyway, so he likely won't >>even miss it. Instead of backboost of overflow, which can cause nasty >>problems, you could try backtheft. > > >How is this different from back-boost? With backboost, you take everything that overflows MAX_SLEEP_AVG and give it all to the waker... you always pull-up. With back-theft (blech;), there's constant pull-up and push-down for all parties instead of only those who reach MAX_SLEEP_AVG, so while you'll still tend to group tasks which are related (the original goal of backboost), it shouldn't (wild theory) go raging out of control. -Mike ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-12 18:24 ` Mike Galbraith 2003-08-12 18:44 ` Timothy Miller @ 2003-08-13 3:34 ` Con Kolivas 2003-08-13 12:47 ` Mike Galbraith 1 sibling, 1 reply; 12+ messages in thread From: Con Kolivas @ 2003-08-13 3:34 UTC (permalink / raw) To: Mike Galbraith; +Cc: gaxt, linux-kernel On Wed, 13 Aug 2003 04:24, Mike Galbraith wrote: > At 12:40 AM 8/13/2003 +1000, Con Kolivas wrote: > >On Wed, 13 Aug 2003 00:42, gaxt wrote: > > > Photoshop 6 (yes, legal owned version) in wine is flawless (as it was > > > with 2.6.0-test3) > > > > > > Galciv plays videos quite smoothly but as soon as I run it it will > > > freeze the cursor for 12-15 seconds every half-minute or so even within > > > the game itself which is turn-based strategy without a lot of whizbang > > > stuff. In the past, the videos would stutter but the game would not > > > suffer from more than short pauses now and then. > > > >Yes, herein lies one of those mysteries that still eludes me but I have > > been investigating it. I can now reproduce in other applications what > > appears to be the problem - Two cpu hogs, X and evolution for example are > > running and evolution is making X the cpu hog. The problem is that X gets > > demoted whereas evolution doesn't. Strangely, dropping evolution to nice > > +1 or making X -1 seems to change which one gets demoted, and X is now > > much smoother. I assume the same thing is happening here between wine and > > wineserver, which is why you've seen reversal of priorities in your > > previous posts. See if renicing one of them +1 helps for the time being. > > I will continue investigating to find out why the heck this happens and > > try and fix it. > > > >Con > > > >P.S. I've cc'ed MG because he has seen the scheduler do other forms of > >trickery and may have thoughts on why this happens. > > That sounds suspiciously similar to my scenario, but mine requires a third > element to trigger. > > <scritch scritch scritch> > > What about this? In both your senario and mine, X is running low on cash > while doing work at the request of a client right? Charge for it. If X is > lower on cash than the guy he's working for, pick the client's pocket... > take the remainder of your slice from his sleep_avg for your trouble. If > you're not in_interrupt(), nothing's free. Similar to Robinhood, but you > take from the rich, and keep it :) He's probably going straight to the > bank after he wakes you anyway, so he likely won't even miss it. Instead > of backboost of overflow, which can cause nasty problems, you could try > backtheft. Not a bad idea at all. The working for someone else thing is killing me. Now, how to implement... Con ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: WINE + Galciv + 2.6.0-test3-mm1-O15 2003-08-13 3:34 ` Con Kolivas @ 2003-08-13 12:47 ` Mike Galbraith 0 siblings, 0 replies; 12+ messages in thread From: Mike Galbraith @ 2003-08-13 12:47 UTC (permalink / raw) To: Con Kolivas; +Cc: gaxt, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2726 bytes --] At 01:34 PM 8/13/2003 +1000, Con Kolivas wrote: >On Wed, 13 Aug 2003 04:24, Mike Galbraith wrote: > > At 12:40 AM 8/13/2003 +1000, Con Kolivas wrote: > > >On Wed, 13 Aug 2003 00:42, gaxt wrote: > > > > Photoshop 6 (yes, legal owned version) in wine is flawless (as it was > > > > with 2.6.0-test3) > > > > > > > > Galciv plays videos quite smoothly but as soon as I run it it will > > > > freeze the cursor for 12-15 seconds every half-minute or so even within > > > > the game itself which is turn-based strategy without a lot of whizbang > > > > stuff. In the past, the videos would stutter but the game would not > > > > suffer from more than short pauses now and then. > > > > > >Yes, herein lies one of those mysteries that still eludes me but I have > > > been investigating it. I can now reproduce in other applications what > > > appears to be the problem - Two cpu hogs, X and evolution for example are > > > running and evolution is making X the cpu hog. The problem is that X gets > > > demoted whereas evolution doesn't. Strangely, dropping evolution to nice > > > +1 or making X -1 seems to change which one gets demoted, and X is now > > > much smoother. I assume the same thing is happening here between wine and > > > wineserver, which is why you've seen reversal of priorities in your > > > previous posts. See if renicing one of them +1 helps for the time being. > > > I will continue investigating to find out why the heck this happens and > > > try and fix it. > > > > > >Con > > > > > >P.S. I've cc'ed MG because he has seen the scheduler do other forms of > > >trickery and may have thoughts on why this happens. > > > > That sounds suspiciously similar to my scenario, but mine requires a third > > element to trigger. > > > > <scritch scritch scritch> > > > > What about this? In both your senario and mine, X is running low on cash > > while doing work at the request of a client right? Charge for it. If X is > > lower on cash than the guy he's working for, pick the client's pocket... > > take the remainder of your slice from his sleep_avg for your trouble. If > > you're not in_interrupt(), nothing's free. Similar to Robinhood, but you > > take from the rich, and keep it :) He's probably going straight to the > > bank after he wakes you anyway, so he likely won't even miss it. Instead > > of backboost of overflow, which can cause nasty problems, you could try > > backtheft. > >Not a bad idea at all. The working for someone else thing is killing me. Now, >how to implement... I had to back up and regroup a bit because of backboost sanity problems (wish I could pull those dang fangs, backboost is wonderful otherwise), but the attached cured my inversion problem. -Mike [-- Attachment #2: xx.diff --] [-- Type: application/octet-stream, Size: 1400 bytes --] --- linux-2.6.0-test1.G8/kernel/sched.c.org Wed Aug 13 09:19:13 2003 +++ linux-2.6.0-test1.G8/kernel/sched.c Wed Aug 13 14:41:42 2003 @@ -358,6 +358,8 @@ if (sleep_time > 0) { unsigned long long sleep_avg; + unsigned long run_time = now - current->timestamp; + unsigned int slice = 1000000 * current->time_slice; /* * This code gives a bonus to interactive tasks. @@ -381,6 +383,22 @@ p->sleep_avg = sleep_avg; p->prio = effective_prio(p); } + /* + * If the awakened task has been asleep for longer than the + * waker has had the CPU plus round-robin time, and it is + * going to preempt, there is a good chance that the waker + * is not getting enough CPU to service the awakened task in + * a timely manner, and that this is the cause of the preempt. + * Take some of the resulting sleep_time from the awakened + * task, and give it to the waker. + */ + if (!in_interrupt() && p->mm && current->mm && sleep_avg > + current->sleep_avg + slice && sleep_time > run_time + + (1000000 * this_rq()->nr_running * TIMESLICE_GRANULARITY) && + TASK_PREEMPTS_CURR(p, task_rq(current))) { + current->sleep_avg += slice; + sleep_avg -= slice; + } } } @@ -1414,6 +1432,7 @@ next->timestamp = now; rq->nr_switches++; rq->curr = next; + next->timestamp = now; prepare_arch_switch(rq, next); prev = context_switch(rq, prev, next); ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-08-13 21:15 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-08-12 15:23 WINE + Galciv + 2.6.0-test3-mm1-O15 Voluspa 2003-08-12 21:15 ` Con Kolivas 2003-08-13 0:54 ` Voluspa 2003-08-13 18:45 ` Timothy Miller 2003-08-13 21:21 ` Con Kolivas -- strict thread matches above, loose matches on Subject: below -- 2003-07-26 21:49 WINE + Galciv + Con Kolivar's 09 patch to 2.6.0-test1-mm2 gaxt 2003-07-29 3:25 ` Con Kolivas 2003-07-29 12:48 ` WINE + Galciv + Con Kolivas's 011 patch to 2.6.0-test2 gaxt 2003-07-29 12:46 ` Con Kolivas 2003-08-12 14:42 ` WINE + Galciv + 2.6.0-test3-mm1-O15 gaxt 2003-08-12 14:40 ` Con Kolivas 2003-08-12 18:24 ` Mike Galbraith 2003-08-12 18:44 ` Timothy Miller 2003-08-12 18:48 ` Mike Galbraith 2003-08-13 3:34 ` Con Kolivas 2003-08-13 12:47 ` Mike Galbraith
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).