From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: A testing for KVM Date: Thu, 21 Jun 2007 12:01:26 +0300 Message-ID: <467A3E66.4090406@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A01A562AD@pdsmsx411.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01A562AD-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dong, Eddie wrote: > In Xen, we virtualize TSC too to make sure the guest TSC time is > synchronized with > guest PIT time, so guest can see an accurate virtual time. (refer my > presentation > doc on Xen September summit 06.) It is good but time to time > we see bugs due to the complicated time virtualization mechanism. As far > as I know, > Vmware doesn't solve this problem either, it depends on guest > application to sync > guest time with real time (network or host). > > Do you mean that rdtsc is trapped? Or that you play with TSC_OFFSET so that time is smoother? > We can use PV time of linux, another way is to persuade community to > give up > the cross reference of PIT and TSC to give up picking the lost ticks > given that > today's OS is smart enough and won't disable IRQ for that long time > before > another PIT expires (1-4ms), so those kind of picking up lost ticks is > quit > unnecessary, especially for X86-64 (faster processor). > > Another big issue is that guest Linux will eventually fail back to PIT > time source after > hundreds of "lost ticks" and thus give up TSC time source. This is OK > for normal application > but dead set for database server where gettimeofday is frequently used. > We saw > 30-40% performance degradation due to this only. (gettimeofday will > read port 40 > multiple times which is extremely slow under virtualization). > > I will ask Jun, Avi to bring this issue to virtualization mini summit to > persuade > communitty to do some changes in guest timer IRQ handler. > For newer kernels, we can supply a paravirt clocksource (as in Anthony's patchset) which will remove the need for changing the bare hardware time code. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/