[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120625162158.cde295bf.akpm@linux-foundation.org>
Date: Mon, 25 Jun 2012 16:21:58 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Glauber Costa <glommer@...allels.com>
Cc: Tejun Heo <tj@...nel.org>, <cgroups@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
"Frederic Weisbecker" <fweisbec@...il.com>,
David Rientjes <rientjes@...gle.com>,
"Pekka Enberg" <penberg@...nel.org>, Michal Hocko <mhocko@...e.cz>,
Johannes Weiner <hannes@...xchg.org>,
Christoph Lameter <cl@...ux.com>, <devel@...nvz.org>,
<kamezawa.hiroyu@...fujitsu.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Suleiman Souhlal <suleiman@...gle.com>
Subject: Re: [PATCH 09/11] memcg: propagate kmem limiting information to
children
On Tue, 26 Jun 2012 02:36:27 +0400
Glauber Costa <glommer@...allels.com> wrote:
> On 06/25/2012 10:29 PM, Tejun Heo wrote:
> > Feeling like a nit pervert but..
> >
> > On Mon, Jun 25, 2012 at 06:15:26PM +0400, Glauber Costa wrote:
> >> @@ -287,7 +287,11 @@ struct mem_cgroup {
> >> * Should the accounting and control be hierarchical, per subtree?
> >> */
> >> bool use_hierarchy;
> >> - bool kmem_accounted;
> >> + /*
> >> + * bit0: accounted by this cgroup
> >> + * bit1: accounted by a parent.
> >> + */
> >> + volatile unsigned long kmem_accounted;
> >
> > Is the volatile declaration really necessary? Why is it necessary?
> > Why no comment explaining it?
>
> Seems to be required by set_bit and friends. gcc will complain if it is
> not volatile (take a look at the bit function headers)
That would be a broken gcc. We run test_bit()/set_bit() and friends
against plain old `unsigned long' in thousands of places. There's
nothing special about this one!
--
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