From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuKX6-0007rT-K7 for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:20:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuKWz-0006BZ-LP for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:20:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuKWz-0006B4-Ej for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:20:13 -0500 Date: Fri, 28 Nov 2014 13:19:59 +0100 From: Kevin Wolf Message-ID: <20141128121959.GD4035@noname.redhat.com> References: <1417013204-30676-1-git-send-email-kwolf@redhat.com> <1417013204-30676-2-git-send-email-kwolf@redhat.com> <20141128114953.GG13631@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline In-Reply-To: <20141128114953.GG13631@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH 1/3] qemu-img bench List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: pbonzini@redhat.com, ming.lei@canonical.com, pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 28.11.2014 um 12:49 hat Stefan Hajnoczi geschrieben: > On Wed, Nov 26, 2014 at 03:46:42PM +0100, Kevin Wolf wrote: > > + while (data.n > 0) { > > + main_loop_wait(false); > > + } >=20 > Why is this false (non-blocking)? This is why you get the main loop > spun warning message. >=20 > Using true (blocking) seems like the right thing. data.n changes as > part of the callback, which is invoked from the main loop. There is no > need to be non-blocking. I think the parameter has exactly the opposite meaning as what you describe: int main_loop_wait(int nonblocking) If it were true, you would get timeout =3D 0. qemu-io and qemu-nbd also pass false here. Kevin --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJUeGhvAAoJEH8JsnLIjy/Wei0P/3ZSRGhwiMfLCdZUzOViwguf frSvVi044ElV7QLoVO/iD/5XTLcWJ+YJXyNJZdSGNhJPjwj3aKeB3sq1cUTmpqCD PW+Kggd6PXl6FLcjcH0Crp7lcfWQypVcTlCaXyIAvk2RWdAOXCbubYYygTJEAwQ/ 0O4BJ7MZ77PrACSl0wXt2kTbVrBF0KQVpjwDMySnGf8plWpPSEs7HxSN1NxDqQBg RGl2icwqj+603uR5jEpkcz1oRfszHFkJnb8wQzJTgwU506IoU0cEKUvTSLa5GXww J5d1riFqaZnUDna2ryYpGsBZqGmLA+MAzrYpHq0xNmdfgvvNlvQOdaZj40O6y8YF 4Go8SPEyjPBcJMgkt6nbndFUEqAYWjUQzUHZn2l3N/SYcroqEjLTrF2+o65L0E7y 83L65ZXSnQliXPvO657yrSSeeRAmJDlg29rCm715t6BgoeKFMSrwE+Np3NP8Pa0S 2Ka/pgTIGdMigggeW7IRJc73cjfq+PZrGVOAmbYLveEH1l7qyVTzC28n9RUKOD7R Www8Da8rWiuJZq6SxmaIdV5V2uB8E+7cyAf/LkeMs0w3d3+ZBeGhekqnzcgv1PNe 27evMHu82Uy8PNSQf1B5XZPEuXK8klwdG5BwdoFzyP51dDobd165/ncNVOgFbnoY 5412ZzjDKhVp4KGrsDqe =shSO -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--