[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20151016152112.c2faec391b2b16580860a772@linux-foundation.org>
Date: Fri, 16 Oct 2015 15:21:12 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: Vladimir Davydov <vdavydov@...tuozzo.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Arnd Bergmann <arnd@...db.de>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem
On Fri, 16 Oct 2015 15:12:23 -0700 (PDT) Hugh Dickins <hughd@...gle.com> wrote:
> > > --- a/include/linux/memcontrol.h
> > > +++ b/include/linux/memcontrol.h
> > > @@ -26,6 +26,7 @@
> > > #include <linux/page_counter.h>
> > > #include <linux/vmpressure.h>
> > > #include <linux/eventfd.h>
> > > +#include <linux/mm.h>
> > > #include <linux/mmzone.h>
> > > #include <linux/writeback.h>
> > >
>
> Are you expecting to use mem_cgroup_from_kmem() from other places
> in future? Seems possible; but at present it's called from only
> one place, and (given how memcontrol.h has somehow managed to avoid
> including mm.h all these years), I thought it would be nice to avoid
> it for just this;
Yes, I was wondering about that. I figured that anything which
includes memcontrol.h is already including mm.h and gcc is pretty
efficient with handling the #ifdef FOO_H_INCLUDED guards.
> and fixed my build with the patch below last night.
> Whatever you all think best: just wanted to point out an alternative.
Yes, that's neater - let's go that way.
--
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