From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: linux-mips@linux-mips.org, Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, lokeshgidra@google.com,
sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-riscv@lists.infradead.org, elfring@users.sourceforge.net,
Jonas Bonn <jonas@southpole.se>,
linux-s390@vger.kernel.org, dancol@google.com,
linux-ia64@vge.kvack.org,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-xtensa@linux-xtensa.org,
Richard Weinberger <richard@nod.at>, Helge Deller <deller@gmx.de>,
r.kernel.org@lithops.sigma-star.at, hughd@google.com,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
kasan-dev@googleg
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ‘move_normal_pmd’:
> > mm/mremap.c:229:2: error: implicit declaration of function ‘set_pmd_at’; did you mean ‘set_pte_at’? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do { \
> __flush_tlb_one((vaddr)); \
> } while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd);
> +
> #endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> vma = vma->vm_next;
> }
> }
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd)
> +{
> + *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, kernel-team@android.com,
akpm@linux-foundation.org,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Chris Zankel <chris@zankel.net>,
dancol@google.com, Dave Hansen <dave.hansen@linux.intel.com>,
"David S. Miller" <davem@davemloft.net>,
elfring@users.sourceforge.net, Fenghua Yu <fenghua.yu@intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Guan Xuetao <gxt@pku.edu.cn>, Helge Deller <deller@gmx.de>,
hughd@google.com, Ingo Molnar <mingo@redhat.com>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Jeff Dike <jdike@addtoit.com>, Jonas Bonn <jonas@southpole.se>,
Julia Lawall <Julia.Lawall@lip6.fr>,
kasan-dev@googlegroups.com, kirill@shutemov.name,
kvmarm@lists.cs.columbia.edu, Ley Foon Tan <lftan@altera.com>,
linux-alpha@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-ia64@vge.kvack.org, r.kernel.org@lithops.sigma-star.at,
linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org,
linux-mm@kvack.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org,
linux-xtensa@linux-xtensa.org, lokeshgidra@google.com,
Max Filippov <jcmvbkbc@gmail.com>,
Michal Hocko <mhocko@kernel.org>,
minchan@kernel.org, nios2-dev@lists.rocketboards.org,
pantin@google.com, Peter Zijlstra <peterz@infradead.org>,
Rich Felker <dalias@libc.org>, Sam Creasey <sammy@sammy.net>,
sparclinux@vger.kernel.org, Stafford Horne <shorne@gmail.com>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ‘move_normal_pmd’:
> > mm/mremap.c:229:2: error: implicit declaration of function ‘set_pmd_at’; did you mean ‘set_pte_at’? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do { \
> __flush_tlb_one((vaddr)); \
> } while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd);
> +
> #endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> vma = vma->vm_next;
> }
> }
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd)
> +{
> + *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: linux-mips@linux-mips.org, Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)"
<x86@kernel.org>, Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, lokeshgidra@google.com,
sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-riscv@lists.infradead.org, elfring@users.sourceforge.net,
Jonas Bonn <jonas@southpole.se>,
linux-s390@vger.kernel.org, dancol@google.com,
linux-ia64@vge.kvack.org,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-xtensa@linux-xtensa.org,
Richard Weinberger <richard@nod.at>, Helge Deller <deller@gmx.de>,
r.kernel.org@lithops.sigma-star.at, hughd@google.com,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
kasan-dev@googleg
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
T24gU2F0LCBOb3YgMDMsIDIwMTggYXQgMDk6MjQ6MDVBTSArMDAwMCwgQW50b24gSXZhbm92IHdy
b3RlOgo+IE9uIDAzLzExLzIwMTggMDk6MTUsIFJpY2hhcmQgV2VpbmJlcmdlciB3cm90ZToKPiA+
IEpvZWwsCj4gPiAKPiA+IEFtIFNhbXN0YWcsIDMuIE5vdmVtYmVyIDIwMTgsIDA1OjAwOjM4IENF
VCBzY2hyaWViIEpvZWwgRmVybmFuZGVzOgo+ID4gPiBIaSwKPiA+ID4gSGVyZSBpcyB0aGUgbGF0
ZXN0ICJmYXN0IG1yZW1hcCIgc2VyaWVzLiBUaGlzIGp1c3QgYSByZXBvc3Qgd2l0aCBLaXJpbGwn
cwo+ID4gPiBBY2tlZC1ieXMgYWRkZWQuIEkgd291bGQgbGlrZSB0aGlzIHRvIGJlIGNvbnNpZGVy
ZWQgZm9yIGxpbnV4IC1uZXh0LiAgSSBhbHNvCj4gPiA+IGRyb3BwZWQgdGhlIENPTkZJRyBlbmFi
bGVtZW50IHBhdGNoIGZvciBhcm02NCBzaW5jZSBJIGFtIHlldCB0byB0ZXN0IGl0IHdpdGgKPiA+
ID4gdGhlIG5ldyBUTEIgZmx1c2h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zIQoKIC0gSm9lbAoKX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX18KbGludXgtcmlzY3YgbWFpbGluZyBsaXN0CmxpbnV4
LXJpc2N2QGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFp
bG1hbi9saXN0aW5mby9saW51eC1yaXNjdgo=
WARNING: multiple messages have this Message-ID (diff)
From: joel@joelfernandes.org (Joel Fernandes)
To: linux-riscv@lists.infradead.org
Subject: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ?move_normal_pmd?:
> > mm/mremap.c:229:2: error: implicit declaration of function ?set_pmd_at?; did you mean ?set_pte_at?? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do {??????????????????????????????????????????????? \
> ??????? __flush_tlb_one((vaddr));?????????????? \
> ?} while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +?????????????? pmd_t *pmdp, pmd_t pmd);
> +
> ?#endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> ??????????????? vma = vma->vm_next;
> ??????? }
> ?}
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +?????????????? pmd_t *pmdp, pmd_t pmd)
> +{
> +?????? *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev at lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: linux-mips@linux-mips.org, Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)"
<x86@kernel.org>, Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, lokeshgidra@google.com,
sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-riscv@lists.infradead.org, elfring@users.sourceforge.net,
Jonas Bonn <jonas@southpole.se>,
linux-s390@vger.kernel.org, dancol@google.com,
linux-ia64@vge.kvack.org,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-xtensa@linux-xtensa.org,
Richard Weinberger <richard@nod.at>, Helge Deller <deller@gmx.de>,
r.kernel.org@lithops.sigma-star.at, hughd@google.com,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
kasan-dev@googlegroups.com, kvmarm@lists.cs.columbia.edu,
Ingo Molnar <mingo@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
linux-snps-arc@lists.infradead.org, kernel-team@android.com,
Sam Creasey <sammy@sammy.net>, Fenghua Yu <fenghua.yu@intel.com>,
Jeff Dike <jdike@addtoit.com>,
linux-um@lists.infradead.org,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Julia Lawall <Julia.Lawall@lip6.fr>,
linux-m68k@lists.linux-m68k.org, Borislav Petkov <bp@alien8.de>,
Andy Lutomirski <luto@kernel.org>,
nios2-dev@lists.rocketboards.org, kirill@shutemov.name,
Stafford Horne <shorne@gmail.com>, Guan Xuetao <gxt@pku.edu.cn>,
Chris Zankel <chris@zankel.net>, Tony Luck <tony.luck@intel.com>,
linux-parisc@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>,
pantin@google.com, linux-kernel@vger.kernel.org,
minchan@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
linux-alpha@vger.kernel.org, Ley Foon Tan <lftan@altera.com>,
akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
Message-ID: <20181103152006.fB4HYFJOLqd0GROWdYNNCM1MDCDG24LtGnHtPRl5zGo@z> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ‘move_normal_pmd’:
> > mm/mremap.c:229:2: error: implicit declaration of function ‘set_pmd_at’; did you mean ‘set_pte_at’? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do { \
> __flush_tlb_one((vaddr)); \
> } while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd);
> +
> #endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> vma = vma->vm_next;
> }
> }
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd)
> +{
> + *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: joel@joelfernandes.org (Joel Fernandes)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018@09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ?move_normal_pmd?:
> > mm/mremap.c:229:2: error: implicit declaration of function ?set_pmd_at?; did you mean ?set_pte_at?? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do {??????????????????????????????????????????????? \
> ??????? __flush_tlb_one((vaddr));?????????????? \
> ?} while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +?????????????? pmd_t *pmdp, pmd_t pmd);
> +
> ?#endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> ??????????????? vma = vma->vm_next;
> ??????? }
> ?}
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +?????????????? pmd_t *pmdp, pmd_t pmd)
> +{
> +?????? *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev at lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: linux-mips@linux-mips.org, Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)"
<x86@kernel.org>, Michal Hocko <mhocko@kernel.org>,
linux-mm@kvack.org, lokeshgidra@google.com,
sparclinux@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-riscv@lists.infradead.org, elfring@users.sourceforge.net,
Jonas Bonn <jonas@southpole.se>,
linux-s390@vger.kernel.org, dancol@google.com,
linux-ia64@vge.kvack.org,
Yoshinori Sato <ysato@users.sourceforge.jp>,
linux-xtensa@linux-xtensa.org,
Richard Weinberger <richard@nod.at>, Helge Deller <deller@gmx.de>,
r.kernel.org@lithops.sigma-star.at, hughd@google.com,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
kasan-dev@googlegroups.com, kvmarm@lists.cs.columbia.edu,
Ingo Molnar <mingo@redhat.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
linux-snps-arc@lists.infradead.org, kernel-team@android.com,
Sam Creasey <sammy@sammy.net>, Fenghua Yu <fenghua.yu@intel.com>,
Jeff Dike <jdike@addtoit.com>,
linux-um@lists.infradead.org,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Julia Lawall <Julia.Lawall@lip6.fr>,
linux-m68k@lists.linux-m68k.org, Borislav Petkov <bp@alien8.de>,
Andy Lutomirski <luto@kernel.org>,
nios2-dev@lists.rocketboards.org, kirill@shutemov.name,
Stafford Horne <shorne@gmail.com>, Guan Xuetao <gxt@pku.edu.cn>,
Chris Zankel <chris@zankel.net>, Tony Luck <tony.luck@intel.com>,
linux-parisc@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>,
pantin@google.com, linux-kernel@vger.kernel.org,
minchan@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
linux-alpha@vger.kernel.org, Ley Foon Tan <lftan@altera.com>,
akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function ‘move_normal_pmd’:
> > mm/mremap.c:229:2: error: implicit declaration of function ‘set_pmd_at’; did you mean ‘set_pte_at’? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do { \
> __flush_tlb_one((vaddr)); \
> } while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd);
> +
> #endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> vma = vma->vm_next;
> }
> }
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd)
> +{
> + *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
WARNING: multiple messages have this Message-ID (diff)
From: Joel Fernandes <joel@joelfernandes.org>
To: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
Cc: Richard Weinberger <richard@nod.at>,
linux-kernel@vger.kernel.org, kernel-team@android.com,
akpm@linux-foundation.org,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@alien8.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Chris Zankel <chris@zankel.net>,
dancol@google.com, Dave Hansen <dave.hansen@linux.intel.com>,
"David S. Miller" <davem@davemloft.net>,
elfring@users.sourceforge.net, Fenghua Yu <fenghua.yu@intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Guan Xuetao <gxt@pku.edu.cn>, Helge Deller <deller@gmx.de>,
hughd@google.com, Ingo Molnar <mingo@redhat.com>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Jeff Dike <jdike@addtoit.com>, Jonas Bonn <jonas@southpole.se>,
Julia Lawall <Julia.Lawall@lip6.fr>,
kasan-dev@googlegroups.com, kirill@shutemov.name,
kvmarm@lists.cs.columbia.edu, Ley Foon Tan <lftan@altera.com>,
linux-alpha@vger.kernel.org, linux-hexagon@vger.kernel.org,
linux-ia64@vge.kvack.org, r.kernel.org@lithops.sigma-star.at,
linux-m68k@lists.linux-m68k.org, linux-mips@linux-mips.org,
linux-mm@kvack.org, linux-parisc@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org,
linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org,
linux-xtensa@linux-xtensa.org, lokeshgidra@google.com,
Max Filippov <jcmvbkbc@gmail.com>,
Michal Hocko <mhocko@kernel.org>,
minchan@kernel.org, nios2-dev@lists.rocketboards.org,
pantin@google.com, Peter Zijlstra <peterz@infradead.org>,
Rich Felker <dalias@libc.org>, Sam Creasey <sammy@sammy.net>,
sparclinux@vger.kernel.org, Stafford Horne <shorne@gmail.com>,
Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
Thomas Gleixner <tglx@linutronix.de>,
Tony Luck <tony.luck@intel.com>,
Will Deacon <will.deacon@arm.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Yoshinori Sato <ysato@users.sourceforge.jp>
Subject: Re: [PATCH -next 0/3] Add support for fast mremap
Date: Sat, 3 Nov 2018 08:20:06 -0700 [thread overview]
Message-ID: <20181103152006.GB259637@google.com> (raw)
In-Reply-To: <e1d039a5-9c83-b9b9-98b5-d39bc48f04e0@kot-begemot.co.uk>
On Sat, Nov 03, 2018 at 09:24:05AM +0000, Anton Ivanov wrote:
> On 03/11/2018 09:15, Richard Weinberger wrote:
> > Joel,
> >
> > Am Samstag, 3. November 2018, 05:00:38 CET schrieb Joel Fernandes:
> > > Hi,
> > > Here is the latest "fast mremap" series. This just a repost with Kirill's
> > > Acked-bys added. I would like this to be considered for linux -next. I also
> > > dropped the CONFIG enablement patch for arm64 since I am yet to test it with
> > > the new TLB flushing code that is in very recent kernel releases. (None of my
> > > arm64 devices run mainline right now.) so I will post the arm64 enablement once
> > > I get to that. The performance numbers in the series are for x86.
> > >
> > > List of patches in series:
> > >
> > > (1) mm: select HAVE_MOVE_PMD in x86 for faster mremap
> > >
> > > (2) mm: speed up mremap by 20x on large regions (v4)
> > > v1->v2: Added support for per-arch enablement (Kirill Shutemov)
> > > v2->v3: Updated commit message to state the optimization may also
> > > run for non-thp type of systems (Daniel Col).
> > > v3->v4: Remove useless pmd_lock check (Kirill Shutemov)
> > > Rebased ontop of Linus's master, updated perf results based
> > > on x86 testing. Added Kirill's Acks.
> > >
> > > (3) mm: treewide: remove unused address argument from pte_alloc functions (v2)
> > > v1->v2: fix arch/um/ prototype which was missed in v1 (Anton Ivanov)
> > > update changelog with manual fixups for m68k and microblaze.
> > >
> > > not included - (4) mm: select HAVE_MOVE_PMD in arm64 for faster mremap
> > > This patch is dropped since last posting pending further performance
> > > testing on arm64 with new TLB gather updates. See notes in patch
> > > titled "mm: speed up mremap by 500x on large regions" for more
> > > details.
> > >
> > This breaks UML build:
> > CC mm/mremap.o
> > mm/mremap.c: In function a??move_normal_pmda??:
> > mm/mremap.c:229:2: error: implicit declaration of function a??set_pmd_ata??; did you mean a??set_pte_ata??? [-Werror=implicit-function-declaration]
> > set_pmd_at(mm, new_addr, new_pmd, pmd);
> > ^~~~~~~~~~
> > set_pte_at
> > CC crypto/rng.o
> > CC fs/direct-io.o
> > cc1: some warnings being treated as errors
> >
> > To test yourself, just run on a x86 box:
> > $ make defconfig ARCH=um
> > $ make linux ARCH=um
> >
> > Thanks,
> > //richard
> >
> >
> >
>
> UM somehow managed to miss one of the 3-level functions, I sent a patch at
> some point to add to the mmremap series, but it looks like it did not get
> included in the final version.
>
> You need these two incremental on top of Joel's patch. Richard - feel free
> to relocate the actual implementation of the set_pgd_at elsewhere - I put it
> at the end of tlb.c
>
> diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
> index 7485398d0737..1692da55e63a 100644
> --- a/arch/um/include/asm/pgtable.h
> +++ b/arch/um/include/asm/pgtable.h
> @@ -359,4 +359,7 @@ do {A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A \
> A A A A A A A __flush_tlb_one((vaddr));A A A A A A A A A A A A A A \
> A } while (0)
>
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +A A A A A A A A A A A A A A pmd_t *pmdp, pmd_t pmd);
> +
> A #endif
> diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
> index 763d35bdda01..d17b74184ba0 100644
> --- a/arch/um/kernel/tlb.c
> +++ b/arch/um/kernel/tlb.c
> @@ -647,3 +647,9 @@ void force_flush_all(void)
> A A A A A A A A A A A A A A A vma = vma->vm_next;
> A A A A A A A }
> A }
> +void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> +A A A A A A A A A A A A A A pmd_t *pmdp, pmd_t pmd)
> +{
> +A A A A A A *pmdp = pmd;
> +}
> +
>
I see it now:
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg140005.html
Sorry about that.
Actually the reason the suggestion got missed is it did not belong in the
patch removing the pte_alloc address argument. The pte_alloc parts of the
patch you proposed are infact already included.
This set_pmd_at for UM should go into a separate patch and should not be
rolled into any existing one. Could you send a proper patch adding this
function with a commit message and everything? I can then include it as a
separate patch of my series.
thanks!
- Joel
next prev parent reply other threads:[~2018-11-03 15:20 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-03 4:00 [PATCH -next 0/3] Add support for fast mremap Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` [PATCH -next 1/3] mm: treewide: remove unused address argument from pte_alloc functions (v2) Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 12:51 ` [PATCH -next v2 1/3] mm: treewide: remove unused address argument from pte_alloc functions SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 12:51 ` SF Markus Elfring
2018-11-03 4:00 ` [PATCH -next 2/3] mm: speed up mremap by 20x on large regions (v4) Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:45 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 16:56 ` kbuild test robot
2018-11-03 4:00 ` [PATCH -next 3/3] mm: select HAVE_MOVE_PMD in x86 for faster mremap Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 4:00 ` Joel Fernandes
2018-11-03 9:15 ` [PATCH -next 0/3] Add support for fast mremap Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:15 ` Richard Weinberger
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 9:24 ` Anton Ivanov
2018-11-03 15:20 ` Joel Fernandes [this message]
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 15:20 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-03 18:32 ` Joel Fernandes
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-04 6:56 ` William Kucharski
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
2018-11-06 4:36 ` Joel Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181103152006.GB259637@google.com \
--to=joel@joelfernandes.org \
--cc=anton.ivanov@kot-begemot.co.uk \
--cc=catalin.marinas@arm.com \
--cc=dalias@libc.org \
--cc=dancol@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=elfring@users.sourceforge.net \
--cc=hughd@google.com \
--cc=jejb@parisc-linux.org \
--cc=jonas@southpole.se \
--cc=kasan-dev@googleg \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-ia64@vge.kvack.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=lokeshgidra@google.com \
--cc=mhocko@kernel.org \
--cc=peterz@infradead.org \
--cc=r.kernel.org@lithops.sigma-star.at \
--cc=richard@nod.at \
--cc=sparclinux@vger.kernel.org \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.