From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58772) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf7pL-0001qC-H1 for qemu-devel@nongnu.org; Thu, 14 Jun 2012 07:03:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sf7pF-0004m7-Ay for qemu-devel@nongnu.org; Thu, 14 Jun 2012 07:02:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf7pF-0004lj-3L for qemu-devel@nongnu.org; Thu, 14 Jun 2012 07:02:53 -0400 Message-ID: <4FD9C4E5.1070807@redhat.com> Date: Thu, 14 Jun 2012 14:03:01 +0300 From: Orit Wasserman MIME-Version: 1.0 References: <187b850a0cec3aacfa75663a16575684f3170ef6.1337710679.git.quintela@redhat.com> In-Reply-To: <187b850a0cec3aacfa75663a16575684f3170ef6.1337710679.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/7] No need to iterate if we already are over the limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: chegu_vinod@hp.com, qemu-devel@nongnu.org On 05/22/2012 09:32 PM, Juan Quintela wrote: > If buffers are full, don't iterate, just exit. > > Signed-off-by: Juan Quintela > --- > savevm.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 779bd22..6bc71b1 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -1625,6 +1625,9 @@ int qemu_savevm_state_iterate(QEMUFile *f) > if (se->save_live_state == NULL) > continue; > > + if (qemu_file_rate_limit(f)) { > + return 0; > + } > trace_savevm_section_start(); > /* Section type */ > qemu_put_byte(f, QEMU_VM_SECTION_PART); Reviewed-by: Orit Wasserman