From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azl3j-0004rL-LT for qemu-devel@nongnu.org; Mon, 09 May 2016 09:17:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azl3i-00028p-ND for qemu-devel@nongnu.org; Mon, 09 May 2016 09:17:15 -0400 Date: Mon, 9 May 2016 14:17:06 +0100 From: Stefan Hajnoczi Message-ID: <20160509131706.GD3372@stefanha-x1.localdomain> References: <1461346962-4676-1-git-send-email-kwolf@redhat.com> <1461346962-4676-10-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="48TaNjbzBVislYPb" Content-Disposition: inline In-Reply-To: <1461346962-4676-10-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 09/13] block: Drain throttling queue with BdrvChild callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com --48TaNjbzBVislYPb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 22, 2016 at 07:42:38PM +0200, Kevin Wolf wrote: > This removes the last part of I/O throttling from block/io.c and moves > it to the BlockBackend. >=20 > Instead of having knowledge about throttling inside io.c, we can call a > BdrvChild callback .drained_begin/end, which happens to drain the > throttled requests for BlockBackend parents. >=20 > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 32 +++++++++++++++++++++++++++----- > block/io.c | 39 ++++++++++++++++++--------------------- > include/block/block_int.h | 8 +++----- > 3 files changed, 48 insertions(+), 31 deletions(-) I'm confused about the naming. BdrvChildRole.drained_begin/end and bdrv_parent_drained_begin/end have nothing to do with bdrv_drained_begin()/bdrv_drained_end()? If these were callbacks that happened at bdrv_drained_begin/end time then I could understand, but that doesn't seem to be the case. What are the semantics of these callbacks? Maybe we can find a clearer name. I think the point is not to "drain" (in the sense of completing requests) but simply to restart queued requests? --48TaNjbzBVislYPb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXMI3SAAoJEJykq7OBq3PIRbwH/3pg5KlDx3/tYmIS1tsYAFYY RndFiBT9bdRW0k4508wfTwNrBPBM/tQ53oXKnEHS4q4v1TxhROwssfViy1m/cKfS 6UEW8IrwHEnM0pLCGC1uFspIeg1k0nilQduiq5PV+qaj/233W8X+sSceiP0MVKWj s2DeUyLoFQId0XcOjjmoWiN46l6hwq8fumAQOPbSNS5ArNJychZzFa7W0JZJ0v+s W8WA3f+OizDWgFxjTbkzSNv95Fha0D554TZFofIet0lbkQlgLbt1J3k0qWpBCMbR NrB89/LuV6mT/j/cPI7DU4xM9pVtopNF103cgLf3S3adU85+X9cqiQXVgTr3+gA= =wO0A -----END PGP SIGNATURE----- --48TaNjbzBVislYPb--