[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140723125818.GT10819@suse.de>
Date: Wed, 23 Jul 2014 13:58:18 +0100
From: Mel Gorman <mgorman@...e.de>
To: Johannes Weiner <hannes@...xchg.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.cz>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH 1/2] mm: Avoid full RCU lookup of memcg for statistics
updates
On Wed, Jul 23, 2014 at 07:44:49AM -0400, Johannes Weiner wrote:
> On Wed, Jul 23, 2014 at 12:24:15PM +0100, Mel Gorman wrote:
> > When updating memcg VM statistics like PGFAULT we take the rcu read
> > lock and lookup the memcg. For statistic updates this is overkill
> > when the process may not belong to a memcg. This patch adds a light
> > check to check if a memcg potentially exists. It's race-prone in that
> > some VM stats may be missed when a process first joins a memcg but
> > that is not serious enough to justify a constant performance penalty.
>
> Tasks always belong to a memcg, the root group per default. There
> isn't really any accounting that could be omitted.
>
Crap, ok, I had not taken that into account. The lookup of that cannot
really be avoided. It's a pity because the stats on the root memcg are
not likely to be that interesting. Thanks for reviewing.
--
Mel Gorman
SUSE Labs
--
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