From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbbJPWVP (ORCPT ); Fri, 16 Oct 2015 18:21:15 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56302 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbbJPWVO (ORCPT ); Fri, 16 Oct 2015 18:21:14 -0400 Date: Fri, 16 Oct 2015 15:21:12 -0700 From: Andrew Morton To: Hugh Dickins Cc: Vladimir Davydov , "Kirill A. Shutemov" , Johannes Weiner , Michal Hocko , Arnd Bergmann , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] memcg: simplify and inline __mem_cgroup_from_kmem Message-Id: <20151016152112.c2faec391b2b16580860a772@linux-foundation.org> In-Reply-To: References: <9be67d8528d316ce90d78980bce9ed76b00ffd22.1443996201.git.vdavydov@virtuozzo.com> <517ab1701f4b53be8bfd6691a1499598efb358e7.1443996201.git.vdavydov@virtuozzo.com> <20151016131726.GA602@node.shutemov.name> <20151016135106.GJ11309@esperanza> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Oct 2015 15:12:23 -0700 (PDT) Hugh Dickins wrote: > > > --- a/include/linux/memcontrol.h > > > +++ b/include/linux/memcontrol.h > > > @@ -26,6 +26,7 @@ > > > #include > > > #include > > > #include > > > +#include > > > #include > > > #include > > > > > 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.