Received: from eggs.gnu.org ([2001:4830:134:3::10]:48563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm1Zb-0005SS-LV for qemu-devel@nongnu.org; Tue, 13 Oct 2015 11:33:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zm1Za-0007CA-S9 for qemu-devel@nongnu.org; Tue, 13 Oct 2015 11:33:07 -0400 Date: Tue, 13 Oct 2015 16:32:56 +0100 From: Stefan Hajnoczi Message-ID: <20151013153256.GG3057@stefanha-thinkpad.redhat.com> References: <5789a5d41907f1b487ff5adc38ae2be7348cfadc.1443793122.git.berto@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5789a5d41907f1b487ff5adc38ae2be7348cfadc.1443793122.git.berto@igalia.com> Subject: Re: [Qemu-devel] [PATCH v2 04/22] util: Infrastructure for computing recent averages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , qemu-devel@nongnu.org, Max Reitz On Fri, Oct 02, 2015 at 05:26:14PM +0300, Alberto Garcia wrote: > +int64_t cpu_get_clock(void) > +{ > + return my_clock_value; > +} Please add a comment here explaining that this is the clock for QEMU_CLOCK_VIRTUAL. > +/* Account a value > + * > + * @ta: the TimedAverage structure > + * @value: the value to account > + */ > +void timed_average_account(TimedAverage *ta, uint64_t value) > +{ > + int i; > + check_expirations(ta); > + > + /* Do the accouting in both windows at the same time */ s/accouting/accounting/