From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Dufour Subject: Re: [PATCH v2] mm: cleaning per architecture MM hook header files Date: Fri, 10 Jul 2015 14:47:18 +0200 Message-ID: <559FBED6.5080902@linux.vnet.ibm.com> References: <55924508.9080101@synopsys.com> <1435745853-27535-1-git-send-email-ldufour@linux.vnet.ibm.com> <20150709160934.888dad2b24ce45957e65b139@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150709160934.888dad2b24ce45957e65b139@linux-foundation.org> Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Vineet Gupta , Geert Uytterhoeven , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oleg Nesterov List-Id: linux-arch.vger.kernel.org On 10/07/2015 01:09, Andrew Morton wrote: > On Wed, 1 Jul 2015 12:17:33 +0200 Laurent Dufour wrote: > >> The commit 2ae416b142b6 ("mm: new mm hook framework") introduced an empty >> header file (mm-arch-hooks.h) for every architecture, even those which >> doesn't need to define mm hooks. >> >> As suggested by Geert Uytterhoeven, this could be cleaned through the use >> of a generic header file included via each per architecture >> asm/include/Kbuild file. >> >> The PowerPC architecture is not impacted here since this architecture has >> to defined the arch_remap MM hook. > > So the way this works is that if an arch wants to override a hook, it > will remove the "generic-y += mm-arch-hooks.h" and add > arch/XXX/include/asm/mm-arch-hooks.h, yes? > > And the new arch/XXX/include/asm/mm-arch-hooks.h only needs to define > the hook(s) which the arch wants to override? Yes that's the way it should work. > So nothing will ever be added to include/asm-generic/mm-arch-hooks.h? This file is the fallback one when no hooks is defined. It is here for the compiler happiness, and should be kept empty. > Seems fair enough. > > Oleg is angling to remove arch_remap(), so there won't be anything left > in these files! But there are plenty of ad-hoc things which *should* > be moved over. I'll try to move some hooks there as soon as I've so free time. > >> Changes in V2: >> -------------- >> - Vineet Gupta reported that the Kbuild files should be kept sorted. > > Yes, we do this to avoid patch collisions. Everyone always adds stuff > to the end of the list (Makefiles, #includes, etc etc), thus carefully > maximizing the number of patch collisions :( This makes sense. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:48306 "EHLO e06smtp17.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753571AbbGJM52 (ORCPT ); Fri, 10 Jul 2015 08:57:28 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Jul 2015 13:47:23 +0100 Message-ID: <559FBED6.5080902@linux.vnet.ibm.com> Date: Fri, 10 Jul 2015 14:47:18 +0200 From: Laurent Dufour MIME-Version: 1.0 Subject: Re: [PATCH v2] mm: cleaning per architecture MM hook header files References: <55924508.9080101@synopsys.com> <1435745853-27535-1-git-send-email-ldufour@linux.vnet.ibm.com> <20150709160934.888dad2b24ce45957e65b139@linux-foundation.org> In-Reply-To: <20150709160934.888dad2b24ce45957e65b139@linux-foundation.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrew Morton Cc: Vineet Gupta , Geert Uytterhoeven , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oleg Nesterov Message-ID: <20150710124718.-rmOyflOzthJb6u4lOTnZ_5v8X6qQb2IFQtuvBhqzVY@z> On 10/07/2015 01:09, Andrew Morton wrote: > On Wed, 1 Jul 2015 12:17:33 +0200 Laurent Dufour wrote: > >> The commit 2ae416b142b6 ("mm: new mm hook framework") introduced an empty >> header file (mm-arch-hooks.h) for every architecture, even those which >> doesn't need to define mm hooks. >> >> As suggested by Geert Uytterhoeven, this could be cleaned through the use >> of a generic header file included via each per architecture >> asm/include/Kbuild file. >> >> The PowerPC architecture is not impacted here since this architecture has >> to defined the arch_remap MM hook. > > So the way this works is that if an arch wants to override a hook, it > will remove the "generic-y += mm-arch-hooks.h" and add > arch/XXX/include/asm/mm-arch-hooks.h, yes? > > And the new arch/XXX/include/asm/mm-arch-hooks.h only needs to define > the hook(s) which the arch wants to override? Yes that's the way it should work. > So nothing will ever be added to include/asm-generic/mm-arch-hooks.h? This file is the fallback one when no hooks is defined. It is here for the compiler happiness, and should be kept empty. > Seems fair enough. > > Oleg is angling to remove arch_remap(), so there won't be anything left > in these files! But there are plenty of ad-hoc things which *should* > be moved over. I'll try to move some hooks there as soon as I've so free time. > >> Changes in V2: >> -------------- >> - Vineet Gupta reported that the Kbuild files should be kept sorted. > > Yes, we do this to avoid patch collisions. Everyone always adds stuff > to the end of the list (Makefiles, #includes, etc etc), thus carefully > maximizing the number of patch collisions :( This makes sense.