Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755937AbbDOL6H (ORCPT ); Wed, 15 Apr 2015 07:58:07 -0400 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:38937 "EHLO e06smtp12.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752896AbbDOL56 (ORCPT ); Wed, 15 Apr 2015 07:57:58 -0400 Message-ID: <552E523A.1020905@linux.vnet.ibm.com> Date: Wed, 15 Apr 2015 13:57:46 +0200 From: Laurent Dufour User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andrew Morton CC: Ingo Molnar , "Kirill A. Shutemov" , Pavel Emelyanov , "Kirill A. Shutemov" , Hugh Dickins , Rik van Riel , Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, cov@codeaurora.org, criu@openvz.org Subject: Re: [RESEND PATCH v3 1/2] mm: Introducing arch_remap hook References: <9d827fc618a718830b2c47aa87e8be546914c897.1428916945.git.ldufour@linux.vnet.ibm.com> <20150413115811.GA12354@node.dhcp.inet.fi> <552BB972.3010704@linux.vnet.ibm.com> <20150413131357.GC12354@node.dhcp.inet.fi> <552BC2CA.80309@linux.vnet.ibm.com> <552BC619.9080603@parallels.com> <20150413140219.GA14480@node.dhcp.inet.fi> <20150413135951.b3d9f431892dbfa7156cc1b0@linux-foundation.org> <552CDD35.2030901@linux.vnet.ibm.com> <20150414123853.a3e61b7fa95b6c634e0fcce0@linux-foundation.org> In-Reply-To: <20150414123853.a3e61b7fa95b6c634e0fcce0@linux-foundation.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15041511-0009-0000-0000-000003D26F28 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2340 Lines: 82 On 14/04/2015 21:38, Andrew Morton wrote: > On Tue, 14 Apr 2015 11:26:13 +0200 Laurent Dufour wrote: > >>> Do away with __HAVE_ARCH_REMAP and do it like this: >>> >>> arch/x/include/asm/y.h: >>> >>> extern void arch_remap(...); >>> #define arch_remap arch_remap >>> >>> include/linux/z.h: >>> >>> #include >>> >>> #ifndef arch_remap >>> static inline void arch_remap(...) { } >>> #define arch_remap arch_remap >>> #endif >> >> Hi Andrew, >> >> I like your idea, but I can't find any good candidate for and >> . >> >> I tried with and but >> is already including . >> >> Do you have any suggestion ? >> >> Another option could be to do it like the actual arch_unmap() in >> but this is the opposite of your idea, and Ingo >> was not comfortable with this idea due to the impact of the other >> architectures. > > I don't see any appropriate header files for this. mman.h is kinda > close. > > So we create new header files, that's not a problem. I'm torn between > > a) include/linux/mm-arch-hooks.h (and 31 > arch/X/include/asm/mm-arch-hooks.h). Mandate: mm stuff which can be > overridded by arch > > versus > > b) include/linux/mremap.h (+31), with a narrower mandate. > > > This comes up fairly regularly so I suspect a) is better. We'll add > things to it over time, and various bits of existing ad-hackery can be > moved over as cleanups. Thanks for the advice, I'll do a), starting with the arch_remap macro, adding the 30 "empty" arch/x/include/asm/mm-arch-hooks.h files, and implementing arch_remap for powerpc. Then, if the first patch is accepted, I may move the arch_*() stuff defined in include/asm-generic/mm_hooks.h into include/linux/mm-arch-hooks.h and filled some arch/X/include/asm/mm-arch-hooks.h. The file include/asm-generic/mm_hooks.h will then become empty, and been removed. Cheers, Laurent. * Anglais - d?tect? * Fran?ais * Anglais * Fran?ais * Anglais -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/