[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support
From: |
Benoît Canet |
Subject: |
Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support |
Date: |
Wed, 8 Oct 2014 11:05:53 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Oct 08, 2014 at 02:53:38PM +0800, Fam Zheng wrote:
>
> Does this mean that after this series, all the throttle_states must be
> contained inside its own throttle group? If so, we could embed ThrottleGroup
> fields in ThrottleState.
>
> It's weird when a function called throttle_group_compare takes a parameter of
> ThrottleState pointer, and cast it back to ThrottleGroup with container_of.
It's done like this to fullfill a design goal: the throttle should be reusable
without the groups and any reference to block related stuff.
So it's just a way to split the responsabilities.
Best regards
Benoît
Thanks for reviewing.
>
> Fam
[Qemu-devel] [PATCH v1 8/8] throttle: Update throttle infrastructure copyright, Benoît Canet, 2014/10/07
[Qemu-devel] [PATCH v1 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure, Benoît Canet, 2014/10/07
[Qemu-devel] [PATCH v1 3/8] throttle: Add throttle group infrastructure tests, Benoît Canet, 2014/10/07
[Qemu-devel] [PATCH v1 4/8] throttle: Prepare to have multiple timers for one ThrottleState, Benoît Canet, 2014/10/07