Re: [PATCH v3 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2020-03-30 Thread Mike Rapoport
id() for NUMA. > > I am not opposed to this at all. It reduces the config space and that is > a good thing on its own. The history has shown that meory layout might > be really wild wrt NUMA. The config is only used for early_pfn_in_nid > which is clearly an overkill. > > Your desc

Re: [PATCH v3 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2020-03-30 Thread Mike Rapoport
On Mon, Mar 30, 2020 at 11:58:43AM +0200, Michal Hocko wrote: > On Mon 30-03-20 12:21:27, Mike Rapoport wrote: > > On Mon, Mar 30, 2020 at 09:42:46AM +0200, Michal Hocko wrote: > > > On Sat 28-03-20 11:31:17, Hoan Tran wrote: > > > > In NUMA layout which nodes have

Re: [PATCH v3 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2020-03-30 Thread Mike Rapoport
id() for NUMA. > > I am not opposed to this at all. It reduces the config space and that is > a good thing on its own. The history has shown that meory layout might > be really wild wrt NUMA. The config is only used for early_pfn_in_nid > which is clearly an overkill. > > Your desc

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-26 Thread Mike Kravetz
On 3/18/20 4:36 PM, Dave Hansen wrote: > On 3/18/20 3:52 PM, Mike Kravetz wrote: >> Sounds good. I'll incorporate those changes into a v2, unless someone >> else with has a different opinion. >> >> BTW, this patch should not really change the way the code works today.

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-24 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/3/19 6:52, Mike Kravetz wrote: > On 3/18/20 3:15 PM, Dave Hansen wrote: >> Hi Mike, >> >> The series looks like a great idea to me. One nit on the x86 bits, >> though... >> >>> diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbp

Re: [PATCH 4/4] hugetlbfs: clean up command line processing

2020-03-24 Thread Mike Kravetz
On 3/23/20 8:47 PM, Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > On 2020/3/24 8:43, Mina Almasry wrote: >> On Wed, Mar 18, 2020 at 3:07 PM Mike Kravetz wrote: >>> +default_hugepagesz - Specify the default huge page size. This parameter

Re: [PATCH 4/4] hugetlbfs: clean up command line processing

2020-03-23 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
On 2020/3/24 8:43, Mina Almasry wrote: > On Wed, Mar 18, 2020 at 3:07 PM Mike Kravetz wrote: >> >> With all hugetlb page processing done in a single file clean up code. > > Now that all hugepage page processing is done in a single file, clean > up the code. > &

Re: [PATCH 3/4] hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate

2020-03-23 Thread Mike Kravetz
On 3/23/20 5:01 PM, Mina Almasry wrote: > On Wed, Mar 18, 2020 at 3:07 PM Mike Kravetz wrote: >> >> The routine hugetlb_add_hstate prints a warning if the hstate already >> exists. This was originally done as part of kernel command line >> parsing. If 'hugepagesz=' w

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-19 Thread Mike Kravetz
On 3/19/20 12:00 AM, Christophe Leroy wrote: > > Le 18/03/2020 à 23:06, Mike Kravetz a écrit : >> The architecture independent routine hugetlb_default_setup sets up >> the default huge pages size. It has no way to verify if the passed >> value is valid, so it accepts it

Re: [PATCH 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code

2020-03-19 Thread Mike Kravetz
On 3/19/20 12:04 AM, Christophe Leroy wrote: > > > Le 18/03/2020 à 23:06, Mike Kravetz a écrit : >> Now that architectures provide arch_hugetlb_valid_size(), parsing >> of "hugepagesz=" can be done in architecture independent code. >> Create a single

Re: [PATCH 4/4] hugetlbfs: clean up command line processing

2020-03-18 Thread Mike Kravetz
On 3/18/20 5:20 PM, Randy Dunlap wrote: > Hi Mike, > > On 3/18/20 3:06 PM, Mike Kravetz wrote: >> With all hugetlb page processing done in a single file clean up code. >> - Make code match desired semantics >> - Update documentation with semantics >> - Make

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-18 Thread Mike Kravetz
On 3/18/20 3:15 PM, Dave Hansen wrote: > Hi Mike, > > The series looks like a great idea to me. One nit on the x86 bits, > though... > >> diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c >> index 5bfd5aef5378..51e6208fdeec 100644 >> --- a/a

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-18 Thread Mike Kravetz
On 3/18/20 3:09 PM, Will Deacon wrote: > On Wed, Mar 18, 2020 at 03:06:31PM -0700, Mike Kravetz wrote: >> The architecture independent routine hugetlb_default_setup sets up >> the default huge pages size. It has no way to verify if the passed >> value is valid, so it ac

[PATCH 4/4] hugetlbfs: clean up command line processing

2020-03-18 Thread Mike Kravetz
some of the subtle interactions - Describe semantics of command line arguments Signed-off-by: Mike Kravetz --- Documentation/admin-guide/mm/hugetlbpage.rst | 26 +++ mm/hugetlb.c | 78 +++- 2 files changed, 87 insertions(+), 17 deletions

[PATCH 0/4] Clean up hugetlb boot command line processing

2020-03-18 Thread Mike Kravetz
Longpeng(Mike) reported a weird message from hugetlb command line processing and proposed a solution [1]. While the proposed patch does address the specific issue, there are other related issues in command line processing. As hugetlbfs evolved, updates to command line processing have been made

[PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-18 Thread Mike Kravetz
of the "hugepagesz=" in arch specific code to a common routine in arch independent code. Signed-off-by: Mike Kravetz --- arch/arm64/include/asm/hugetlb.h | 2 ++ arch/arm64/mm/hugetlbpage.c| 19 ++- arch/powerpc/include/asm/hugetlb.h | 3 +++ arch/powerpc/mm/hugetlbpage.c

[PATCH 2/4] hugetlbfs: move hugepagesz= parsing to arch independent code

2020-03-18 Thread Mike Kravetz
ed by some architectures to set up ALL huge pages sizes. Signed-off-by: Mike Kravetz --- arch/arm64/mm/hugetlbpage.c | 15 --- arch/powerpc/mm/hugetlbpage.c | 15 --- arch/riscv/mm/hugetlbpage.c | 16 arch/s390/mm/hugetlbpage.c| 18 --

[PATCH 3/4] hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate

2020-03-18 Thread Mike Kravetz
processing "hugepagesz=". After this, calls to size_to_hstate() in arch specific code can be removed and hugetlb_add_hstate can be called without worrying about warning messages. Signed-off-by: Mike Kravetz --- arch/arm64/mm/hugetlbpage.c | 16 arch/powerpc/mm/hugetlbpage.c |

Re: [PATCH] mm/hugetlb: Fix build failure with HUGETLB_PAGE but not HUGEBTLBFS

2020-03-17 Thread Mike Kravetz
etlbfs: per mount huge page sizes") > Cc: sta...@vger.kernel.org > Signed-off-by: Christophe Leroy As hugetlb.h evolved over time, I suspect nobody imagined a configuration with CONFIG_HUGETLB_PAGE and not CONFIG_HUGETLBFS. This patch does address the build issues. So, Review

Re: [PATCH] mm/hugetlb: Fix build failure with HUGETLB_PAGE but not HUGEBTLBFS

2020-03-17 Thread Mike Kravetz
On 3/17/20 9:47 AM, Christophe Leroy wrote: > > > Le 17/03/2020 à 17:40, Mike Kravetz a écrit : >> On 3/17/20 1:43 AM, Christophe Leroy wrote: >>> >>> >>> Le 17/03/2020 à 09:25, Baoquan He a écrit : >>>> On 03/17/20 at 08:04am, Christo

Re: [PATCH] mm/hugetlb: Fix build failure with HUGETLB_PAGE but not HUGEBTLBFS

2020-03-17 Thread Mike Kravetz
use cases which never use the filesystem interface. However, hugetlb support is so intertwined with hugetlbfs, I am thinking there would be issues trying to use them separately. I will look into this further. -- Mike Kravetz

Re: [PATCH v3 07/14] powerpc/32: drop get_pteptr()

2020-03-08 Thread Mike Rapoport
On Fri, Mar 06, 2020 at 08:00:16PM -0800, Andrew Morton wrote: > On Thu, 27 Feb 2020 10:46:01 +0200 Mike Rapoport wrote: > > > Commit 8d30c14cab30 ("powerpc/mm: Rework I$/D$ coherency (v3)") and > > commit 90ac19a8b21b ("[POWERPC] Abolish iopa(), mm_ptov(),

[PATCH v3 14/14] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58

[PATCH v3 13/14] asm-generic: remove pgtable-nop4d-hack.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h

[PATCH v3 12/14] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike

[PATCH v3 11/14] sh: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh

[PATCH v3 10/14] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh

[PATCH v3 09/14] sh: fault: Modernize printing of kernel messages

2020-02-27 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fa

[PATCH v3 08/14] powerpc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH v3 07/14] powerpc/32: drop get_pteptr()

2020-02-27 Thread Mike Rapoport
y user of get_pteptr() is __change_page_attr() which operates on kernel context and on lowmem pages only. Move page table traversal to __change_page_attr() and drop get_pteptr(). Signed-off-by: Christophe Leroy Signed-off-by: Mike Rapoport --- arch/powerpc/

[PATCH v3 06/14] openrisc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10

[PATCH v3 05/14] nios2: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch

[PATCH v3 04/14] ia64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64

[PATCH v3 03/14] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport

[PATCH v3 02/14] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport

[PATCH v3 01/14] arm/arm64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH v3 00/14] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Wed, Feb 26, 2020 at 10:46:13AM +0100, Christophe Leroy wrote: > > > Le 26/02/2020 à 10:13, Mike Rapoport a écrit : > > On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > > > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > >

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > > From: Mike Rapoport > > > > > > Implement pri

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-19 Thread Mike Rapoport
On Wed, Feb 19, 2020 at 01:07:55PM +0100, Christophe Leroy wrote: > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > diff --git a/arch/powerpc/mm/ptdump/ptdump.c > > b/arch/powerpc/mm/ptdump/ptdump.c > > index 206156255247..7bd4b81d5b5d 100644 > > --- a/a

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-18 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate and re

Re: [PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
On Sun, Feb 16, 2020 at 08:22:30AM +, Russell King - ARM Linux admin wrote: > On Sun, Feb 16, 2020 at 10:18:30AM +0200, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Hi, > > > > These patches convert several architectures to use

[PATCH v2 13/13] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58

[PATCH v2 12/13] asm-generic: remove pgtable-nop4d-hack.h

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h

[PATCH v2 11/13] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike

[PATCH v2 10/13] sh: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh

[PATCH v2 09/13] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh

[PATCH v2 08/13] sh: fault: Modernize printing of kernel messages

2020-02-16 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fa

[PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h

[PATCH v2 06/13] openrisc: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10

[PATCH v2 05/13] nios2: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch

[PATCH v2 04/13] ia64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64

[PATCH v2 03/13] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport

[PATCH v2 02/13] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport

[PATCH v2 01/13] arm/arm64: add support for folded p4d page tables

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants

[PATCH v2 00/13] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-16 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h. The changes are mostly about mechanical replacement of pgd accessors with p4d ones and the addition of higher levels

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-29 Thread Mike Rapoport
could start a Documentation/ patch that describes at least some of the pXd_whaterver()? Or that would be too much to ask? ;-) > so we just checked them for sanity like normal entries, which > apparently worked fine so far, but for how long? -- Sincerely yours, Mike.

Re: [PATCH V12] mm/debug: Add tests validating architecture page table helpers

2020-01-28 Thread Mike Rapoport
merging > this > thing, so it have more changes to catch regressions for developers who might > run this. Aren't x86 and arm64 not decent enough? Even if this test could be used to detect regressions only on these two platforms, the test is valuable. -- Sincerely yours, Mike.

Re: [PATCH] powerpc: add support for folded p4d page tables

2020-01-05 Thread Mike Rapoport
On Mon, Jan 06, 2020 at 02:31:41PM +1100, Michael Ellerman wrote: > Mike Rapoport writes: > > Any updates on this? > > It's very ... big, and kind of intrusive. I've tried to split it to several smaller ones, but I couldn't find a way to do it without breakin

Re: [PATCH] powerpc: add support for folded p4d page tables

2020-01-04 Thread Mike Rapoport
On Thu, Jan 02, 2020 at 05:42:31PM +0100, Christophe Leroy wrote: > Mike Rapoport a écrit : > > >Any updates on this? > > Checkpatch reported several points, see > https://patchwork.ozlabs.org/patch/1206344/ Well, for the most part checkpatch is unhappy because I've trie

Re: [PATCH] powerpc: add support for folded p4d page tables

2020-01-02 Thread Mike Rapoport
Any updates on this? On Mon, Dec 09, 2019 at 05:09:08PM +0200, Mike Rapoport wrote: > From: Mike Rapoport > > Implement primitives necessary for the 4th level folding, add walks of p4d > level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. > > Signed-off

[PATCH] powerpc: add support for folded p4d page tables

2019-12-09 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport --- arch/powerpc/include/asm/book3s/32/pgtable.h | 1 - arch/powerpc/include/asm/book3s/64

Re: [PATCH] powerpc: ensure that swiotlb buffer is allocated from low memory

2019-12-08 Thread Mike Rapoport
On Mon, Dec 09, 2019 at 04:43:17PM +1100, Michael Ellerman wrote: > Mike Rapoport writes: > > From: Mike Rapoport > > > > Some powerpc platforms (e.g. 85xx) limit DMA-able memory way below 4G. If a > > system has more physical memory than this limit, the swiotlb bu

[PATCH] powerpc: ensure that swiotlb buffer is allocated from low memory

2019-12-04 Thread Mike Rapoport
From: Mike Rapoport Some powerpc platforms (e.g. 85xx) limit DMA-able memory way below 4G. If a system has more physical memory than this limit, the swiotlb buffer is not addressable because it is allocated from memblock using top-down mode. Force memblock to bottom-up mode before calling

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-26 Thread Mike Rapoport
lb_init(0); #endif high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); set_max_mapnr(max_pfn); memblock_free_all(); -- Sincerely yours, Mike.

Re: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

2019-11-25 Thread Mike Rapoport
tlb buffer isn't > actually addressable based on the bus dma mask limit, which is rather > interesting. swiotlb_init uses memblock_alloc_low to allocate the > buffer, and I'll need some help from Mike and the powerpc maintainers > to figure out how that select where to allocate

[PATCH] powerpc/32: drop unused ISA_DMA_THRESHOLD

2019-11-25 Thread Mike Rapoport
From: Mike Rapoport The ISA_DMA_THRESHOLD variable is set by several platforms but never referenced. Remove it. Signed-off-by: Mike Rapoport --- arch/powerpc/include/asm/dma.h | 3 +-- arch/powerpc/kernel/setup_32.c | 1 - arch/powerpc/platforms/44x/warp.c | 3

Re: [PATCH v3 09/23] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-11 Thread Mike Rapoport
FOLL_PIN > > * For pages that are received via FOLL_PIN, those pages must be returned > via put_user_page(). > > Thanks to Jan Kara and Vlastimil Babka for explaining the 4 cases > in this documentation. (I've reworded it and expanded upon it.) > > Reviewed-by:

Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-07 Thread Mike Rapoport
On Tue, Nov 05, 2019 at 11:00:06AM -0800, John Hubbard wrote: > On 11/5/19 5:10 AM, Mike Rapoport wrote: > ... > >> --- > >> Documentation/vm/index.rst | 1 + > >> Documentation/vm/pin_user_pages.rst | 212 ++ > > > >

Re: [PATCH v2 05/18] mm/gup: introduce pin_user_pages*() and FOLL_PIN

2019-11-05 Thread Mike Rapoport
t; +locked, gup_flags); > +} > +EXPORT_SYMBOL(pin_longterm_pages_remote); > + > +/** > + * pin_user_pages() - pin user pages in memory for use by other devices > + * > + * Nearly the same as get_user_pages(), except that FOLL_TOUCH is not set, > and > + * FOLL_PIN is set. > + * > + * FOLL_PIN means that the pages must be released via put_user_page(). Please > + * see Documentation/vm/pin_user_pages.rst for details. > + * > + * This is intended for Case 1 (DIO) in Documentation/vm/pin_user_pages.rst. > It > + * is NOT intended for Case 2 (RDMA: long-term pins). > + */ > +long pin_user_pages(unsigned long start, unsigned long nr_pages, > + unsigned int gup_flags, struct page **pages, > + struct vm_area_struct **vmas) > +{ > + /* FOLL_GET and FOLL_PIN are mutually exclusive. */ > + if (WARN_ON_ONCE(gup_flags & FOLL_GET)) > + return -EINVAL; > + > + gup_flags |= FOLL_PIN; > + return __gup_longterm_locked(current, current->mm, start, nr_pages, > + pages, vmas, gup_flags); > +} > +EXPORT_SYMBOL(pin_user_pages); > + > +/** > + * pin_longterm_pages() - pin user pages in memory for long-term use (RDMA, > + * typically) > + * > + * Nearly the same as get_user_pages(), except that FOLL_PIN and > FOLL_LONGTERM > + * are set. See get_user_pages_fast() for documentation on the function > + * arguments, because the arguments here are identical. > + * > + * FOLL_PIN means that the pages must be released via put_user_page(). Please > + * see Documentation/vm/pin_user_pages.rst for further details. > + * > + * FOLL_LONGTERM means that the pages are being pinned for "long term" use, > + * typically by a non-CPU device, and we cannot be sure that waiting for a > + * pinned page to become unpin will be effective. > + * > + * This is intended for Case 2 (RDMA: long-term pins) in > + * Documentation/vm/pin_user_pages.rst. > + */ > +long pin_longterm_pages(unsigned long start, unsigned long nr_pages, > + unsigned int gup_flags, struct page **pages, > + struct vm_area_struct **vmas) > +{ > + /* FOLL_GET and FOLL_PIN are mutually exclusive. */ > + if (WARN_ON_ONCE(gup_flags & FOLL_GET)) > + return -EINVAL; > + > + gup_flags |= FOLL_PIN | FOLL_LONGTERM; > + return __gup_longterm_locked(current, current->mm, start, nr_pages, > + pages, vmas, gup_flags); > +} > +EXPORT_SYMBOL(pin_longterm_pages); > -- > 2.23.0 > > -- Sincerely yours, Mike.

Re: [PATCH v2 00/21] Refine memblock API

2019-10-02 Thread Mike Rapoport
=128M set in my bootargs. Historically this > > has been sufficient, but cma=256M has not made a difference. > > > > Mike any suggestions on how to move forward? > I was hoping to get the fixes tested and pushed before 5.4 is released > if at all possible I have a fix (below) t

Re: [PATCH v2 00/21] Refine memblock API

2019-09-28 Thread Mike Rapoport
On Thu, Sep 26, 2019 at 02:35:53PM -0500, Adam Ford wrote: > On Thu, Sep 26, 2019 at 11:04 AM Mike Rapoport wrote: > > > > Hi, > > > > On Thu, Sep 26, 2019 at 08:09:52AM -0500, Adam Ford wrote: > > > On Wed, Sep 25, 2019 at 10:17 AM Fabio Estevam wrote: >

Re: [PATCH v2 00/21] Refine memblock API

2019-09-26 Thread Mike Rapoport
e reserved memory, but I guess I am not > sure what the amount should be. I know for the video decoding 1080p, > I have historically used cma=128M, but with the 3D also needing some > memory allocation, is that enough or should I use 256M? > > adam -- Sincerely yours, Mike.

Re: [PATCH V3 0/2] mm/debug: Add tests for architecture exported page table helpers

2019-09-24 Thread Mike Rapoport
Hm. Grep shows __pgd() definitions for both of them. Is it for specific > config? For ARM32 it's defined only for 3-lelel page tables, i.e with LPAE on. For IA64 it's defined for !STRICT_MM_TYPECHECKS which is even not a config option, but a define in arch/ia64/include/asm/page.h > -- > Kirill A. Shutemov -- Sincerely yours, Mike.

Re: [PATCH v3 7/8] mips: numa: make node_to_cpumask_map() NUMA_NO_NODE aware for mips

2019-09-15 Thread Mike Rapoport
On Sun, Sep 15, 2019 at 02:13:51PM +0800, Yunsheng Lin wrote: > On 2019/9/15 13:49, Mike Rapoport wrote: > > Hi, > > > > On Thu, Sep 12, 2019 at 06:15:33PM +0800, Yunsheng Lin wrote: > >> When passing the return value of dev_to_node() to cpumask_of_node() >

Re: [PATCH v3 7/8] mips: numa: make node_to_cpumask_map() NUMA_NO_NODE aware for mips

2019-09-14 Thread Mike Rapoport
\ >_data(node)->h_cpus) > struct pci_bus; > extern int pcibus_to_node(struct pci_bus *); > -- > 2.8.1 > -- Sincerely yours, Mike.

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-09-02 Thread Mike Rapoport
On Mon, Sep 02, 2019 at 03:51:25PM +0200, Michal Simek wrote: > On 31. 07. 19 19:15, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 04:41:14PM +0200, Michal Hocko wrote: > >> On Wed 31-07-19 17:21:29, Mike Rapoport wrote: > >>> On Wed, Jul 31, 2019 at 03:00:

Re: [PATCH 4/6] powerpc: Chunk calls to flush_dcache_range in arch_*_memory

2019-08-15 Thread Mike Rapoport
rt + size, start + i + > FLUSH_CHUNK_SIZE)); > + cond_resched(); > + } > + > ret = remove_section_mapping(start, start + size); > WARN_ON_ONCE(ret); > > -- > 2.21.0 > -- Sincerely yours, Mike.

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-07-31 Thread Mike Rapoport
On Wed, Jul 31, 2019 at 04:41:14PM +0200, Michal Hocko wrote: > On Wed 31-07-19 17:21:29, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: > > > > > > I am sorry, but I still do not follow. Who is consuming that node id > > &g

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-07-31 Thread Mike Rapoport
On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: > On Wed 31-07-19 15:26:32, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote: > > > On Wed 31-07-19 14:14:22, Mike Rapoport wrote: > > > > On Wed, Jul 31, 2019 at 10:03:

Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-31 Thread Mike Rapoport
On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote: > On Wed 31-07-19 14:14:22, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote: > > > On Wed 31-07-19 09:24:21, Mike Rapoport wrote: > > > > [ sorry for a late reply too

Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-31 Thread Mike Rapoport
On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote: > On Wed 31-07-19 09:24:21, Mike Rapoport wrote: > > [ sorry for a late reply too, somehow I missed this thread before ] > > > > On Tue, Jul 30, 2019 at 10:14:15AM +0200, Michal Hocko wrote: > >

Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA

2019-07-31 Thread Mike Rapoport
not enable this config. alpha's NUMA support is BROKEN for more than a decade now, I doubt it'll ever get fixed. > Care to have a look and clean this up please? > > -- > Michal Hocko > SUSE Labs > -- Sincerely yours, Mike.

Re: [PATCH v2] mm: hwpoison: disable memory error handling on 1GB hugepage

2019-05-29 Thread Mike Kravetz
On 5/28/19 2:49 AM, Wanpeng Li wrote: > Cc Paolo, > Hi all, > On Wed, 14 Feb 2018 at 06:34, Mike Kravetz wrote: >> >> On 02/12/2018 06:48 PM, Michael Ellerman wrote: >>> Andrew Morton writes: >>> >>>> On Thu, 08 Feb 2018 12:30:45 + Punit

[PATCH v2 14/14] unicore32: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
of __GFP_ACCOUNT to the GFP flags. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/unicore32/include/asm/pgalloc.h | 36 1 file changed, 8 insertions(+), 28

[PATCH v2 13/14] um: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport Reviewed-by: Anton Ivanov Acked-by: Anton Ivanov --- arch/um/include/asm/pgalloc.h | 16 ++-- arch/um/kernel/mem.c | 22 -- 2 files changed, 2 insertions(+), 36 deletions(-) diff

[PATCH v2 12/14] riscv: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
that GFP_ACCOUNT is used for the user PTE allocations. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport Reviewed-by: Palmer Dabbelt --- arch/riscv/include/asm/pgalloc.h | 29 ++--- 1 file changed

[PATCH v2 11/14] parisc: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
on are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/parisc/include/asm/pgalloc.h | 33 ++--- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h

[PATCH v2 10/14] nios2: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgalloc.h | 37 ++--- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/arch/nios2/include/asm/pgalloc.h b/arch/nios2/include/asm/pgalloc.h index 3a149ea..4bc8cf7 100644 --- a/arch/nios2/include/asm

[PATCH v2 09/14] nds32: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
one and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/nds32/include/asm/pgalloc.h | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/arch/nds32/include/asm/pgalloc.h b/arch/nds32/include/asm/pgalloc.h index 3c5fee5..954696c 100644

[PATCH v2 08/14] mips: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
and can be simply dropped. Signed-off-by: Mike Rapoport Acked-by: Paul Burton --- arch/mips/include/asm/pgalloc.h | 33 ++--- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h index

[PATCH v2 07/14] m68k: sun3: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
ones. The pte_free() and pte_free_kernel() versions are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/m68k/include/asm/sun3_pgalloc.h | 41 ++-- 1 file changed, 2 insertions(+), 39 deletions(-) diff --git a/arch

[PATCH v2 06/14] hexagon: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch hexagon to use generic version of these functions. Signed-off-by: Mike Rapoport --- arch/hexagon

[PATCH v2 05/14] csky: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
it does not clear the allocated page but rather sets each PTE in it to a non-zero value. The pte_free_kernel() and pte_free() versions on csky are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport Acked-by: Guo Ren --- arch/csky/include/asm/pgalloc.h | 30

[PATCH v2 04/14] arm64: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
check for pte. The pte_free() version on arm64 is identical to the generic one and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/arm64/include/asm/pgalloc.h | 47 +++- arch/arm64/mm/mmu.c | 2 +- arch/arm64/mm/pgd.c | 9

[PATCH v2 03/14] arm: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
of __GFP_ACCOUNT to the GFP flags. The conversion to the generic version of pte_free_kernel() removes the NULL check for pte. The pte_free() version on arm is identical to the generic one and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/arm/include/asm/pgalloc.h | 41

[PATCH v2 02/14] alpha: switch to generic version of pte allocation

2019-05-08 Thread Mike Rapoport
are identical to the generic ones and can be simply dropped. Signed-off-by: Mike Rapoport --- arch/alpha/include/asm/pgalloc.h | 40 +++- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/arch/alpha/include/asm/pgalloc.h b/arch/alpha/include/asm

[PATCH v2 01/14] asm-generic, x86: introduce generic pte_{alloc, free}_one[_kernel]

2019-05-08 Thread Mike Rapoport
ual memory allocation or must use non-default GFP flags. x86 is switched to use generic pte_alloc_one_kernel(), pte_free_kernel() and pte_free(). x86 still implements pte_alloc_one() to allow run-time control of GFP flags required for "userpte" command line option. Signed-off-by: Mike Rap

[PATCH v2 00/14] introduce generic pte_{alloc,free}_one[_kernel]

2019-05-08 Thread Mike Rapoport
kernel.org/lkml/1547619692-7946-1-git-send-email-anshuman.khand...@arm.com Mike Rapoport (14): asm-generic, x86: introduce generic pte_{alloc,free}_one[_kernel] alpha: switch to generic version of pte allocation arm: switch to generic version of pte allocation arm64: switch to generic vers

Re: [PATCH 12/15] powerpc/nohash/64: switch to generic version of pte allocation

2019-05-05 Thread Mike Rapoport
On Thu, May 02, 2019 at 06:56:07PM +0200, Christophe Leroy wrote: > > > Le 02/05/2019 à 17:28, Mike Rapoport a écrit : > >The 64-bit book-E powerpc implements pte_alloc_one(), > >pte_alloc_one_kernel(), pte_free_kernel() and pte_free() the same way as > >the gene

<    4   5   6   7   8   9   10   11   12   13   >