public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Windows 2003: ping -n doesn't wait
@ 2009-01-20 14:53 Sven Rudolph
  2009-01-21 14:05 ` Dor Laor
  2009-01-23 20:55 ` Marcelo Tosatti
  0 siblings, 2 replies; 6+ messages in thread
From: Sven Rudolph @ 2009-01-20 14:53 UTC (permalink / raw)
  To: kvm

Hello,

first the facts required by bug reporting guidelines:

- two Quad-Core AMD Opteron(tm) Processors 2352
- kvm-83 (both kernel and userland)
- Host kernel: 2.6.28.1, x86_64 
- guest:
  - 4 CPUs assigned to this guest (-smp 4)
  - Microsoft Windows 2003 Server, Standard Edition, Service Pack 2
- qemu command line:
  qemu-system-x86_64 -m 4096 -boot c -hda hda.dat -smp 4 \
    -net nic,macaddr=00:50:56:24:0b:37,model=virtio \
    -net tap,ifname=vm03,script=no,downscript=no

The problem: When running "ping -n 3 localhost" on the guest it should
wait one second between each ping request and the time needed should
be non-negative and below 10 ms. Instead, ping does not actually wait
between sending the packets, and the time for the requests ist often
displayed to be too large or negative. Simple examples:

  [WinNT] ping -n 3 localhost

  Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:

  Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
  Antwort von 127.0.0.1: Bytes=32 Zeit=-613ms TTL=128
  Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128

  Ping-Statistik fr 127.0.0.1:
      Pakete: Gesendet = 3, Empfangen = 3, Verloren = 0 (0% Verlust),
  Ca. Zeitangaben in Millisek.:
      Minimum = -613ms, Maximum = -465ms, Mittelwert = 1431655251ms

  [WinNT] ping -n 3 localhost

  Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:

  Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128
  Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128
  Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128

  Ping-Statistik fr 127.0.0.1:
      Pakete: Gesendet = 3, Empfangen = 3, Verloren = 0 (0% Verlust),
  Ca. Zeitangaben in Millisek.:
      Minimum = 14699ms, Maximum = 14699ms, Mittelwert = 14699ms

This makes the problem disappear:
- -smp 1

And these do not make the problem disappear:
- -no-kvm-irqchip
- -no-kvm-pit

Testing with -no-kvm makes no sense because -no-kvm only works with
one CPU (and using "-smp 4 -no-kvm" causes an immediate segfault).

In addition I tried the -clock options. hpet and rtc didn't run
("could not initialize alarm timer"); and dynticks and unix didn't
make the problem disappear.

Ideas, hints, or requests for more info?

	Sven



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Windows 2003: ping -n doesn't wait
  2009-01-20 14:53 Windows 2003: ping -n doesn't wait Sven Rudolph
@ 2009-01-21 14:05 ` Dor Laor
  2009-01-23 16:45   ` Marcelo Tosatti
  2009-01-23 20:55 ` Marcelo Tosatti
  1 sibling, 1 reply; 6+ messages in thread
From: Dor Laor @ 2009-01-21 14:05 UTC (permalink / raw)
  To: Sven Rudolph; +Cc: kvm, Marcelo Tosatti

Sven Rudolph wrote:
> Hello,
>
> first the facts required by bug reporting guidelines:
>
> - two Quad-Core AMD Opteron(tm) Processors 2352
> - kvm-83 (both kernel and userland)
> - Host kernel: 2.6.28.1, x86_64 
> - guest:
>   - 4 CPUs assigned to this guest (-smp 4)
>   - Microsoft Windows 2003 Server, Standard Edition, Service Pack 2
> - qemu command line:
>   qemu-system-x86_64 -m 4096 -boot c -hda hda.dat -smp 4 \
>     -net nic,macaddr=00:50:56:24:0b:37,model=virtio \
>     -net tap,ifname=vm03,script=no,downscript=no
>
> The problem: When running "ping -n 3 localhost" on the guest it should
> wait one second between each ping request and the time needed should
> be non-negative and below 10 ms. Instead, ping does not actually wait
> between sending the packets, and the time for the requests ist often
> displayed to be too large or negative. Simple examples:
>
>   [WinNT] ping -n 3 localhost
>
>   Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:
>
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-613ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>
>   Ping-Statistik fr 127.0.0.1:
>       Pakete: Gesendet = 3, Empfangen = 3, Verloren = 0 (0% Verlust),
>   Ca. Zeitangaben in Millisek.:
>       Minimum = -613ms, Maximum = -465ms, Mittelwert = 1431655251ms
>
>   [WinNT] ping -n 3 localhost
>
>   Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:
>
>   Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=14699ms TTL=128
>
>   Ping-Statistik fr 127.0.0.1:
>       Pakete: Gesendet = 3, Empfangen = 3, Verloren = 0 (0% Verlust),
>   Ca. Zeitangaben in Millisek.:
>       Minimum = 14699ms, Maximum = 14699ms, Mittelwert = 14699ms
>
> This makes the problem disappear:
> - -smp 1
>
> And these do not make the problem disappear:
> - -no-kvm-irqchip
> - -no-kvm-pit
>
> Testing with -no-kvm makes no sense because -no-kvm only works with
> one CPU (and using "-smp 4 -no-kvm" causes an immediate segfault).
>
> In addition I tried the -clock options. hpet and rtc didn't run
> ("could not initialize alarm timer"); and dynticks and unix didn't
> make the problem disappear.
>
> Ideas, hints, or requests for more info?
>   
It's an unsync tsc issue. I have it reproduced also over latest head.
Marcelo, can you comment on it?
> 	Sven
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Windows 2003: ping -n doesn't wait
  2009-01-21 14:05 ` Dor Laor
@ 2009-01-23 16:45   ` Marcelo Tosatti
  0 siblings, 0 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2009-01-23 16:45 UTC (permalink / raw)
  To: Dor Laor; +Cc: Sven Rudolph, kvm

On Wed, Jan 21, 2009 at 04:05:45PM +0200, Dor Laor wrote:
>> Ideas, hints, or requests for more info?
>>   
> It's an unsync tsc issue. I have it reproduced also over latest head.
> Marcelo, can you comment on it?

Trying to figure what Windows is doing. Can't reproduce on Intel host.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Windows 2003: ping -n doesn't wait
  2009-01-20 14:53 Windows 2003: ping -n doesn't wait Sven Rudolph
  2009-01-21 14:05 ` Dor Laor
@ 2009-01-23 20:55 ` Marcelo Tosatti
  2009-01-23 23:53   ` Dor Laor
  2009-01-26 17:09   ` Sven Rudolph
  1 sibling, 2 replies; 6+ messages in thread
From: Marcelo Tosatti @ 2009-01-23 20:55 UTC (permalink / raw)
  To: Sven Rudolph, Dor Laor; +Cc: kvm

On Tue, Jan 20, 2009 at 03:53:06PM +0100, Sven Rudolph wrote:
> Hello,
> 
> first the facts required by bug reporting guidelines:
> 
> - two Quad-Core AMD Opteron(tm) Processors 2352
> - kvm-83 (both kernel and userland)
> - Host kernel: 2.6.28.1, x86_64 
> - guest:
>   - 4 CPUs assigned to this guest (-smp 4)
>   - Microsoft Windows 2003 Server, Standard Edition, Service Pack 2
> - qemu command line:
>   qemu-system-x86_64 -m 4096 -boot c -hda hda.dat -smp 4 \
>     -net nic,macaddr=00:50:56:24:0b:37,model=virtio \
>     -net tap,ifname=vm03,script=no,downscript=no
> 
> The problem: When running "ping -n 3 localhost" on the guest it should
> wait one second between each ping request and the time needed should
> be non-negative and below 10 ms. Instead, ping does not actually wait
> between sending the packets, and the time for the requests ist often
> displayed to be too large or negative. Simple examples:
> 
>   [WinNT] ping -n 3 localhost
> 
>   Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:
> 
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-613ms TTL=128
>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128

Sven, Dor,

Can you try to use the AMD CPU drivers for Windows? 

Take a look at http://forums.citrix.com/thread.jspa?threadID=93813

http://www.therightstuff.de/2007/06/05/The-Case-Of-The-Negative-Ping.aspx

I don't doubt the KVM tsc syncing code for AMD is not involved, though.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Windows 2003: ping -n doesn't wait
  2009-01-23 20:55 ` Marcelo Tosatti
@ 2009-01-23 23:53   ` Dor Laor
  2009-01-26 17:09   ` Sven Rudolph
  1 sibling, 0 replies; 6+ messages in thread
From: Dor Laor @ 2009-01-23 23:53 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Sven Rudolph, kvm, Roedel, Joerg

Marcelo Tosatti wrote:
> On Tue, Jan 20, 2009 at 03:53:06PM +0100, Sven Rudolph wrote:
>   
>> Hello,
>>
>> first the facts required by bug reporting guidelines:
>>
>> - two Quad-Core AMD Opteron(tm) Processors 2352
>> - kvm-83 (both kernel and userland)
>> - Host kernel: 2.6.28.1, x86_64 
>> - guest:
>>   - 4 CPUs assigned to this guest (-smp 4)
>>   - Microsoft Windows 2003 Server, Standard Edition, Service Pack 2
>> - qemu command line:
>>   qemu-system-x86_64 -m 4096 -boot c -hda hda.dat -smp 4 \
>>     -net nic,macaddr=00:50:56:24:0b:37,model=virtio \
>>     -net tap,ifname=vm03,script=no,downscript=no
>>
>> The problem: When running "ping -n 3 localhost" on the guest it should
>> wait one second between each ping request and the time needed should
>> be non-negative and below 10 ms. Instead, ping does not actually wait
>> between sending the packets, and the time for the requests ist often
>> displayed to be too large or negative. Simple examples:
>>
>>   [WinNT] ping -n 3 localhost
>>
>>   Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:
>>
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-613ms TTL=128
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>>     
>
> Sven, Dor,
>
> Can you try to use the AMD CPU drivers for Windows? 
>
> Take a look at http://forums.citrix.com/thread.jspa?threadID=93813
>
> http://www.therightstuff.de/2007/06/05/The-Case-Of-The-Negative-Ping.aspx
>
> I don't doubt the KVM tsc syncing code for AMD is not involved, though.
>
>   
Installing AMD's driver for powerNow solves this issue.
Joerg, can you please supply us some explanations?
Thanks,
Dor
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Windows 2003: ping -n doesn't wait
  2009-01-23 20:55 ` Marcelo Tosatti
  2009-01-23 23:53   ` Dor Laor
@ 2009-01-26 17:09   ` Sven Rudolph
  1 sibling, 0 replies; 6+ messages in thread
From: Sven Rudolph @ 2009-01-26 17:09 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Sven Rudolph, Dor Laor, kvm

Marcelo Tosatti <mtosatti@redhat.com> writes:

> On Tue, Jan 20, 2009 at 03:53:06PM +0100, Sven Rudolph wrote:
>> Hello,
>> 
>> first the facts required by bug reporting guidelines:
>> 
>> - two Quad-Core AMD Opteron(tm) Processors 2352
>> - kvm-83 (both kernel and userland)
>> - Host kernel: 2.6.28.1, x86_64 
>> - guest:
>>   - 4 CPUs assigned to this guest (-smp 4)
>>   - Microsoft Windows 2003 Server, Standard Edition, Service Pack 2
>> - qemu command line:
>>   qemu-system-x86_64 -m 4096 -boot c -hda hda.dat -smp 4 \
>>     -net nic,macaddr=00:50:56:24:0b:37,model=virtio \
>>     -net tap,ifname=vm03,script=no,downscript=no
>> 
>> The problem: When running "ping -n 3 localhost" on the guest it should
>> wait one second between each ping request and the time needed should
>> be non-negative and below 10 ms. Instead, ping does not actually wait
>> between sending the packets, and the time for the requests ist often
>> displayed to be too large or negative. Simple examples:
>> 
>>   [WinNT] ping -n 3 localhost
>> 
>>   Ping wird ausgefhrt fr localhost [127.0.0.1] mit 32 Bytes Daten:
>> 
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-613ms TTL=128
>>   Antwort von 127.0.0.1: Bytes=32 Zeit=-465ms TTL=128
>
> Sven, Dor,
>
> Can you try to use the AMD CPU drivers for Windows? 
>
> Take a look at http://forums.citrix.com/thread.jspa?threadID=93813
>
> http://www.therightstuff.de/2007/06/05/The-Case-Of-The-Negative-Ping.aspx
>
> I don't doubt the KVM tsc syncing code for AMD is not involved, though.

Adding /usepmtimer in boot.ini solves the problem, see
http://support.microsoft.com/kb/938448/en-us :

  To resolve this problem, configure Windows Server 2003 to use the
  PM_TIMER setting instead of the time-stamp counter. To do this, add
  the /usepmtimer parameter to the Boot.ini file, and then restart the
  server.

  Note The /usepmtimer parameter is automatically added to the
  Boot.ini file when you install the latest AMD PowerNow! Technology
  driver from AMD. The updated driver itself does not resolve this
  problem. However, the installation process makes the necessary
  changes to the Boot.ini file to resolve this problem.

This might solve other spurious problems (stalled logins; loss of SMB
file service connections, scratched Windows profiles) too; I will test
this in the next days.

	Sven


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-26 17:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 14:53 Windows 2003: ping -n doesn't wait Sven Rudolph
2009-01-21 14:05 ` Dor Laor
2009-01-23 16:45   ` Marcelo Tosatti
2009-01-23 20:55 ` Marcelo Tosatti
2009-01-23 23:53   ` Dor Laor
2009-01-26 17:09   ` Sven Rudolph

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox