qemu-devel
[Top][All Lists]
Advanced

[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: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support
Date: Thu, 9 Oct 2014 16:58:22 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, 10/08 11:05, Benoît Canet wrote:
> 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.

I see.

Having both ThrottleGroup and ThrottleState interfaces is more complicated than
just use ThrottleGroup, where a one-member group is exactly the same as
ThrottleState.

Fam



reply via email to

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