From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi1Lp-0007np-06 for qemu-devel@nongnu.org; Wed, 07 May 2014 08:53:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wi1Lf-0001WZ-Q3 for qemu-devel@nongnu.org; Wed, 07 May 2014 08:53:32 -0400 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:38136) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wi1Lf-0001VJ-Hs for qemu-devel@nongnu.org; Wed, 07 May 2014 08:53:23 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so1139777pab.41 for ; Wed, 07 May 2014 05:53:22 -0700 (PDT) Message-ID: <536A2CB8.7060406@gmail.com> Date: Wed, 07 May 2014 20:53:12 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1398918422-3019-1-git-send-email-wenchaoqemu@gmail.com> <1398918422-3019-7-git-send-email-wenchaoqemu@gmail.com> <5362C611.9010300@redhat.com> In-Reply-To: <5362C611.9010300@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V5 06/28] monitor: change event functions as an implemention of new emit method List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, lcapitulino@redhat.com 于 2014/5/2 6:09, Eric Blake 写道: > On 04/30/2014 10:26 PM, Wenchao Xia wrote: >> Now monitor has been hooked on the new event mechanism, so the patches >> later can convert event callers one by one. qmp_query_events() is also >> switched to use new generated event defines. Note that old function >> monitor_protocol_event() is kept for existing caller to avoid code break, >> but rate limiting is bypassed to avoid too many duplicated code. After >> convertion, the function would be removed. > > s/convertion/conversion/ > s/would/will/ > >> >> Signed-off-by: Wenchao Xia >> --- >> monitor.c | 47 ++++++++++++++++++++++++++--------------------- >> 1 files changed, 26 insertions(+), 21 deletions(-) >> > >> @@ -644,7 +648,8 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) >> } >> >> trace_monitor_protocol_event(event, event_name, qmp); >> - monitor_protocol_event_queue(event, QOBJECT(qmp)); >> + /* Bypass rate limiting for now */ >> + monitor_protocol_event_emit(event, QOBJECT(qmp)); >> QDECREF(qmp); > > I'm not quite sure I follow - is this comment evidence of something > temporarily broken for the duration of conversions, that gets fixed > later in the series; or are you breaking event rate limiting? > This change breaks rate limiting, but gets fixed after conversion. Since I modified old rate limiting code to work in new event mechnism, so old event mechnism can't work any more, unless I duplicate those code, make things complicate.