From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50214 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q9D6T-0007z3-DY for qemu-devel@nongnu.org; Mon, 11 Apr 2011 05:08:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9D6R-0005r3-Uv for qemu-devel@nongnu.org; Mon, 11 Apr 2011 05:08:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9D6R-0005qa-LB for qemu-devel@nongnu.org; Mon, 11 Apr 2011 05:08:11 -0400 Message-ID: <4DA2C4F2.1000002@redhat.com> Date: Mon, 11 Apr 2011 12:08:02 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription References: <148574451.12234.1302512788577.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> In-Reply-To: <148574451.12234.1302512788577.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ulrich Obergfell Cc: aliguori@us.ibm.com, kvm@vger.kernel.org, jan kiszka , qemu-devel@nongnu.org, gcosta@redhat.com On 04/11/2011 12:06 PM, Ulrich Obergfell wrote: > >> vmstate_hpet_timer = { > >> VMSTATE_UINT64(fsb, HPETTimer), > >> VMSTATE_UINT64(period, HPETTimer), > >> VMSTATE_UINT8(wrap_flag, HPETTimer), > >> + VMSTATE_UINT64_V(saved_period, HPETTimer, 3), > >> + VMSTATE_UINT64_V(ticks_not_accounted, HPETTimer, 3), > >> + VMSTATE_UINT32_V(irqs_to_inject, HPETTimer, 3), > >> + VMSTATE_UINT32_V(irq_rate, HPETTimer, 3), > >> + VMSTATE_UINT32_V(divisor, HPETTimer, 3), > > > > We ought to be able to use a subsection keyed off of whether any ticks > > are currently accumulated, no? > > > Anthony, > > I'm not sure if I understand your question correctly. Are you suggesting > to migrate the driftfix-related state conditionally / only if there are > any ticks accumulated in 'ticks_not_accounted' and 'irqs_to_inject' ? > > The size of the driftfix-related state is 28 bytes per timer and we have > 32 timers per HPETState, i.e. 896 additional bytes per HPETState. With a > maximum number of 8 HPET blocks (HPETState), this amounts to 7168 bytes. > Hence, unconditional migration of the driftfix-related state should not > cause significant additional overhead. > It's not about overhead. > Maybe I missed something. Could you please explain which benefit you see > in using a subsection ? In the common case of there being no drift, you can migrate from a qemu that supports driftfix to a qemu that doesn't. -- error compiling committee.c: too many arguments to function