qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH RFC v3 2/8] block: Add aio_context field in Thro


From: Manos Pitsidianakis
Subject: Re: [Qemu-block] [PATCH RFC v3 2/8] block: Add aio_context field in ThrottleGroupMember
Date: Wed, 28 Jun 2017 15:15:30 +0300
User-agent: NeoMutt/20170609-57-1e93be (1.8.3)

On Wed, Jun 28, 2017 at 01:27:36PM +0200, Kevin Wolf wrote:
Am 23.06.2017 um 14:46 hat Manos Pitsidianakis geschrieben:
timer_cb() needs to know about the current Aio context of the throttle
request that is woken up. In order to make ThrottleGroupMember backend
agnostic, this information is stored in an aio_context field instead of
accessing it from BlockBackend.

Signed-off-by: Manos Pitsidianakis <address@hidden>

You're copying the AioContext when the BlockBackend is registered for
the throttle group, but what keeps both sides in sync when the context
is changed later on? Don't we need to update the ThrottleGroupMember in
blk_set_aio_context?

blk_set_aio_context calls throttle_timers_attach_aio_context which updates this. Though as Alberto said util/throttle.c should not know about ThrottleGroupMember. This is not needed in the later patches because the ThrottleGroupMember's aio_context gets updated as a node in the driver's bdrv_attach_aio_context

We can add a new function in block/throttle.c that updates a member's aio context but I'm not sure if it's really needed if members are only used in throttle nodes.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]