Re: [PATCH 1/2] memcg: dirty pages accounting and limiting infrastructure

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

 



On Mon, Feb 22, 2010 at 02:31:13PM -0500, Vivek Goyal wrote:
> On Mon, Feb 22, 2010 at 09:22:42AM +0900, KAMEZAWA Hiroyuki wrote:
> 
> [..]
> > > +static int mem_cgroup_dirty_bytes_write(struct cgroup *cgrp, struct cftype *cft,
> > > +				       u64 val)
> > > +{
> > > +	struct mem_cgroup *memcg = mem_cgroup_from_cont(cgrp);
> > > +	struct mem_cgroup *parent;
> > > +
> > > +	if (cgrp->parent == NULL)
> > > +		return -EINVAL;
> > > +
> > > +	parent = mem_cgroup_from_cont(cgrp->parent);
> > > +
> > > +	cgroup_lock();
> > > +
> > > +	/* If under hierarchy, only empty-root can set this value */
> > > +	if ((parent->use_hierarchy) ||
> > > +	    (memcg->use_hierarchy && !list_empty(&cgrp->children))) {
> > > +		cgroup_unlock();
> > > +		return -EINVAL;
> > > +	}
> > 
> > Okay, then, only hierarchy root can set the value.
> > Please descirbe this kind of important things in patch description.
> > 
> 
> Hi Andrea,
> 
> Why can only root of the hierarchy set set dirty_bytes value? In this
> case, a child cgroup's amount of dirty pages will be controlled by
> dirty_ratio?

I'm rewriting the patch to correctly handle hierarchy. The hierarchy
design is completely broken in this patch.

-Andrea
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux