lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 Jan 2012 14:03:06 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	axboe@...nel.dk, ctalbott@...gle.com, rni@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/12] blkcg: kill blkio_policy_node

Hello,

On Thu, Jan 19, 2012 at 03:32:25PM -0500, Vivek Goyal wrote:
> On Wed, Jan 18, 2012 at 05:11:29PM -0800, Tejun Heo wrote:
> 
> [..]
> > @@ -1413,14 +1110,10 @@ static int blkio_weight_write(struct blkio_cgroup *blkcg, u64 val)
> >  	spin_lock_irq(&blkcg->lock);
> >  	blkcg->weight = (unsigned int)val;
> >  
> > -	hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node) {
> > -		pn = blkio_policy_search_node(blkcg, blkg->dev,
> > -				BLKIO_POLICY_PROP, BLKIO_PROP_weight_device);
> > -		if (pn)
> > -			continue;
> > +	hlist_for_each_entry(blkg, n, &blkcg->blkg_list, blkcg_node)
> > +		if (blkg->plid == plid && !blkg->conf.weight)
> > +			blkio_update_group_weight(blkg, blkcg->weight);
> 
> Tejun,
> 
> Why do we check for blkg->conf.weight=0 here. Even if a group already has
> weight and if user has changed the cgroup weight later, that update should
> be propogated to all the groups on all the queues.

Maybe I misread the code but if explicit per-device config exists,
cgroup-wide writes are ignored, no?  The original code searches for
matching pn and if it exists, continues without updating.

> Where do we assign default cgroup weight to a blkg upon creation? May be at
> group create time, we just need to copy blkcg->weight to blkg.conf.weight.

We don't.  blk->conf.weight is set only on explicit per-device
configuration.  It's gonna be removed eventually after config
definition and handling are moved into policies.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ