[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <552E523A.1020905@linux.vnet.ibm.com>
Date: Wed, 15 Apr 2015 13:57:46 +0200
From: Laurent Dufour <ldufour@...ux.vnet.ibm.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Ingo Molnar <mingo@...nel.org>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Pavel Emelyanov <xemul@...allels.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Hugh Dickins <hughd@...gle.com>,
Rik van Riel <riel@...hat.com>, Mel Gorman <mgorman@...e.de>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
linuxppc-dev@...ts.ozlabs.org, cov@...eaurora.org, criu@...nvz.org
Subject: Re: [RESEND PATCH v3 1/2] mm: Introducing arch_remap hook
On 14/04/2015 21:38, Andrew Morton wrote:
> On Tue, 14 Apr 2015 11:26:13 +0200 Laurent Dufour <ldufour@...ux.vnet.ibm.com> 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 <asm/y.h>
>>>
>>> #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 <asm/y.h> and
>> <linux/z.h>.
>>
>> I tried with <linux/mm.h> and <asm/mmu_context.h> but
>> <asm/mmu_context.h> is already including <linux/mm.h>.
>>
>> Do you have any suggestion ?
>>
>> Another option could be to do it like the actual arch_unmap() in
>> <asm-generic/mm_hooks.h> 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
<javascript:void(0);>
--
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