Re: [PATCH v3 0/5] mm/memcg: Reduce kmemcache memory accounting overhead

2021-04-15 Thread Masayoshi Mizuma
On Thu, Apr 15, 2021 at 09:17:37AM -0400, Waiman Long wrote: > I was focusing on your kernel module benchmark in testing my patch. I will > try out your pgbench benchmark to see if there can be other tuning that can > be done. Thanks a lot! > BTW, how many numa nodes does your test machine? I did

Re: [PATCH v3 5/5] mm/memcg: Optimize user context object stock access

2021-04-15 Thread Masayoshi Mizuma
On Thu, Apr 15, 2021 at 11:44:55AM +0200, Christoph Lameter wrote: > Would you please stop quoting the whole patch when you have nothing to say > about the details? It is enough to just respond without quoting. I was > looking through this trying to find something you said about individual > sectio

Re: [PATCH v3 5/5] mm/memcg: Optimize user context object stock access

2021-04-14 Thread Masayoshi Mizuma
__mod_obj_stock_state(objcg, pgdat, idx, nr); > - local_irq_restore(flags); > + put_obj_stock(flags); > } > > int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size) > @@ -3380,10 +3424,10 @@ void obj_cgroup_uncharge_mod_state(struct obj_cgroup > *objcg, size_t size, > { > unsigned long flags; > > - local_irq_save(flags); > + get_obj_stock(flags); > __refill_obj_stock(objcg, size); > __mod_obj_stock_state(objcg, pgdat, idx, -(int)size); > - local_irq_restore(flags); > + put_obj_stock(flags); > } > > #endif /* CONFIG_MEMCG_KMEM */ > -- > 2.18.1 > Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v3 4/5] mm/memcg: Separate out object stock data into its own struct

2021-04-14 Thread Masayoshi Mizuma
ck = current_obj_stock(); > > - stock = this_cpu_ptr(&memcg_stock); > if (stock->cached_objcg != objcg) { /* reset if necessary */ > drain_obj_stock(stock); > obj_cgroup_get(objcg); > @@ -3280,7 +3291,7 @@ static void refill_obj_stock(s

Re: [PATCH v3 3/5] mm/memcg: Cache vmstat data in percpu memcg_stock_pcp

2021-04-14 Thread Masayoshi Mizuma
od_obj_stock_state(objcg, page_pgdat(page), > + cache_vmstat_idx(s), > + obj_full_size(s)); > } else { > obj_cgroup_uncharge(objcg, obj_full_size(s)); > } > @@ -408,6 +397,11 @@ static inline void memcg_slab_free_hook(struct > kmem_cache *s, > void **p, int objects) > { > } > + > +static inline void mod_obj_stock_state(struct obj_cgroup *objcg, > +struct pglist_data *pgdat, int idx, int > nr) > +{ > +} > #endif /* CONFIG_MEMCG_KMEM */ > > static inline struct kmem_cache *virt_to_cache(const void *obj) > -- > 2.18.1 > Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v3 2/5] mm/memcg: Introduce obj_cgroup_uncharge_mod_state()

2021-04-14 Thread Masayoshi Mizuma
arge(objcg, obj_full_size(s)); > - mod_objcg_state(objcg, page_pgdat(page), cache_vmstat_idx(s), > - -obj_full_size(s)); > + obj_cgroup_uncharge_mod_state(objcg, obj_full_size(s), > + page_pgdat(page), > + cache_vmstat_idx(s)); > obj_cgroup_put(objcg); > } > } > -- > 2.18.1 > Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v3 1/5] mm/memcg: Pass both memcg and lruvec to mod_memcg_lruvec_state()

2021-04-14 Thread Masayoshi Mizuma
iff --git a/mm/slab.h b/mm/slab.h > index 076582f58f68..bc6c7545e487 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -293,7 +293,7 @@ static inline void mod_objcg_state(struct obj_cgroup > *objcg, > rcu_read_lock(); > memcg = obj_cgroup_memcg(objcg); > lruvec = mem_cgroup_lruvec(memcg, pgdat); > - mod_memcg_lruvec_state(lruvec, idx, nr); > + mod_memcg_lruvec_state(memcg, lruvec, idx, nr); > rcu_read_unlock(); > } > > -- > 2.18.1 > Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v3 0/5] mm/memcg: Reduce kmemcache memory accounting overhead

2021-04-14 Thread Masayoshi Mizuma
oc(dummy_cache, GFP_KERNEL); kmem_cache_free(dummy_cache, p); } --- - v5.12-rc7 vanilla: 110 msec (100%) - v5.12-rc7 with your patches (1-5): 85 msec (77%) It seems that the reduction is small for the benchmark though... Anyway, I can see your patches reduce the

Re: [PATCH v6 08/10] perf: arm64: Add test for userspace counter access on heterogeneous systems

2021-03-15 Thread Masayoshi Mizuma
On Wed, Mar 10, 2021 at 05:08:35PM -0700, Rob Herring wrote: > Userspace counter access only works on heterogeneous systems with some > restrictions. The userspace process must be pinned to a homogeneous > subset of CPUs and must open the corresponding PMU for those CPUs. This > commit adds a test

Re: [PATCH v9 2/2] perf vendor events arm64: Add Fujitsu A64FX pmu event

2021-03-09 Thread Masayoshi Mizuma
feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa > > Signed-off-by: Shunsuke Nakamura > Reviewed-by: John Garry > --- > .../arch/arm64/fujitsu/a64fx/branch.json | 8 + > .../arch/arm64/fujitsu/a64fx/bus.json | 62 ++ > .../arch/arm64/fuj

Re: [RFC PATCH v3 1/2] topology: Represent clusters of CPUs within a die.

2021-02-09 Thread Masayoshi Mizuma
On Wed, Jan 06, 2021 at 09:30:25PM +1300, Barry Song wrote: > From: Jonathan Cameron > > Both ACPI and DT provide the ability to describe additional layers of > topology between that of individual cores and higher level constructs > such as the level at which the last level cache is shared. > In

Re: [PATCH 1/1] ktest.pl: Fix incorrect reboot for grub2bls

2020-11-29 Thread Masayoshi Mizuma
igned-off-by: Libo Chen Thank you for the fix! I tested the patch with fedora33. It works well. Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa > --- > tools/testing/ktest/ktest.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v2 1/3] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-11-16 Thread Masayoshi Mizuma
Hi Yuichi-san, This patch is under review here: https://lore.kernel.org/linux-arm-kernel/1604317487-14543-3-git-send-email-sumit.g...@linaro.org/ So, it would be great if you could send your feedback to the thread; testing, code review. Thanks, Masa On Wed, Nov 04, 2020 at 05:05:37PM +0900, Yui

Re: [PATCH v7 5/7] arm64: ipi_nmi: Add support for NMI backtrace

2020-11-02 Thread Masayoshi Mizuma
c irqreturn_t ipi_nmi_handler(int irq, void *data) > { > - /* nop, NMI handlers for special features can be added here. */ > + irqreturn_t ret = IRQ_NONE; > + > + if (nmi_cpu_backtrace(get_irq_regs())) > + ret = IRQ_HANDLED; > > - return IRQ_NONE; > + return ret; > } > > void dynamic_ipi_setup(int cpu) > -- It works well with sysrq l trigger. Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v7 3/7] arm64: smp: Assign and setup an IPI as NMI

2020-11-02 Thread Masayoshi Mizuma
e(int ipi_base, int n) > irq_set_status_flags(ipi_base + i, IRQ_HIDDEN); > } > > + if (n > nr_ipi) > + set_smp_dynamic_ipi(ipi_base + nr_ipi); > + > ipi_irq_base = ipi_base; > > /* Setup the boot CPU immediately */ > -- Looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v7 2/7] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-11-02 Thread Masayoshi Mizuma
int __init gic_init_bases(void __iomem > *dist_base, > > gic_dist_init(); > gic_cpu_init(); > + gic_enable_nmi_support(); > gic_smp_init(); > gic_cpu_pm_init(); > > @@ -1719,8 +1734,6 @@ static int __init gic_init_bases(void __iomem > *dist_base, > gicv2m_init(handle, gic_data.domain); > } > > - gic_enable_nmi_support(); > - > return 0; > > out_free: > -- Looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v7 1/7] arm64: Add framework to turn IPI as NMI

2020-11-02 Thread Masayoshi Mizuma
i(ipi_nmi_id, IRQ_TYPE_NONE); > +} > + > +void dynamic_ipi_teardown(int cpu) Same as here: void dynamic_ipi_teardown(void) > +{ > + if (!ipi_nmi_desc) > + return; > + > + disable_percpu_nmi(ipi_nmi_id); > + teardown_percpu_nmi(ipi_nmi_id); > +} > + > +void __init set_smp_dynamic_ipi(int ipi) > +{ > + if (!request_percpu_nmi(ipi, ipi_nmi_handler, "IPI", &cpu_number)) { > + ipi_nmi_desc = irq_to_desc(ipi); > + ipi_nmi_id = ipi; > + } > +} > -- Otherwise, looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks, Masa

Re: [PATCH v5 1/5] arm64: Add framework to turn IPI as NMI

2020-10-14 Thread Masayoshi Mizuma
disable_percpu_irq(ipi_id); > + } > +} > + > +void __init set_smp_ipi_nmi(int ipi) > +{ > + int err; > + > + err = request_percpu_nmi(ipi, ipi_nmi_handler, "IPI", &cpu_number); > + if (err) { > + err = request_percpu_irq(ipi, ip

Re: [PATCH v5 2/5] irqchip/gic-v3: Enable support for SGIs to act as NMIs

2020-10-14 Thread Masayoshi Mizuma
pu_init(); > + gic_enable_nmi_support(); > gic_smp_init(); > gic_cpu_pm_init(); > > @@ -1719,8 +1730,6 @@ static int __init gic_init_bases(void __iomem > *dist_base, > gicv2m_init(handle, gic_data.domain); > } > > - gic_enable_nmi_support(); > - > return 0; > > out_free: > -- Looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v5 5/5] arm64: ipi_nmi: Add support for NMI backtrace

2020-10-14 Thread Masayoshi Mizuma
, void *data) > { > unsigned int cpu = smp_processor_id(); > > - ipi_kgdb_nmicallback(cpu, get_irq_regs()); > + if (nmi_cpu_backtrace(get_irq_regs())) > + goto out; > > + ipi_kgdb_nmicallback(cpu, get_irq_regs()); > +out: > return IRQ_HANDLED; > } > > -- It works well. Please feel free to add: Tested-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v5 3/5] arm64: smp: Allocate and setup IPI as NMI

2020-10-14 Thread Masayoshi Mizuma
e(int ipi_base, int n) > irq_set_status_flags(ipi_base + i, IRQ_HIDDEN); > } > > + if (n > nr_ipi) > + set_smp_ipi_nmi(ipi_base + nr_ipi); > + > ipi_irq_base = ipi_base; > > /* Setup the boot CPU immediately */ > -- Looks good to me. Please feel free to add: Reviewed-by: Masayoshi Mizuma Thanks! Masa

Re: [PATCH v4 1/5] arm64: Add framework to turn IPI as NMI

2020-10-12 Thread Masayoshi Mizuma
On Mon, Oct 12, 2020 at 05:49:09PM +0530, Sumit Garg wrote: > Hi Masa, > > On Sat, 10 Oct 2020 at 20:43, Masayoshi Mizuma wrote: > > > > On Sat, Oct 10, 2020 at 10:34:04AM +0100, Marc Zyngier wrote: > > > On Sat, 10 Oct 2020 02:58:55 +0100,

Re: [PATCH v4 1/5] arm64: Add framework to turn IPI as NMI

2020-10-10 Thread Masayoshi Mizuma
On Sat, Oct 10, 2020 at 10:34:04AM +0100, Marc Zyngier wrote: > On Sat, 10 Oct 2020 02:58:55 +0100, > Masayoshi Mizuma wrote: > > [...] > > > > +void ipi_nmi_setup(int cpu) > > > +{ > > > + if (!ipi_desc) > > > + return; &g

Re: [PATCH v4 1/5] arm64: Add framework to turn IPI as NMI

2020-10-09 Thread Masayoshi Mizuma
Hi Sumit, On Fri, Sep 11, 2020 at 06:58:40PM +0530, Sumit Garg wrote: > Introduce framework to turn an IPI as NMI using pseudo NMIs. In case a > particular platform doesn't support pseudo NMIs, then request IPI as a > regular IRQ. > > The main motivation for this feature is to have an IPI that ca

[PATCH v3] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system which has SVE feature crashed because of the memory pointed by task->thread.sve_state was destroyed by someone. That is because sve_state is freed while the forking the child process. The child process has the pointer of sve_state which is same as the paren

Re: [PATCH v2] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-30 Thread Masayoshi Mizuma
Hi Julien and Dave, On Mon, Sep 30, 2019 at 02:02:46PM +0100, Dave Martin wrote: > On Mon, Sep 30, 2019 at 01:23:18PM +0100, Julien Grall wrote: > > Hi, > > > > On 27/09/2019 16:39, Masayoshi Mizuma wrote: > > >From: Masayoshi Mizuma > > > > > >

[PATCH v2] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-27 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system which has SVE feature crashed because of the memory pointed by task->thread.sve_state was destroyed by someone. That is because sve_state is freed while the forking the child process. The child process has the pointer of sve_state which is same as the paren

Re: [PATCH 1/1] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-27 Thread Masayoshi Mizuma
Hi Julien and Dave, Thank you for your comments! Dave's suggestion looks good for me, many thanks! I'll post it as v2. - Masa On Fri, Sep 27, 2019 at 01:52:30PM +0100, Dave Martin wrote: > On Thu, Sep 26, 2019 at 03:08:46PM -0400, Masayoshi Mizuma wrote: > > From: Masayoshi M

[PATCH 0/1] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-26 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system which has SVE feature crashed by unknown reason. According to the memory dump, the panic happened because the memory data pointed by task->thread.sve_state was destroyed by someone. We tried to reproduce the crash, however, it's hard to do that. But, we

[PATCH 1/1] arm64/sve: Fix wrong free for task->thread.sve_state

2019-09-26 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system which has SVE feature crashed because of the memory pointed by task->thread.sve_state was destroyed by someone. That is because sve_state is freed while the forking the child process. The child process has the pointer of sve_state which is same as the paren

[PATCH v3 4/5] x86/mm/KASLR: Cleanup calculation for direct mapping size

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Cleanup calculation for direct mapping size. Signed-off-by: Baoquan He Signed-off-by: Masayoshi Mizuma --- arch/x86/mm/kaslr.c | 50 +++-- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm/kaslr.c b/arch

[PATCH v3 0/5] Adjust the padding size for KASLR

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system sometimes crashes while memory hot-adding on KASLR enabled system. The crash happens because the regions pointed by kaslr_regions[].base are overwritten by the hot-added memory. It happens because of the padding size for kaslr_regions[].base isn't enoug

[PATCH v3 5/5] x86/mm/KASLR: Adjust the padding size for the direct mapping.

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system sometimes crashes while memory hot-adding on KASLR enabled system. The crash happens because the regions pointed by kaslr_regions[].base are overwritten by the hot-added memory. It happens because of the padding size for kaslr_regions[].base isn't enoug

[PATCH v3 2/5] x86/boot: Add max_addr field in struct boot_params

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Add max_addr field in struct boot_params. max_addr shows the maximum memory address to be reachable by memory hot-add. max_addr is set by parsing ACPI SRAT. Signed-off-by: Masayoshi Mizuma --- Documentation/x86/zero-page.rst | 4 arch/x86/include/uapi/asm

[PATCH v3 1/5] x86/boot: Wrap up the SRAT traversing code into subtable_parse()

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Wrap up the SRAT traversing code into subtable_parse(). Signed-off-by: Masayoshi Mizuma --- arch/x86/boot/compressed/acpi.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot

[PATCH v3 3/5] x86/boot: Get the max address from SRAT

2019-08-30 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Get the max address from SRAT and write it into boot_params->max_addr. Signed-off-by: Masayoshi Mizuma --- arch/x86/boot/compressed/acpi.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/arch/x86/boot/compressed/acpi.

[PATCH v2] arm64/mm: Correct the cache line size warning with non coherent device

2019-06-14 Thread Masayoshi Mizuma
From: Masayoshi Mizuma If the cache line size is greater than ARCH_DMA_MINALIGN (128), the warning shows and it's tainted as TAINT_CPU_OUT_OF_SPEC. However, it's not good because as discussed in the thread [1], the cpu cache line size will be problem only on non-coherent devices.

Re: [PATCH 1/2] arm64/mm: check cpu cache line size with non-coherent device

2019-06-11 Thread Masayoshi Mizuma
On Tue, Jun 11, 2019 at 07:00:07PM +0100, Catalin Marinas wrote: > On Tue, Jun 11, 2019 at 11:17:30AM -0400, Masayoshi Mizuma wrote: > > --- a/arch/arm64/mm/dma-mapping.c > > +++ b/arch/arm64/mm/dma-mapping.c > > @@ -91,10 +91,6 @@ static int __swiotlb_mmap_pfn(struc

Re: [PATCH 2/2] arm64/mm: show TAINT_CPU_OUT_OF_SPEC warning if the cache size is over the spec.

2019-06-11 Thread Masayoshi Mizuma
On Tue, Jun 11, 2019 at 04:41:06PM +0100, Catalin Marinas wrote: > On Tue, Jun 11, 2019 at 11:17:31AM -0400, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > Show the warning and taints as TAINT_CPU_OUT_OF_SPEC if the cache line > > size is greater than the m

[PATCH 2/2] arm64/mm: show TAINT_CPU_OUT_OF_SPEC warning if the cache size is over the spec.

2019-06-11 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Show the warning and taints as TAINT_CPU_OUT_OF_SPEC if the cache line size is greater than the maximum. Signed-off-by: Masayoshi Mizuma Reviewed-by: Hidetoshi Seto Tested-by: Zhang Lei --- arch/arm64/include/asm/cache.h | 2 ++ arch/arm64/mm/init.c | 5

[PATCH 1/2] arm64/mm: check cpu cache line size with non-coherent device

2019-06-11 Thread Masayoshi Mizuma
From: Masayoshi Mizuma As discussed in the thread [1], the cpu cache line size will be problem only on non-coherent devices. And, the coherent flag is already introduced to struct device. Show the warning only if the device is non-coherent device and ARCH_DMA_MINALIGN is smaller than the cpu

[PATCH 0/2] Correct the cache line size warning

2019-06-11 Thread Masayoshi Mizuma
From: Masayoshi Mizuma If the cache line size is greater than ARCH_DMA_MINALIGN (128), the warning shows and it's tainted as TAINT_CPU_OUT_OF_SPEC. However, it's not good about two points. First, as discussed in the thread [1], the cpu cache line size will be problem only on no

[PATCH v2 6/6] ktest: update sample.conf for grub2bls

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Update sample.conf for grub2bls Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/sample.conf | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index

[PATCH v2 5/6] ktest: remove get_grub2_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Remove get_grub2_index() because it isn't used anywhere. Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 36 1 file changed, 36 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/kte

[PATCH v2 4/6] ktest: pass KERNEL_VERSION to POST_KTEST

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma For BLS, kernel entry is added by kernel-install command through POST_INSALL, for example, POST_INSTALL = ssh root@Test "/usr/bin/kernel-install \ add $KERNEL_VERSION /boot/vmlinuz-$KERNEL_VERSION" The entry is removed by kernel-install command and the kern

[PATCH v2 1/6] ktest: introduce _get_grub_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Introduce _get_grub_index() to deal with Boot Loader Specification (BLS) and cleanup. Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 37 1 file changed, 37 insertions(+) diff --git a/tools/testing/ktest/ktest.pl

[PATCH v2 3/6] ktest: introduce grub2bls REBOOT_TYPE option

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Fedora 30 introduces Boot Loader Specification (BLS), it changes around grub entry configuration. kernel entries aren't in grub.cfg. We can get the entries by "grubby --info=ALL" command. Introduce grub2bls as REBOOT_TYPE option for BLS. Signed-off-by: M

[PATCH v2 2/6] ktest: cleanup get_grub_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Cleanup get_grub_index(). Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 50 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index

[PATCH v2 0/6] ktest: support for Boot Loader Specification

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Fedora 30 introduces Boot Loader Specification (BLS) [1], it changes around grub entry configuration. This patch series deals with the new configuration. - Add grub2bls option as REBOOT_TYPE to deal with BLS. - Some cleanup around getting kernel entries. To use ktest.pl

Re: [PATCH 2/5] ktest: cleanup get_grub_index

2019-05-09 Thread Masayoshi Mizuma
On Thu, May 09, 2019 at 01:57:21PM -0400, Steven Rostedt wrote: > On Thu, 9 May 2019 13:46:27 -0400 > Masayoshi Mizuma wrote: > > > From: Masayoshi Mizuma > > > > Cleanup get_grub_index(). > > Hi Masayoshi, > > Thanks for the patches, quick c

[PATCH 0/5] ktest: support for Boot Loader Specification

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Fedora 30 introduces Boot Loader Specification (BLS) [1], it changes around grub entry configuration. This patchset deals with the new configuration. - Add grub2bls option as REBOOT_TYPE to deal with BLS. - Some cleanup around getting kernel entries. [1] https

[PATCH 5/5] ktest: update sample.conf for grub2bls

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Update sample.conf for grub2bls. Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/sample.conf | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index 8c893a58b68e

[PATCH 2/5] ktest: cleanup get_grub_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Cleanup get_grub_index(). Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 50 +++- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index

[PATCH 4/5] ktest: remove get_grub2_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Remove get_grub2_index() because it isn't used anywhere. Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 36 1 file changed, 36 deletions(-) diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/kte

[PATCH 3/5] ktest: introduce grub2bls REBOOT_TYPE option

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Fedora 30 introduces Boot Loader Specification (BLS), it changes around grub entry configuration. kernel entries aren't in grub.cfg. We can get the entries by "grubby --info=ALL" command. Introduce grub2bls as REBOOT_TYPE option for BLS. Signed-off-by: M

[PATCH 1/5] ktest: introduce _get_grub_index

2019-05-09 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Introduce _get_grub_index() to deal with Boot Loader Specification (BLS) and cleanup. Signed-off-by: Masayoshi Mizuma --- tools/testing/ktest/ktest.pl | 37 1 file changed, 37 insertions(+) diff --git a/tools/testing/ktest/ktest.pl

[PATCH v2] ktest: introduce REBOOT_RETURN_CODE to confirm the result of REBOOT

2019-04-18 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Unexpected power cycle occurs while the installation of the kernel. ssh root@Test sync ... [0 seconds] SUCCESS ssh root@Test reboot ... [1 second] FAILED! virsh destroy Test; sleep 5; virsh start Test ... [6 seconds] SUCCESS That is because REBOOT, the default

[PATCH v2] ktest: Add support for meta characters in GRUB_MENU

2019-04-17 Thread Masayoshi Mizuma
From: Masayoshi Mizuma ktest fails if meta characters are in GRUB_MENU, for example GRUB_MENU = 'Fedora (test)' The failure happens because the meta characters are not escaped, so the menu doesn't match in any entries in GRUB_FILE. Use quotemeta() to escape the meta characters.

Re: [PATCH] ktest: Add workaround to avoid unexpected power cycle

2019-04-17 Thread Masayoshi Mizuma
On Wed, Apr 17, 2019 at 04:29:42PM -0400, Steven Rostedt wrote: > On Wed, 17 Apr 2019 16:14:42 -0400 > Masayoshi Mizuma wrote: > > > From: Masayoshi Mizuma > > > > Unexpected power cycle occurs while the installation of the > > kernel. > > > > Tha

Re: [PATCH] ktest: Add support for meta characters in GRUB_MENU

2019-04-17 Thread Masayoshi Mizuma
On Wed, Apr 17, 2019 at 04:17:39PM -0400, Steven Rostedt wrote: > On Wed, 17 Apr 2019 16:11:14 -0400 > Masayoshi Mizuma wrote: > > > From: Masayoshi Mizuma > > > > ktest fails if meta characters are in GRUB_MENU, for example > > GRUB_MENU = 'Fedora (test

[PATCH] ktest: Add workaround to avoid unexpected power cycle

2019-04-17 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Unexpected power cycle occurs while the installation of the kernel. That is because the default reboot command, "ssh $SSH_USER@$MACHINE reboot" exits as 255 even if the reboot is successfully done, like as: ]# ssh root@Test reboot Connection to Test closed

[PATCH] ktest: Add support for meta characters in GRUB_MENU

2019-04-17 Thread Masayoshi Mizuma
From: Masayoshi Mizuma ktest fails if meta characters are in GRUB_MENU, for example GRUB_MENU = 'Fedora (test)' The failure happens because the meta characters are not escaped, so the menu doesn't match in any entries in GRUB_FILE. Use quotameta() to escape the meta characters.

Re: [PATCH v2] x86/mm: Adjust the padding size for KASLR

2019-02-14 Thread Masayoshi Mizuma
Hi Baoquan, Thank you for your review. On Thu, Feb 14, 2019 at 06:12:36PM +0800, Baoquan He wrote: > Hi Masa, > > On 02/11/19 at 08:31pm, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > > > The system sometimes crashes while memory hot-adding on KASLR &g

[PATCH v2] x86/mm: Adjust the padding size for KASLR

2019-02-11 Thread Masayoshi Mizuma
From: Masayoshi Mizuma The system sometimes crashes while memory hot-adding on KASLR enabled system. The crash happens because the regions pointed by kaslr_regions[].base are overwritten by the hot-added memory. It happens because of the padding size for kaslr_regions[].base isn't enoug

Re: [PATCH v8 0/3] x86/boot/KASLR: Parse ACPI table and limit kaslr in immovable memory

2019-02-11 Thread Masayoshi Mizuma
Hi Chao, Thank you for your review. On Mon, Feb 11, 2019 at 09:46:05AM +0800, Chao Fan wrote: > On Tue, Feb 05, 2019 at 10:05:16AM -0500, Masayoshi Mizuma wrote: > [...] > > Hi Masa, > > Sorry for delay, since last days were Chinese holiday. > > >diff --git a/arch

Re: [PATCH v8 0/3] x86/boot/KASLR: Parse ACPI table and limit kaslr in immovable memory

2019-02-08 Thread Masayoshi Mizuma
Hi Boris, Thank you for your review. On Fri, Feb 08, 2019 at 07:26:00PM +0100, Borislav Petkov wrote: > On Tue, Feb 05, 2019 at 10:05:16AM -0500, Masayoshi Mizuma wrote: > > From: Masayoshi Mizuma > > Date: Tue, 5 Feb 2019 10:00:59 -0500 > > Subject: [PATCH] x86/mm: Int

Re: [PATCH v8 0/3] x86/boot/KASLR: Parse ACPI table and limit kaslr in immovable memory

2019-02-05 Thread Masayoshi Mizuma
Hi Boris and all, On Sun, Nov 11, 2018 at 08:45:57AM -0500, Masayoshi Mizuma wrote: > On Sat, Nov 10, 2018 at 11:54:22AM +0100, Borislav Petkov wrote: > > On Thu, Nov 08, 2018 at 11:51:29AM +0100, Borislav Petkov wrote: > > > A global definition which doesn't need allocat

Re: [PATCH] sched/debug: initialize sd_sysctl_cpus if !CONFIG_CPUMASK_OFFSTACK

2019-01-31 Thread Masayoshi Mizuma
On Wed, Jan 30, 2019 at 09:14:00PM +0100, Peter Zijlstra wrote: > On Tue, Jan 29, 2019 at 10:12:45AM -0500, Masayoshi Mizuma wrote: > > From: Hidetoshi Seto > > > > register_sched_domain_sysctl() copies the cpu_possible_mask into > > sd_sysctl_cpus, but only if sd_sysc

[PATCH] sched/debug: initialize sd_sysctl_cpus if !CONFIG_CPUMASK_OFFSTACK

2019-01-29 Thread Masayoshi Mizuma
Fix this by separating the allocataion and initialization, and adding a flag to initialize the possible cpu entries while system booting only. Signed-off-by: Hidetoshi Seto Reviewed-by: Masayoshi Mizuma Tested-by: Syuuichirou Ishii Tested-by: Tarumizu, Kohei --- kernel/sched/debug.c | 4 ++

Re: [PATCH v13 3/6] x86/boot: Introduce efi_get_rsdp_addr() to find RSDP from EFI table

2018-12-17 Thread Masayoshi Mizuma
On Wed, Dec 12, 2018 at 11:10:50AM +0800, Chao Fan wrote: > Memory information in SRAT is necessary to fix the conflict between > KASLR and memory-hotremove. So RSDP and SRAT should be parsed. > > When booting form KEXEC/EFI/BIOS, the methods to compute RSDP > are different. When booting from EFI,

Re: [PATCH v13 2/6] x86/boot: Introduce get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-12-13 Thread Masayoshi Mizuma
On Thu, Dec 13, 2018 at 08:29:50PM +0100, Borislav Petkov wrote: > On Thu, Dec 13, 2018 at 02:25:30PM -0500, Masayoshi Mizuma wrote: > > > + len = cmdline_find_option("acpi_rsdp", val, MAX_ADDRESS_LENGTH+1); > > > > sizeof() is better here. > > > >

Re: [PATCH v13 2/6] x86/boot: Introduce get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-12-13 Thread Masayoshi Mizuma
Hi Chao, Great work! Let me say some trivial comments. On Wed, Dec 12, 2018 at 11:10:49AM +0800, Chao Fan wrote: > Memory information in SRAT is necessary to fix the conflict between > KASLR and memory-hotremove. > > ACPI SRAT (System/Static Resource Affinity Table) shows the details > about mem

Re: [PATCH v12 1/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-11-30 Thread Masayoshi Mizuma
On Fri, Nov 30, 2018 at 10:43:47AM +0800, Chao Fan wrote: ... > >]$ make arch/x86/boot/compressed/misc.o > > CALLscripts/checksyscalls.sh > > DESCEND objtool > > CC arch/x86/boot/compressed/misc.o > >ld: -r and -pie may not be used together > >make[1]: *** [scripts/Makefile.build:294:

Re: [PATCH v12 4/5] x86/boot: Parse SRAT table from RSDP and store immovable memory

2018-11-30 Thread Masayoshi Mizuma
On Fri, Nov 30, 2018 at 09:24:54AM +0800, Chao Fan wrote: > On Thu, Nov 29, 2018 at 12:55:21PM -0500, Masayoshi Mizuma wrote: > >On Thu, Nov 29, 2018 at 04:16:30PM +0800, Chao Fan wrote: > >> To fix the conflict between KASLR and memory-hotremove, SRAT table > >> shoul

Re: [PATCH v12 1/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-11-29 Thread Masayoshi Mizuma
On Thu, Nov 29, 2018 at 04:16:27PM +0800, Chao Fan wrote: > To fix the conflict between KASLR and memory-hotremove, memory > information in SRAT table is necessary. > > ACPI SRAT (System/Static Resource Affinity Table) can show the details > about memory ranges, including ranges of memory provided

Re: [PATCH v12 4/5] x86/boot: Parse SRAT table from RSDP and store immovable memory

2018-11-29 Thread Masayoshi Mizuma
On Thu, Nov 29, 2018 at 04:16:30PM +0800, Chao Fan wrote: > To fix the conflict between KASLR and memory-hotremove, SRAT table > should be parsed by RSDP pointer, then find the immovable > memory regions and store them in an array called immovable_mem[]. > The array called immovable_mem[] will exte

Re: [PATCH v12 1/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-11-29 Thread Masayoshi Mizuma
On Thu, Nov 29, 2018 at 04:16:27PM +0800, Chao Fan wrote: > To fix the conflict between KASLR and memory-hotremove, memory > information in SRAT table is necessary. > > ACPI SRAT (System/Static Resource Affinity Table) can show the details > about memory ranges, including ranges of memory provided

Re: [PATCH v12 0/5] x86/boot/KASLR: Parse ACPI table and limit KASLR to choosing immovable memory

2018-11-29 Thread Masayoshi Mizuma
Hi Chao, Thank you for your continued working. Could you please build your patches before sending? Your patches depend on the following kconfig, so please build them under the config combination. RANDOMIZE_BASE MEMORY_HOTREMOVE EARLY_PARSE_RSDP KEXEC EFI Thanks, Masa On Thu, Nov 29, 2018 at 04

Re: [PATCH v12 1/5] x86/boot: Add get_acpi_rsdp() to parse RSDP in cmdline from KEXEC

2018-11-29 Thread Masayoshi Mizuma
On Thu, Nov 29, 2018 at 04:16:27PM +0800, Chao Fan wrote: > To fix the conflict between KASLR and memory-hotremove, memory > information in SRAT table is necessary. > > ACPI SRAT (System/Static Resource Affinity Table) can show the details > about memory ranges, including ranges of memory provided

Re: [PATCH v3 0/3] mm: Fix for movable_node boot option

2018-10-09 Thread Masayoshi Mizuma
Ping... On Tue, Oct 02, 2018 at 10:38:18AM -0400, Masayoshi Mizuma wrote: > This patch series are the fix for movable_node boot option > issue which was introduced by commit 124049decbb1 ("x86/e820: > put !E820_TYPE_RAM regions into memblock.reserved"). > > The commit

Re: [tip:x86/boot] ACPI/NUMA: Add warning message if the padding size for KASLR is not enough

2018-10-03 Thread Masayoshi Mizuma
On Wed, Oct 03, 2018 at 02:48:14PM +0200, Borislav Petkov wrote: > On Wed, Oct 03, 2018 at 02:34:02PM +0200, Peter Zijlstra wrote: > > > > Subject: ACPI/NUMA: Fix KASLR build error > > > > There is no point in trying to compile KASLR specific code when there is > > no KASLR. > > > > Signed-off-b

Re: [PATCH v6 0/3] Add a kernel parameter to change the padding size for KASLR

2018-10-03 Thread Masayoshi Mizuma
On Wed, Oct 03, 2018 at 08:52:19AM +0200, Ingo Molnar wrote: > > * Masayoshi Mizuma wrote: > > > This patch series are adding an kernel parameter to change > > the padding size used for KASLR. It is useful for memory hotplug > > capable system. User can adjust

Re: [tip:x86/boot] ACPI/NUMA: Add warning message if the padding size for KASLR is not enough

2018-10-03 Thread Masayoshi Mizuma
From: Masayoshi Mizuma Subject: [PATCH] Fix for build error if CONFIG_RANDOMIZE_BASE is not defined. Fix the following build error. ld: drivers/acpi/numa.o: in function `acpi_numa_init': drivers/acpi/numa.c:473: undefined reference to `rand_mem_physical_padding' make: *** [Mak

[PATCH v6 3/3] Documentation/kernel-parameters.txt: Document rand_mem_physical_padding=

2018-10-02 Thread Masayoshi Mizuma
padding size. Signed-off-by: Masayoshi Mizuma --- .../admin-guide/kernel-parameters.txt | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 92eb1f4..f0930e3 100644

[PATCH v6 1/3] x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping

2018-10-02 Thread Masayoshi Mizuma
than changing the config. Signed-off-by: Masayoshi Mizuma Reviewed-by: Baoquan He --- arch/x86/include/asm/setup.h | 9 + arch/x86/mm/kaslr.c | 22 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/setup.h b/arch/x86

[PATCH v6 0/3] Add a kernel parameter to change the padding size for KASLR

2018-10-02 Thread Masayoshi Mizuma
said, this is similar SGI UV issue, but a little different. Remove SGI UV description. Masayoshi Mizuma (3): x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping ACPI/NUMA: Add warning message if the padding size for KASLR is not enough Document

[PATCH v6 2/3] ACPI/NUMA: Add warning message if the padding size for KASLR is not enough

2018-10-02 Thread Masayoshi Mizuma
Add warning message if the padding size for KASLR, rand_mem_physical_padding, is not enough. The message also says the suitable padding size. Signed-off-by: Masayoshi Mizuma --- drivers/acpi/numa.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers/acpi/numa.c b

Re: [tip:x86/boot] ACPI/NUMA: Add warning message if the padding size for KASLR is not enough

2018-10-02 Thread Masayoshi Mizuma
On Tue, Oct 02, 2018 at 05:05:18PM +0200, Borislav Petkov wrote: > On Tue, Oct 02, 2018 at 03:18:41AM -0700, tip-bot for Masayoshi Mizuma wrote: > > Commit-ID: 3b054ca88c4f4dd5f516a12d4b6d6bd0ae826f41 > > Gitweb: > > https://git.kernel.org/tip/3b054ca88c4f4dd5f51

[PATCH v3 1/3] mm: zero remaining unavailable struct pages

2018-10-02 Thread Masayoshi Mizuma
range (i.e. memblock.memory && !memblock.reserved). This patch extends it to cover all unavailable range, which fixes the reported issue. Fixes: f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") Signed-off-by: Naoya Horiguchi Tested-by: Oscar Salvador Tested-by: Masayos

[PATCH v3 0/3] mm: Fix for movable_node boot option

2018-10-02 Thread Masayoshi Mizuma
as Normal zone even if the SRAT has Hot pluggable affinity. First and second patch fix the original issue which the commit tried to fix, then revert the commit. Changelog from v2: - Change the patch order. The revert patch is moved to the last. Masayoshi Mizuma (1): Revert "x86/e820: put

[PATCH v3 2/3] mm: return zero_resv_unavail optimization

2018-10-02 Thread Masayoshi Mizuma
pageblock_nr_pages struct pages. Signed-off-by: Pavel Tatashin Reviewed-by: Masayoshi Mizuma Acked-by: Naoya Horiguchi --- mm/page_alloc.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3b9d89e..bd5b7e4

[PATCH v3 3/3] Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved"

2018-10-02 Thread Masayoshi Mizuma
From: Masayoshi Mizuma commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into memblock.reserved") breaks movable_node kernel option because it changed the memory gap range to reserved memblock. So, the node is marked as Normal zone even if the SRAT has Hot pluggabl

Re: [PATCH v2 1/3] Revert "x86/e820: put !E820_TYPE_RAM regions into memblock.reserved"

2018-10-02 Thread Masayoshi Mizuma
On Tue, Oct 02, 2018 at 11:39:40AM +0200, Ingo Molnar wrote: > > * Masayoshi Mizuma wrote: > > > From: Masayoshi Mizuma > > > > commit 124049decbb1 ("x86/e820: put !E820_TYPE_RAM regions into > > memblock.reserved") breaks movable_node kernel option

[tip:x86/boot] Documentation/kernel-parameters.txt: Document rand_mem_physical_padding=

2018-10-02 Thread tip-bot for Masayoshi Mizuma
Commit-ID: 2d580c160ada91049fc24b244ed74d8775bd1c96 Gitweb: https://git.kernel.org/tip/2d580c160ada91049fc24b244ed74d8775bd1c96 Author: Masayoshi Mizuma AuthorDate: Mon, 1 Oct 2018 10:08:43 -0400 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 11:47:22 +0200 Documentation/kernel

[tip:x86/boot] ACPI/NUMA: Add warning message if the padding size for KASLR is not enough

2018-10-02 Thread tip-bot for Masayoshi Mizuma
Commit-ID: 3b054ca88c4f4dd5f516a12d4b6d6bd0ae826f41 Gitweb: https://git.kernel.org/tip/3b054ca88c4f4dd5f516a12d4b6d6bd0ae826f41 Author: Masayoshi Mizuma AuthorDate: Mon, 1 Oct 2018 10:08:42 -0400 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 11:47:21 +0200 ACPI/NUMA: Add warning

[tip:x86/boot] x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping

2018-10-02 Thread tip-bot for Masayoshi Mizuma
Commit-ID: e79ac9354cf95d75ff6afd341f9c5aa5cbcd638b Gitweb: https://git.kernel.org/tip/e79ac9354cf95d75ff6afd341f9c5aa5cbcd638b Author: Masayoshi Mizuma AuthorDate: Mon, 1 Oct 2018 10:08:41 -0400 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 11:47:20 +0200 x86/mm: Add a kernel

[tip:perf/core] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded physical package ID 0

2018-10-02 Thread tip-bot for Masayoshi Mizuma
Commit-ID: 6265adb9726098b7f4f7ca70bc51992b25fdd9d6 Gitweb: https://git.kernel.org/tip/6265adb9726098b7f4f7ca70bc51992b25fdd9d6 Author: Masayoshi Mizuma AuthorDate: Mon, 10 Sep 2018 10:47:50 -0400 Committer: Ingo Molnar CommitDate: Tue, 2 Oct 2018 09:37:58 +0200 perf/x86/intel/uncore

[PATCH v5 3/3] docs: kernel-parameters.txt: document rand_mem_physical_padding

2018-10-01 Thread Masayoshi Mizuma
From: Masayoshi Mizuma This kernel parameter allows to change the padding used for the physical memory mapping section when KASLR memory is enabled. For memory hotplug capable systems, the default padding size, CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING, may not be enough. The option is useful to

[PATCH v5 1/3] x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping

2018-10-01 Thread Masayoshi Mizuma
From: Masayoshi Mizuma If each node of physical memory layout has huge space for hotplug, the padding used for the physical memory mapping section is not enough. For exapmle of the layout: SRAT: Node 6 PXM 4 [mem 0x1000-0x13ff] hotplug SRAT: Node 7 PXM 5 [mem 0x1400

[PATCH v5 0/3] Add a kernel parameter to change the padding size for KASLR

2018-10-01 Thread Masayoshi Mizuma
ption. Masayoshi Mizuma (3): x86/mm: Add a kernel parameter to change the padding used for the physical memory mapping ACPI / NUMA: Add warning message if the padding size for KASLR is not enough docs: kernel-parameters.txt: document rand_mem_physical_padding .../admin-guide/k

  1   2   >