Skip to contentSkip to conversation

Clock running at double speed in guest

DISCUSSION Tim Chen 3 participants 10 messages Jan 27, 2007 – Mar 6, 2007 7 messages not in the archive KVM

lore
Share & tools
lore

Tim Chen

author
#0 lore raw

I notice that when I am testing kvm, the clock on guest is running at twice the speed. Same thing also happen using qemu without kvm.

I look at my wall clock when I issue the command "time sleep 30". When the command returns and report 30 sec has elasped, I found that actually only 15 sec has passed on the wall clock. Perhaps somewhere an extra clock tick was counted.

I am using 2.6.20-rc5 on host and 2.6.19 on guest. Test is done on a dual socket woodcrest machine.

Tim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Tim Chen

I notice that when I am testing kvm, the clock on guest is running at twice the speed. Same thing also happen using qemu without kvm.

I look at my wall clock when I issue the command "time sleep 30". When the command returns and report 30 sec has elasped, I found that actually only 15 sec has passed on the wall clock. Perhaps somewhere an extra clock tick was counted.

That's a known issue, I plan to take a look at it soon.

Signature · 8 lines
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#4 lore raw
In reply to a message not in the archive
Quoted 6 lines
Quoted 4 lines · Tim Chen

I notice that when I am testing kvm, the clock on guest is running at twice the speed. Same thing also happen using qemu without kvm.

I look at my wall clock when I issue the command "time sleep 30".

When

Quoted 1 line
Quoted 1 line

the command returns and report 30 sec has elasped, I found that

actually

Quoted 7 lines
Quoted 4 lines

only 15 sec has passed on the wall clock. Perhaps somewhere an extra clock tick was counted.

That's a known issue, I plan to take a look at it soon.

Mean while try clock=pit in the guest's kernel command line.

Quoted 3 lines

--
Do not meddle in the internals of kernels, for they are subtle and

quick to

Quoted 4 lines

panic.

-----------------------------------------------------------------------

--

Quoted 5 lines

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD

EV

Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

author
#6 lore raw
In reply to a message not in the archive
Quoted 3 lines · Dor Laor

Mean while try clock=pit in the guest's kernel command line.

Mmmm..., this does not fix the problem. So perhaps it is not due to missing clock ticks.

Tim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#7 lore raw
In reply to a message not in the archive
Quoted 12 lines · Tim Chen

I notice that when I am testing kvm, the clock on guest is running at twice the speed. Same thing also happen using qemu without kvm.

I look at my wall clock when I issue the command "time sleep 30". When the command returns and report 30 sec has elasped, I found that actually only 15 sec has passed on the wall clock. Perhaps somewhere an extra clock tick was counted.

I am using 2.6.20-rc5 on host and 2.6.19 on guest. Test is done on a dual socket woodcrest machine.

I've managed to reproduce this briefly. As soon as I started debugging it, however, it went away.

Does this reproduce regularly for you? Do you run kvm as a user that has access to /dev/rtc?

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
author
#9 lore raw
In reply to a message not in the archive
Quoted 5 lines · Avi Kivity

I've managed to reproduce this briefly. As soon as I started debugging it, however, it went away.
Does this reproduce regularly for you?

This is produced consistently in my environment.

Quoted 3 lines

Do you run kvm as a user that
has access to /dev/rtc?

I haven't done anything specifically with respect to /dev/rtc. How do you tell if kvm has access to /dev/rtc?

Tim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

#11 lore raw
In reply to a message not in the archive
Quoted 10 lines · Tim Chen
Quoted 5 lines

Do you run kvm as a user that
has access to /dev/rtc?

I haven't done anything specifically with respect to /dev/rtc. How do you tell if kvm has access to /dev/rtc?

The normal unix permissions on /dev/rtc. If you're running as root, you have them.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
#14 lore raw
In reply to a message not in the archive
Quoted 3 lines
Quoted 3 lines

I've managed to reproduce this briefly. As soon as I started

debugging

Quoted 11 lines
Quoted 2 lines

it, however, it went away.
Does this reproduce regularly for you?

This is produced consistently in my environment.

Quoted 3 lines

Do you run kvm as a user that
has access to /dev/rtc?

I haven't done anything specifically with respect to /dev/rtc. How do you tell if kvm has access to /dev/rtc?

ls -la /proc/pgrep qemu/fd | grep rtc

Quoted 4 lines

Tim

-----------------------------------------------------------------------

--

Quoted 5 lines

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD

EV

Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

author
#13 lore raw
In reply to a message not in the archive
Quoted 4 lines · Avi Kivity

The normal unix permissions on /dev/rtc. If you're running as root, you have them.

Yes, I'm running as root.

Tim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

author
#16 lore raw
In reply to a message not in the archive
Quoted 7 lines
Quoted 3 lines

I haven't done anything specifically with respect to /dev/rtc. How do you tell if kvm has access to /dev/rtc?

ls -la /proc/pgrep qemu/fd | grep rtc

I got:

lr-x------ 1 root root 64 Mar 6 10:12 4 -> /dev/rtc

indicating that qemu has access to /dev/rtc.

Tim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV