[PATCH v2 2/2] KVM: arm/arm64: harden unmap_stage2_ptes in case end is not PAGE_SIZE aligned

2018-05-18 Thread Jia He
If it passes addr=0x20292,size=0xfe00 to unmap_stage2_range-> ...->unmap_stage2_ptes, unmap_stage2_ptes will get addr=0x20292, end=0x20292fe00. After first while loop addr=0x20293, end=0x20292fe00, then addr!=end. Thus it will touch another pages by put_pages() in the 2nd loop. This

[PATCH v2 2/2] KVM: arm/arm64: harden unmap_stage2_ptes in case end is not PAGE_SIZE aligned

2018-05-18 Thread Jia He
If it passes addr=0x20292,size=0xfe00 to unmap_stage2_range-> ...->unmap_stage2_ptes, unmap_stage2_ptes will get addr=0x20292, end=0x20292fe00. After first while loop addr=0x20293, end=0x20292fe00, then addr!=end. Thus it will touch another pages by put_pages() in the 2nd loop. This

[PATCH v2 1/2] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-18 Thread Jia He
There is a panic in armv8a server(QDF2400) under memory pressure tests (start 20 guests and run memhog in the host). -begin [35380.800950] BUG: Bad page state in process qemu-kvm pfn:dd0b6 [35380.805825] page:7fe003742d80

[PATCH v2 1/2] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-18 Thread Jia He
There is a panic in armv8a server(QDF2400) under memory pressure tests (start 20 guests and run memhog in the host). -begin [35380.800950] BUG: Bad page state in process qemu-kvm pfn:dd0b6 [35380.805825] page:7fe003742d80

Re: [PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
Hi Suzuki On 5/17/2018 11:03 PM, Suzuki K Poulose Wrote: > On 17/05/18 13:46, Jia He wrote: >> Hi Suzuki >> >> On 5/17/2018 4:17 PM, Suzuki K Poulose Wrote: >>> >>> Hi Jia, >>> >>> On 17/05/18 07:11, Jia He wrote: >>>> I

Re: [PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
Hi Suzuki On 5/17/2018 11:03 PM, Suzuki K Poulose Wrote: > On 17/05/18 13:46, Jia He wrote: >> Hi Suzuki >> >> On 5/17/2018 4:17 PM, Suzuki K Poulose Wrote: >>> >>> Hi Jia, >>> >>> On 17/05/18 07:11, Jia He wrote: >>>> I

Re: [PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
Hi Suzuki On 5/17/2018 4:17 PM, Suzuki K Poulose Wrote: > > Hi Jia, > > On 17/05/18 07:11, Jia He wrote: >> I ever met a panic under memory pressure tests(start 20 guests and run >> memhog in the host). > > Please avoid using "I" in the commit descriptio

Re: [PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
Hi Suzuki On 5/17/2018 4:17 PM, Suzuki K Poulose Wrote: > > Hi Jia, > > On 17/05/18 07:11, Jia He wrote: >> I ever met a panic under memory pressure tests(start 20 guests and run >> memhog in the host). > > Please avoid using "I" in the commit descriptio

[PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
I ever met a panic under memory pressure tests(start 20 guests and run memhog in the host). -begin [35380.800950] BUG: Bad page state in process qemu-kvm pfn:dd0b6 [35380.805825] page:7fe003742d80 count:-4871 mapcount:-2126053375

[PATCH] KVM: arm/arm64: add WARN_ON if size is not PAGE_SIZE aligned in unmap_stage2_range

2018-05-17 Thread Jia He
I ever met a panic under memory pressure tests(start 20 guests and run memhog in the host). -begin [35380.800950] BUG: Bad page state in process qemu-kvm pfn:dd0b6 [35380.805825] page:7fe003742d80 count:-4871 mapcount:-2126053375

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-15 Thread Jia He
On 5/16/2018 12:21 AM, Suzuki K Poulose Wrote: > Hi Jia, > > On 15/05/18 14:15, Jia He wrote: >> >> >> On 5/15/2018 8:38 PM, Jia He Wrote: >>> Hi Suzuki >>> >>> On 5/15/2018 4:36 PM, Suzuki K Poulose Wrote: >>>> >>&

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-15 Thread Jia He
On 5/16/2018 12:21 AM, Suzuki K Poulose Wrote: > Hi Jia, > > On 15/05/18 14:15, Jia He wrote: >> >> >> On 5/15/2018 8:38 PM, Jia He Wrote: >>> Hi Suzuki >>> >>> On 5/15/2018 4:36 PM, Suzuki K Poulose Wrote: >>>> >>&

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-15 Thread Jia He
Hi Suzuki On 5/15/2018 4:36 PM, Suzuki K Poulose Wrote: > > Hi Jia > > On 05/15/2018 03:03 AM, Jia He wrote: >> Hi Suzuki >> >> I will merge the other thread into this, and add the necessary CC list >> >> That WARN_ON call trace is very easy to reprodu

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-15 Thread Jia He
Hi Suzuki On 5/15/2018 4:36 PM, Suzuki K Poulose Wrote: > > Hi Jia > > On 05/15/2018 03:03 AM, Jia He wrote: >> Hi Suzuki >> >> I will merge the other thread into this, and add the necessary CC list >> >> That WARN_ON call trace is very easy to reprodu

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-14 Thread Jia He
thout this debugging patch. Please also see my comments below On 5/14/2018 6:06 PM, Suzuki K Poulose Wrote: On 14/05/18 03:30, Jia He wrote: On 5/11/2018 9:39 PM, Suzuki K Poulose Wrote: Marc Thanks for looping me in. Comments below. On 03/05/18 03:02, Jia He wrote: Hi Marc Thanks f

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-14 Thread Jia He
thout this debugging patch. Please also see my comments below On 5/14/2018 6:06 PM, Suzuki K Poulose Wrote: On 14/05/18 03:30, Jia He wrote: On 5/11/2018 9:39 PM, Suzuki K Poulose Wrote: Marc Thanks for looping me in. Comments below. On 03/05/18 03:02, Jia He wrote: Hi Marc Thanks f

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-13 Thread Jia He
On 5/11/2018 9:39 PM, Suzuki K Poulose Wrote: Marc Thanks for looping me in. Comments below. On 03/05/18 03:02, Jia He wrote: Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He <jia...@hxt-semitech.

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-13 Thread Jia He
On 5/11/2018 9:39 PM, Suzuki K Poulose Wrote: Marc Thanks for looping me in. Comments below. On 03/05/18 03:02, Jia He wrote: Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He In our armv8a server

Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-09 Thread Jia He
Hi Andrew On 5/10/2018 7:31 AM, Andrew Morton Wrote: On Fri, 4 May 2018 11:11:46 +0800 Jia He <hejia...@gmail.com> wrote: In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and r

Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-09 Thread Jia He
Hi Andrew On 5/10/2018 7:31 AM, Andrew Morton Wrote: On Fri, 4 May 2018 11:11:46 +0800 Jia He wrote: In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and run memhog in the h

Re: [PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-05-06 Thread Jia He
On 5/5/2018 12:53 AM, Pavel Tatashin Wrote: I'm wondering, ain't simple enabling of config DEFERRED_STRUCT_PAGE_INIT provide even better speed-up? If that is the case then it seems like this series is not needed at all, right? I am not sure why is this config optional. It looks like it could

Re: [PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-05-06 Thread Jia He
On 5/5/2018 12:53 AM, Pavel Tatashin Wrote: I'm wondering, ain't simple enabling of config DEFERRED_STRUCT_PAGE_INIT provide even better speed-up? If that is the case then it seems like this series is not needed at all, right? I am not sure why is this config optional. It looks like it could

Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
[+Hugh Dickins] Cheers, Jia On 5/4/2018 11:11 AM, Jia He Wrote: In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and run memhog in the host). --be

Re: [PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
[+Hugh Dickins] Cheers, Jia On 5/4/2018 11:11 AM, Jia He Wrote: In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and run memhog in the host). --be

[PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and run memhog in the host). --begin-- [ 410.853828] WARNING: CPU: 4 PID: 4641 at

[PATCH v2] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
In our armv8a server(QDF2400), I noticed lots of WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address under memory pressure tests(start 20 guests and run memhog in the host). --begin-- [ 410.853828] WARNING: CPU: 4 PID: 4641 at

Re: [PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-05-03 Thread Jia He
Ping Sorry if I am a little bit verbose, but it can speedup the arm64 booting time indeed. -- Cheers, Jia On 4/11/2018 3:21 PM, Jia He Wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") tried to optimize the loop in memmap

Re: [PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-05-03 Thread Jia He
Ping Sorry if I am a little bit verbose, but it can speedup the arm64 booting time indeed. -- Cheers, Jia On 4/11/2018 3:21 PM, Jia He Wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") tried to optimize the loop in memmap

Re: [PATCH] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
On 5/3/2018 6:44 PM, Claudio Imbrenda Wrote: On Thu, 3 May 2018 16:34:48 +0800 Jia He <hejia...@gmail.com> wrote: In our armv8a server(QDF2400), I noticed a WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address. --

Re: [PATCH] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
On 5/3/2018 6:44 PM, Claudio Imbrenda Wrote: On Thu, 3 May 2018 16:34:48 +0800 Jia He wrote: In our armv8a server(QDF2400), I noticed a WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address. --begin-- [ 410.853

[PATCH] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
In our armv8a server(QDF2400), I noticed a WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address. --begin-- [ 410.853828] WARNING: CPU: 4 PID: 4641 at arch/arm64/kvm/../../../virt/kvm/arm/mmu.c:1826 kvm_age_hva_handler+0xc0/0xc8

[PATCH] mm/ksm: ignore STABLE_FLAG of rmap_item->address in rmap_walk_ksm

2018-05-03 Thread Jia He
In our armv8a server(QDF2400), I noticed a WARN_ON caused by PAGE_SIZE unaligned for rmap_item->address. --begin-- [ 410.853828] WARNING: CPU: 4 PID: 4641 at arch/arm64/kvm/../../../virt/kvm/arm/mmu.c:1826 kvm_age_hva_handler+0xc0/0xc8

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
On 5/3/2018 10:02 AM, Jia He Wrote: Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He <jia...@hxt-semitech.com> In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: C

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
On 5/3/2018 10:02 AM, Jia He Wrote: Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: CPU: 33 PID: 255 at arch/arm64

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He <jia...@hxt-semitech.com> In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: CPU: 33 PID: 255 at arch/arm

Re: [PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
Hi Marc Thanks for the review On 5/2/2018 10:26 PM, Marc Zyngier Wrote: [+ Suzuki] On 02/05/18 08:08, Jia He wrote: From: Jia He In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: CPU: 33 PID: 255 at arch/arm64/kvm/../../../virt/kvm/arm/mmu.c:1670

[PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
From: Jia He <jia...@hxt-semitech.com> In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: CPU: 33 PID: 255 at arch/arm64/kvm/../../../virt/kvm/arm/mmu.c:1670 kvm_age_hva_handler+0xcc/0xd4 [ 800.213535] Modules linked in: vhost_net vhost tap xt_CH

[PATCH] KVM: arm/arm64: fix unaligned hva start and end in handle_hva_to_gpa

2018-05-02 Thread Jia He
From: Jia He In our armv8a server (QDF2400), I noticed a WARN_ON as follows: [ 800.202850] WARNING: CPU: 33 PID: 255 at arch/arm64/kvm/../../../virt/kvm/arm/mmu.c:1670 kvm_age_hva_handler+0xcc/0xd4 [ 800.213535] Modules linked in: vhost_net vhost tap xt_CHECKSUM ipt_MASQUERADE

[PATCH v8 5/6] arm: arm64: introduce pfn_valid_region()

2018-04-11 Thread Jia He
n the same memory region, we needn't do the unnecessary binary searches because memblock_is_nomap is the same result for whole memory region. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/early_pfn.h | 24 1 file changed, 24 insertions(+) diff

[PATCH v8 6/6] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-11 Thread Jia He
5 us in my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c40297d..426db40 100644 --- a/includ

[PATCH v8 5/6] arm: arm64: introduce pfn_valid_region()

2018-04-11 Thread Jia He
n the same memory region, we needn't do the unnecessary binary searches because memblock_is_nomap is the same result for whole memory region. Signed-off-by: Jia He --- include/linux/early_pfn.h | 24 1 file changed, 24 insertions(+) diff --git a/include/linux/early_pfn.h

[PATCH v8 6/6] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-11 Thread Jia He
5 us in my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c40297d..426db40 100644 --- a/include/linux/mmzone.h +++ b/inc

[PATCH v8 4/6] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-11 Thread Jia He
is the same for whole memory region. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 0257aee..a0127b3

[PATCH v8 3/6] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-11 Thread Jia He
ary search in memblock_next_valid_pfn. Furthermore, if the pfn is in a *gap* of two memory region, skip to next region directly if possible. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/early_pfn.h | 37 + 1 file changed, 29 insertions(+), 8 de

[PATCH v8 4/6] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-11 Thread Jia He
is the same for whole memory region. Signed-off-by: Jia He --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 0257aee..a0127b3 100644 --- a/include/linux/memblock.h

[PATCH v8 3/6] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-11 Thread Jia He
ary search in memblock_next_valid_pfn. Furthermore, if the pfn is in a *gap* of two memory region, skip to next region directly if possible. Signed-off-by: Jia He --- include/linux/early_pfn.h | 37 + 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/inc

[PATCH v8 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID

2018-04-11 Thread Jia He
Make CONFIG_HAVE_MEMBLOCK_PFN_VALID a config option so it can move memblock_next_valid_pfn to generic code file. arm/arm64 can benefit from this booting time improvement. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- arch/arm/Kconfig | 4 arch/arm64/Kconfig | 4 mm/K

[PATCH v8 1/6] arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_VALID

2018-04-11 Thread Jia He
Make CONFIG_HAVE_MEMBLOCK_PFN_VALID a config option so it can move memblock_next_valid_pfn to generic code file. arm/arm64 can benefit from this booting time improvement. Signed-off-by: Jia He --- arch/arm/Kconfig | 4 arch/arm64/Kconfig | 4 mm/Kconfig | 3 +++ 3 files

[PATCH v8 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-04-11 Thread Jia He
niel Vacek <ne...@redhat.com> Signed-off-by: Jia He <jia...@hxt-semitech.com> --- arch/arm/mm/init.c| 1 + arch/arm64/mm/init.c | 1 + include/linux/early_pfn.h | 34 ++ include/linux/mmzone.h| 11 +++ mm/page_alloc.c

[PATCH v8 2/6] mm: page_alloc: remain memblock_next_valid_pfn() on arm/arm64

2018-04-11 Thread Jia He
niel Vacek Signed-off-by: Jia He --- arch/arm/mm/init.c| 1 + arch/arm64/mm/init.c | 1 + include/linux/early_pfn.h | 34 ++ include/linux/mmzone.h| 11 +++ mm/page_alloc.c | 5 - 5 files changed, 51 insertions(+),

[PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-11 Thread Jia He
acek and Wei Yang - optimized on arm besides arm64 V3: - fix 2 issues reported by kbuild test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (6): arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_

[PATCH v8 0/6] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-11 Thread Jia He
acek and Wei Yang - optimized on arm besides arm64 V3: - fix 2 issues reported by kbuild test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (6): arm: arm64: introduce CONFIG_HAVE_MEMBLOCK_PFN_

Re: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-10 Thread Jia He
On 4/2/2018 3:53 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 09:49, Jia He <hejia...@gmail.com> wrote: On 4/2/2018 2:55 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 04:30, Jia He <hejia...@gmail.com> wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of i

Re: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-10 Thread Jia He
On 4/2/2018 3:53 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 09:49, Jia He wrote: On 4/2/2018 2:55 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 04:30, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimize

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-09 Thread Jia He
On 4/9/2018 6:50 PM, Joe Perches Wrote: On Mon, 2018-04-09 at 14:37 +0800, Jia He wrote: On 4/9/2018 1:07 AM, Joe Perches Wrote: On Sun, 2018-04-08 at 10:12 +0800, Jia He wrote: Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you If you re

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-09 Thread Jia He
On 4/9/2018 6:50 PM, Joe Perches Wrote: On Mon, 2018-04-09 at 14:37 +0800, Jia He wrote: On 4/9/2018 1:07 AM, Joe Perches Wrote: On Sun, 2018-04-08 at 10:12 +0800, Jia He wrote: Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you If you re

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-09 Thread Jia He
On 4/9/2018 1:07 AM, Joe Perches Wrote: On Sun, 2018-04-08 at 10:12 +0800, Jia He wrote: Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you If you really want to do something useful here, quote the quote characters and compare for that.

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-09 Thread Jia He
On 4/9/2018 1:07 AM, Joe Perches Wrote: On Sun, 2018-04-08 at 10:12 +0800, Jia He wrote: Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you If you really want to do something useful here, quote the quote characters and compare for that.

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-07 Thread Jia He
Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you --- Cheers, Jia On 4/2/2018 10:28 PM, Jia He Wrote: For revert commit, it might has two double quotation marks in its commit log. Relax the check condition for revert commit to a

Re: [PATCH] checkpatch: relax check for revert commit

2018-04-07 Thread Jia He
Hi Andy & Joe Although it is minor, it is a real bug, I thought. Is there any comment? Thank you --- Cheers, Jia On 4/2/2018 10:28 PM, Jia He Wrote: For revert commit, it might has two double quotation marks in its commit log. Relax the check condition for revert commit to a

Re: [PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-07 Thread Jia He
Thanks for your comments, Russell On 4/6/2018 5:09 PM, Russell King - ARM Linux Wrote: On Thu, Apr 05, 2018 at 05:50:54AM -0700, Matthew Wilcox wrote: On Thu, Apr 05, 2018 at 08:44:12PM +0800, Jia He wrote: On 4/5/2018 7:34 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:35AM -0700

Re: [PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-07 Thread Jia He
Thanks for your comments, Russell On 4/6/2018 5:09 PM, Russell King - ARM Linux Wrote: On Thu, Apr 05, 2018 at 05:50:54AM -0700, Matthew Wilcox wrote: On Thu, Apr 05, 2018 at 08:44:12PM +0800, Jia He wrote: On 4/5/2018 7:34 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:35AM -0700

Re: [PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-05 Thread Jia He
On 4/5/2018 7:34 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:35AM -0700, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E

Re: [PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-05 Thread Jia He
On 4/5/2018 7:34 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:35AM -0700, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimized the loop in memmap_init_zone(). But there is still some room for improvement. E

Re: [PATCH v7 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-05 Thread Jia He
Thanks, Matthew On 4/5/2018 7:23 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:34AM -0700, Jia He wrote: create mode 100644 include/linux/arm96_common.h 'arm96_common'?! No. Just no. The right way to share common code is to create a header file (or use an existing one), either

Re: [PATCH v7 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-05 Thread Jia He
Thanks, Matthew On 4/5/2018 7:23 PM, Matthew Wilcox Wrote: On Thu, Apr 05, 2018 at 01:04:34AM -0700, Jia He wrote: create mode 100644 include/linux/arm96_common.h 'arm96_common'?! No. Just no. The right way to share common code is to create a header file (or use an existing one), either

[PATCH v7 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-05 Thread Jia He
5 us in my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index eb56071..ab01bd3 100644 --- a/includ

[PATCH v7 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-05 Thread Jia He
5 us in my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index eb56071..ab01bd3 100644 --- a/include/linux/mmzone.h +++ b/inc

[PATCH v7 4/5] arm: arm64: introduce pfn_valid_region()

2018-04-05 Thread Jia He
n the same memory region, we needn't do the unnecessary binary searches because memblock_is_nomap is the same result for whole memory region. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/arm96_common.h | 24 1 file changed, 24 insertions(+) diff

[PATCH v7 3/5] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-05 Thread Jia He
is the same for whole memory region. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 0257aee..a0127b3

[PATCH v7 4/5] arm: arm64: introduce pfn_valid_region()

2018-04-05 Thread Jia He
n the same memory region, we needn't do the unnecessary binary searches because memblock_is_nomap is the same result for whole memory region. Signed-off-by: Jia He --- include/linux/arm96_common.h | 24 1 file changed, 24 insertions(+) diff --git a/include/linux/arm96_

[PATCH v7 3/5] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-05 Thread Jia He
is the same for whole memory region. Signed-off-by: Jia He --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 0257aee..a0127b3 100644 --- a/include/linux/memblock.h

[PATCH v7 0/5] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-05 Thread Jia He
optimized on arm besides arm64 V3: - fix 2 issues reported by kbuild test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (5): mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64 arm:

[PATCH v7 0/5] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-05 Thread Jia He
optimized on arm besides arm64 V3: - fix 2 issues reported by kbuild test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (5): mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64 arm:

[PATCH v7 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-05 Thread Jia He
niel Vacek <ne...@redhat.com> Signed-off-by: Jia He <jia...@hxt-semitech.com> --- arch/arm/mm/init.c | 1 + arch/arm64/mm/init.c | 1 + include/linux/arm96_common.h | 37 + include/linux/mmzone.h | 11 +++ mm/page_all

[PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-05 Thread Jia He
ary search in memblock_next_valid_pfn. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/arm96_common.h | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/include/linux/arm96_common.h b/include/linux/arm96_common.h index a6f68ea

[PATCH v7 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-05 Thread Jia He
ary search in memblock_next_valid_pfn. Signed-off-by: Jia He --- include/linux/arm96_common.h | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/include/linux/arm96_common.h b/include/linux/arm96_common.h index a6f68ea..2f4dea4 100644 --- a/include/linux/arm9

[PATCH v7 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-05 Thread Jia He
niel Vacek Signed-off-by: Jia He --- arch/arm/mm/init.c | 1 + arch/arm64/mm/init.c | 1 + include/linux/arm96_common.h | 37 + include/linux/mmzone.h | 11 +++ mm/page_alloc.c | 2 +- 5 files changed, 51 insert

Re: [PATCH v6 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-04 Thread Jia He
] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jia-He/mm-page_alloc-remain-memblock_next_valid_pfn-on-arm-and-arm64/20180404-200732 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64

Re: [PATCH v6 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-04 Thread Jia He
] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jia-He/mm-page_alloc-remain-memblock_next_valid_pfn-on-arm-and-arm64/20180404-200732 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64

[PATCH v6 4/5] arm: arm64: introduce pfn_valid_region()

2018-04-03 Thread Jia He
d memblock region index and check pfn++ is still in the same region. Thus we can avoid do the slow binary searches. Currently it only improve the performance on arm/arm64 and will have no impact on other arches. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/arm

[PATCH v6 4/5] arm: arm64: introduce pfn_valid_region()

2018-04-03 Thread Jia He
d memblock region index and check pfn++ is still in the same region. Thus we can avoid do the slow binary searches. Currently it only improve the performance on arm/arm64 and will have no impact on other arches. Signed-off-by: Jia He --- include/linux/arm96_common.h | 24 ++

[PATCH v6 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-03 Thread Jia He
ary search in memblock_next_valid_pfn. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/arm96_common.h | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/include/linux/arm96_common.h b/include/linux/arm96_common.h index a6f68ea

[PATCH v6 2/5] arm: arm64: page_alloc: reduce unnecessary binary search in memblock_next_valid_pfn()

2018-04-03 Thread Jia He
ary search in memblock_next_valid_pfn. Signed-off-by: Jia He --- include/linux/arm96_common.h | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/include/linux/arm96_common.h b/include/linux/arm96_common.h index a6f68ea..2f4dea4 100644 --- a/include/linux/arm9

[PATCH v6 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-03 Thread Jia He
my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index a517d43..516ffb49 100644 --- a/include/linu

[PATCH v6 5/5] mm: page_alloc: reduce unnecessary binary search in early_pfn_valid()

2018-04-03 Thread Jia He
my armv8a server(QDF2400 with 96G memory). Signed-off-by: Jia He --- include/linux/mmzone.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index a517d43..516ffb49 100644 --- a/include/linux/mmzone.h +++ b/include/linu

[PATCH v6 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-03 Thread Jia He
Vacek <ne...@redhat.com> Signed-off-by: Jia He <jia...@hxt-semitech.com> --- arch/arm/mm/init.c | 1 + arch/arm64/mm/init.c | 1 + include/linux/arm96_common.h | 37 + include/linux/mmzone.h | 11 +++ mm/page_alloc.c

[PATCH v6 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-03 Thread Jia He
Signed-off-by: Jia He --- arch/arm/mm/init.c | 1 + arch/arm64/mm/init.c | 1 + include/linux/arm96_common.h | 37 + include/linux/mmzone.h | 11 +++ mm/page_alloc.c | 2 +- 5 files changed, 51 insertions(+),

[PATCH v6 3/5] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-03 Thread Jia He
This api is to find the region start_pfn and end_pfn of the input pfn. With this helper, we can improve the loop in early_pfn_valid by reducing the unnecessary binary searches. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- include/linux/memblock.h | 2 ++ mm/memblock.c

[PATCH v6 3/5] mm/memblock: introduce memblock_search_pfn_regions()

2018-04-03 Thread Jia He
This api is to find the region start_pfn and end_pfn of the input pfn. With this helper, we can improve the loop in early_pfn_valid by reducing the unnecessary binary searches. Signed-off-by: Jia He --- include/linux/memblock.h | 2 ++ mm/memblock.c| 9 + 2 files changed, 11

[PATCH v6 0/5] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-03 Thread Jia He
build test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (5): mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64 arm: arm64: page_alloc: reduce unnecessary binary search in memb

[PATCH v6 0/5] optimize memblock_next_valid_pfn and early_pfn_valid on arm and arm64

2018-04-03 Thread Jia He
build test robot V2: - rebase to mmotm latest - remain memblock_next_valid_pfn on arm64 - refine memblock_search_pfn_regions and pfn_valid_region Jia He (5): mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64 arm: arm64: page_alloc: reduce unnecessary binary search in memb

Re: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-02 Thread Jia He
On 4/2/2018 3:53 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 09:49, Jia He <hejia...@gmail.com> wrote: On 4/2/2018 2:55 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 04:30, Jia He <hejia...@gmail.com> wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of i

Re: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on arm and arm64

2018-04-02 Thread Jia He
On 4/2/2018 3:53 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 09:49, Jia He wrote: On 4/2/2018 2:55 PM, Ard Biesheuvel Wrote: On 2 April 2018 at 04:30, Jia He wrote: Commit b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible") optimize

[PATCH] checkpatch: relax check for revert commit

2018-04-02 Thread Jia He
For revert commit, it might has two double quotation marks in its commit log. Relax the check condition for revert commit to avoid checkpatch errors. Signed-off-by: Jia He <jia...@hxt-semitech.com> --- scripts/checkpatch.pl | 14 +++--- 1 file changed, 7 insertions(+), 7 del

[PATCH] checkpatch: relax check for revert commit

2018-04-02 Thread Jia He
For revert commit, it might has two double quotation marks in its commit log. Relax the check condition for revert commit to avoid checkpatch errors. Signed-off-by: Jia He --- scripts/checkpatch.pl | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts

[PATCH] relax check regex for revert commit

2018-04-02 Thread Jia He
] test single line revert commit >From 9639c10d1c2ae17ca83a1d446b146a23cbaf9a92 Mon Sep 17 00:00:00 2001 From: Jia He <hejia...@gmail.com> Date: Wed, 28 Mar 2018 23:32:20 -0700 Subject: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_

[PATCH] relax check regex for revert commit

2018-04-02 Thread Jia He
] test single line revert commit >From 9639c10d1c2ae17ca83a1d446b146a23cbaf9a92 Mon Sep 17 00:00:00 2001 From: Jia He Date: Wed, 28 Mar 2018 23:32:20 -0700 Subject: [PATCH v5 1/5] mm: page_alloc: remain memblock_next_valid_pfn() on Commit f5c135025

Re: [PATCH v3 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable

2018-04-02 Thread Jia He
On 4/2/2018 4:12 PM, Wei Yang Wrote: On Wed, Mar 28, 2018 at 05:49:23PM +0800, Jia He wrote: On 3/28/2018 5:18 PM, Wei Yang Wrote: Oops, I should reply this thread. Forget about the reply on another thread. On Sun, Mar 25, 2018 at 08:02:15PM -0700, Jia He wrote: Commit b92df1de5d28 (&qu

Re: [PATCH v3 1/5] mm: page_alloc: remain memblock_next_valid_pfn() when CONFIG_HAVE_ARCH_PFN_VALID is enable

2018-04-02 Thread Jia He
On 4/2/2018 4:12 PM, Wei Yang Wrote: On Wed, Mar 28, 2018 at 05:49:23PM +0800, Jia He wrote: On 3/28/2018 5:18 PM, Wei Yang Wrote: Oops, I should reply this thread. Forget about the reply on another thread. On Sun, Mar 25, 2018 at 08:02:15PM -0700, Jia He wrote: Commit b92df1de5d28 (&qu

<    1   2   3   4   5   6   7   >