2.4.18-pre7 slow ... apm problem
Quoted 8 lines
1) keyboard rate is a bit slow on 2.4.18-pre7 compared to 2.4.18-pre6.
2) On vmware 3.0, ping localhost is very slow. 2.4.18-pre6 has not such problem.After disabling
CONFIG_APM_CPU_IDLE, the system works fast again. With pre6 or earlier versions, system works fine though even withCONFIG_APM_CPU_IDLEenabled.
Idle handling in the apm driver was modified in 2.4.18-pre7 . Back to the drawing board ...
Note that you can disable apm idle handling by setting the apm idle_threshold parameter to 100. You don't need to recompile the kernel.
Quoted 11 lines
Quoted 8 lines
1) keyboard rate is a bit slow on 2.4.18-pre7 compared to 2.4.18-pre6.
2) On vmware 3.0, ping localhost is very slow. 2.4.18-pre6 has not such problem.After disabling
CONFIG_APM_CPU_IDLE, the system works fast again. With pre6 or earlier versions, system works fine though even withCONFIG_APM_CPU_IDLEenabled.Idle handling in the apm driver was modified in 2.4.18-pre7 . Back to the drawing board ...
The keyboard rate one is curious. The vmware one I can easily believe is caused by Vmware switching in/out of OS's without managing the APM state of the processor (and leaving it in powersave)
Not sure its drawing board time, just a little investigation.
Alan
Quoted 4 lines
The keyboard rate one is curious. The vmware one I can easily believe is caused by Vmware switching in/out of OS's without managing the APM state of the processor (and leaving it in powersave)
APM idling is done if apm_cpu_idle() is called, and then if
DELTA(current->times.tms_stime)
-------------------------------
DELTA(jiffies)is greater than the idle threshold of 0.95. Could that ratio be affected by VMware? If so, how?
--
Thomas
Quoted 9 lines
Quoted 2 lines
managing the APM state of the processor (and leaving it in powersave)
APM idling is done if
apm_cpu_idle()is called, and then ifDELTA(current->times.tms_stime) ------------------------------- DELTA(jiffies)is greater than the idle threshold of 0.95. Could that ratio be affected by VMware? If so, how?
Suppose vmware decides to switch between running Linux and its virtualised Windows OS. Can it do this during an interrupt - if so what ensures that vmware isnt switched to after we have done APM idle calls and slowed the CPU right down ?
If so then I suspect vmware should be issuing APM cpu busy calls itself
Quoted 6 lines · Alan Cox
Suppose vmware decides to switch between running Linux and its virtualised Windows OS. Can it do this during an interrupt - if so what ensures that vmware isnt switched to after we have done APM idle calls and slowed the CPU right down ?
If so then I suspect vmware should be issuing APM cpu busy calls itself
Do you see a difference between VMware and other processes in their susceptibility to this problem? If VMware runs slowly because it gets scheduled in while the CPU is idle and the apm driver fails to busyize the CPU, won't the same thing happen for other processes? If so, then our idle handling is fundamentally broken. If not, then what makes VMware special?
Quoted 10 lines · On 28 Jan 2002 06:25:05 -0500 Thomas Hood <[email protected]> wrote:
Quoted 1 line · Alan Cox
If so then I suspect vmware should be issuing APM cpu busy calls itself
Do you see a difference between VMware and other processes in their susceptibility to this problem? If VMware runs slowly because it gets scheduled in while the CPU is idle and the apm driver fails to busyize the CPU, won't the same thing happen for other processes? If so, then our idle handling is fundamentally broken. If not, then what makes VMware special?
Maybe it's just broken. I have some strange problems with hanging vmware 3 (reproducable) on a SMP machine. On an equal machine vmware 2 runs flawlessly. There is no APM or the like involved, both under 2.4.18-pre7. I just don't trust it.
Regards,
Stephan
Quoted 9 lines
Quoted 1 line
If so then I suspect vmware should be issuing APM cpu busy calls itself
Do you see a difference between VMware and other processes in their susceptibility to this problem? If VMware runs slowly because it gets scheduled in while the CPU is idle and the apm driver fails to busyize the CPU, won't the same thing happen for other processes? If so, then our idle handling is fundamentally broken. If not, then what makes VMware special?
We don't know how VMware switches between virtual machines. If that switch is done behind Linux back, then VMware is effectively special. It is virtualising the system and it has to virtualise APM status too. If its doing the switch when it is a current foreground process then it wouldnt explain the problem
Quoted 5 lines · Alan Cox
We don't know how VMware switches between virtual machines. If that switch is done behind Linux back, then VMware is effectively special. It is virtualising the system and it has to virtualise APM status too. If its doing the switch when it is a current foreground process then it wouldnt explain the problem
VMware is essentially a hardware emulator, so if the guest OS is idling the CPU it should only be idling the virtual CPU, not the real one.
Having said that, VMware emulates a lot of hardware by making use of facilities that Linux provides. It emulates a super-VGA card by making use of X, for example. Do you suppose that VMware emulates CPU slowing by slowing the real CPU? I hope not.
Since VMware is closed source software we needn't worry our heads too much about this problem. VMware users have a
workaround: set idle_threshold to 100.
Can we get more info about the keyboard repeat rate slowing?
--
Thomas
Quoted 6 lines · I wrote:
APM idling is done if
apm_cpu_idle()is called, and then ifDELTA(current->times.tms_stime) ------------------------------- DELTA(jiffies)is greater than the idle threshold of 0.95. Could that ratio be affected by VMware? If so, how?
Herm ... I think what you meant was that (a guest OS under) VMware might be telling the APM BIOS to idle the CPU. In that case, apm management should be shut off in either VMware or in the guest OS.
Quoted 3 lines · Stephan von Krawczynski
Quoted 1 line
1) keyboard rate is a bit slow on 2.4.18-pre7 compared to 2.4.18-pre6.
What _exactly_ does this mean? Can you elaborate more on your setup and your problem?
Sorry, just got off a long flight from San Diego to Singapore. Anyway, slow ... means that even without vmware, if I just hit return, the lines would scroll for about every 10 lines and there'll be a litte pause (<0.3 sec). With pre6, there's no such behavior, and if CONFIG_APM_CPU_IDLE is not set, the "pause" goes away.
Quoted 3 lines
Quoted 1 line
2) On vmware 3.0, ping localhost is very slow. 2.4.18-pre6 has not
such problem.
1) linux with vmware and guest system linux
"host" system is linux. "guest" system is linux (actually, I tried with NT as well, same problem).
The sympton is when I try to ping the "host" from vmware's "guest" system, the first response came back to the guest's console. Then if I don't type anything or don't move the mouse on the guest's console, I won't see any further response on the guest's linux console. Even with a lot of mouse movement or pressing the keys, the response is still very slow with "ping".
If I ping from the "host" linux console to the "guest" linux system, responses came back, and does not hang. I'll double check this last point. Got to recompile the kernel again.
Jeff
Quoted 8 lines · Jeff Chua
Quoted 3 lines
Quoted 1 line
1) keyboard rate is a bit slow on 2.4.18-pre7 compared to 2.4.18-pre6.
What _exactly_ does this mean? Can you elaborate more on your setup and your problem?
slow ... means that even without vmware, if I just hit return, the lines would scroll for about every 10 lines and there'll be a litte pause (<0.3 sec). With pre6, there's no such behavior, and if
CONFIG_APM_CPU_IDLEis not set, the "pause" goes away.
2.0 cps on "guest" linux os just pressing "g". 30 cps on "host" linux os.
Quoted 11 lines
Quoted 4 lines
Quoted 2 lines
2) On vmware 3.0, ping localhost is very slow. 2.4.18-pre6 has not
such problem.
1) linux with vmware and guest system linux"host" system is linux. "guest" system is linux (actually, I tried with NT as well, same problem).
If I ping from the "host" linux console to the "guest" linux system, responses came back, and does not hang. I'll double check this last point. Got to recompile the kernel again.
slow from "guest" os to "host" os.
slow from "guest" os to guest's 127.0.0.1
fast from "host" os to "guest" os.
If I set idle_threshold to 100, problem goes away.
APM is not enabled on "guest" os.
Jeff.
Quoted 5 lines · Jeff Chua
Sorry, just got off a long flight from San Diego to Singapore. Anyway, slow ... means that even without vmware, if I just hit return, the lines would scroll for about every 10 lines and there'll be a litte pause (<0.3 sec). With pre6, there's no such behavior, and if
CONFIG_APM_CPU_IDLEis not set, the "pause" goes away.
Suggestion: Try setting the idle_threshold to a higher value, e.g., 98. (The default value is 95.)
Question to all: Would it be a good idea to de-idle the CPU inside interrupt handlers?
Quoted 9 lines
"host" system is linux. "guest" system is linux (actually, I tried with NT as well, same problem).
The sympton is when I try to ping the "host" from vmware's "guest" system, the first response came back to the guest's console. Then if I don't type anything or don't move the mouse on the guest's console, I won't see any further response on the guest's linux console. Even with a lot of mouse movement or pressing the keys, the response is still very slow with "ping".
Quoted 3 lines
If I ping from the "host" linux console to the "guest" linux system, responses came back, and does not hang. I'll double check this last point. Got to recompile the kernel again.
Try disabling APM cpu idling (set apm idle_threshold to 100) in the _guest_ OS. (Leave it enabled in the host OS.) Tell us what happens.
Also try disabling APM cpu idling (set apm idle_threshold to 100) in the _host_ OS. (Leave it enabled in the guest OS.) Tell us what happens.
I repeat: You do not need to recompile the kernel to enable/disable APM cpu idle: to disable it simply set idle_threshold to 100.
Quoted 2 lines
Question to all: Would it be a good idea to de-idle the CPU inside interrupt handlers?
If you call APM routines from inside APM routines weirdness occurs - so the answer is no. I'd say that unless this is shown to be occuring in non vmware stuff its up to vmware to handle the apm situation right
Quoted 2 lines · Thomas Hood
Suggestion: Try setting the
idle_thresholdto a higher value, e.g., 98. (The default value is 95.)
With 98, "ping localhost" on "guest" os showed 2 responses, then pause for few seconds, then response, ...
With 95, I got the 1st response, then nothing. 98 seems better, but still slow...
With 100, it's perfect.
Quoted 2 lines
Try disabling APM cpu idling (set apm
idle_thresholdto 100) in the _guest_ OS. (Leave it enabled in the host OS.) Tell us what happens.
No difference, still slow. Even with guest os running pre6, it's still slow.
Quoted 4 lines
Also try disabling APM cpu idling (set apm
idle_thresholdto 100) in the _host_ OS. (Leave it enabled in the guest OS.) Tell us what happens.
guest os "ping localhost" is perfect.
Quoted 2 lines
I repeat: You do not need to recompile the kernel to enable/disable APM cpu idle: to disable it simply set
idle_thresholdto 100.
Ok got it. But still have to reboot machine as the apm is loaded and can't "rmmod apm". Complained that it's in use ([kapmd] even after stopping apmd.
By the way, setting power_off=1 or realmode_power_off=1 does not power off the h/w.
Thanks,
Jeff.
Quoted 3 lines · Jeff Chua
Ok got it. But still have to reboot machine as the apm is loaded and can't "rmmod apm". Complained that it's in use ([kapmd] even after stopping apmd.
That's a bug, I think. You should be able to rmmod the apm module.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Quoted 6 lines · Thomas Hood
Quoted 3 lines · Jeff Chua
Ok got it. But still have to reboot machine as the apm is loaded and can't "rmmod apm". Complained that it's in use ([kapmd] even after stopping apmd.
That's a bug, I think. You should be able to rmmod the apm module.
found the reason why I can't rmmod apm ... xfree is using it. If I start Xfree first, then modprobe apm, then I can rmmod apm.
Jeff.
Quoted 4 lines · Stephan von Krawczynski
Quoted 2 lines
Quoted 2 lines
1) keyboard rate is a bit slow on 2.4.18-pre7 compared to
2.4.18-pre6.
Quoted 1 line
Quoted 1 line
What _exactly_ does this mean? Can you elaborate more on your
setup and
Quoted 3 lines
Quoted 1 line
your problem?
Sorry, just got off a long flight from San Diego to Singapore.
Anyway,
Quoted 1 line
slow ... means that even without vmware, if I just hit return, the
lines
Quoted 1 line
would scroll for about every 10 lines and there'll be a litte pause
(<0.3
Quoted 1 line
sec). With pre6, there's no such behavior, and if
CONFIG_APM_CPU_IDLE is
Quoted 1 line
not set, the "pause" goes away.
Ok, I cannot see this one, I have no APM enabled on my boxes. Sorry.
Quoted 1 line
Quoted 1 line
Quoted 1 line
2) On vmware 3.0, ping localhost is very slow. 2.4.18-pre6 has
not
Quoted 4 lines
Quoted 2 lines
such problem.
1) linux with vmware and guest system linux"host" system is linux. "guest" system is linux (actually, I tried
with NT
Quoted 3 lines
as well, same problem).
The sympton is when I try to ping the "host" from vmware's "guest"
system,
Quoted 1 line
the first response came back to the guest's console. Then if I don't
type
Quoted 1 line
anything or don't move the mouse on the guest's console, I won't see
any
Quoted 1 line
further response on the guest's linux console. Even with a lot of
mouse
Quoted 1 line
movement or pressing the keys, the response is still very slow with
"ping".
This is interesting.
I have not set up a guest linux yet, but I experienced a problem with Win98 guest which may sound related:
I start the guest win98 and try to open a dos-window. The window opens but no output is presented (no prompt, no nothing) and guest system somehow "hangs". Sometimes (rarely) I can make it work again by hitting keys on the keyboard. The effect started off as window coming up with prompt, I tried to ping the host system, and the first packet was somehow slow, but then everything was ok. On the next guest boot, some output appeared at the dosbox, but the prompt was delayed. Now I get no prompt no matter what I try.
Host system is 2.4.18-pre7.
Vmware was installed from scratch, win98 guest was installed from scratch with no additions whatsoever.
ping from host to guest works flawlessly.
Quoted 2 lines
If I ping from the "host" linux console to the "guest" linux system, responses came back, and does not hang. I'll double check this last
point.
Quoted 1 line
Got to recompile the kernel again.
As I never saw this with vmware 2 (even not on 2.4.18-pre7) I would say version 3 has a real problem somewhere.
Regards,
Stephan
Quoted 1 line · Stephan von Krawczynski
Ok, I cannot see this one, I have no APM enabled on my boxes. Sorry.
If I set apm idle off, vmware guest os "ping localhost" works fine.
Quoted 2 lines
As I never saw this with vmware 2 (even not on 2.4.18-pre7) I would say version 3 has a real problem somewhere.
Never had any problem with vmware3 until pre7.
Try to test vmware2 on pre7 with apm cpu_idle enabled. I think you'll see the same problem. Again, pre6 with apm cpu_idle enabled works fine.
Jeff
Quoted 5 lines · Jeff Chua
Sorry, just got off a long flight from San Diego to Singapore. Anyway, slow ... means that even without vmware, if I just hit return, the lines would scroll for about every 10 lines and there'll be a litte pause (<0.3 sec). With pre6, there's no such behavior, and if
CONFIG_APM_CPU_IDLEis not set, the "pause" goes away.
Suggestion: Try setting the idle_threshold to a higher value, e.g., 98. (The default value is 95.)
Question to all: Would it be a good idea to de-idle the CPU inside interrupt handlers?
Quoted 9 lines
"host" system is linux. "guest" system is linux (actually, I tried with NT as well, same problem).
The sympton is when I try to ping the "host" from vmware's "guest" system, the first response came back to the guest's console. Then if I don't type anything or don't move the mouse on the guest's console, I won't see any further response on the guest's linux console. Even with a lot of mouse movement or pressing the keys, the response is still very slow with "ping".
Quoted 3 lines
If I ping from the "host" linux console to the "guest" linux system, responses came back, and does not hang. I'll double check this last point. Got to recompile the kernel again.
Try disabling APM cpu idling (set apm idle_threshold to 100) in the _guest_ OS. (Leave it enabled in the host OS.) Tell us what happens.
Also try disabling APM cpu idling (set apm idle_threshold to 100) in the _host_ OS. (Leave it enabled in the guest OS.) Tell us what happens.
I repeat: You do not need to recompile the kernel to enable/disable APM cpu idle: to disable it simply set idle_threshold to 100.