Re: [PATCH 02/12] cgroups: New resource counter inheritance API

From: Frederic Weisbecker
Date: Thu Sep 08 2011 - 09:25:44 EST


On Tue, Sep 06, 2011 at 03:17:47PM -0700, Andrew Morton wrote:
> On Tue, 6 Sep 2011 02:12:56 +0200
> Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:
>
> > +void res_counter_inherit(struct res_counter *counter, int member)
> > +{
> > + struct res_counter *parent;
> > + unsigned long long val;
> > +
> > + parent = counter->parent;
> > + if (parent) {
> > + val = res_counter_read_u64(parent, member);
> > + res_counter_write_u64(counter, member, val);
> > + }
> > +}
>
> What locking protects the read-modify-write? If none, please fix,
> otherwise please document it.
>
> All of kernel/res_counter.c is charmingly undocumented.

How should I address your reviews now that you've applied these
patches? Would you prefer me to send new patches on top of -mm?

Also Tejun has patches that conflict with mine. But I believe
-mm is on top of -next, so perhaps I should rebase those patches
when his branch reach -next? Or something else?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/