Re: [RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Pingfan Liu
On Mon, Oct 14, 2024 at 10:07 PM Ryan Roberts wrote: > > On 14/10/2024 14:54, Pingfan Liu wrote: > > Hello Ryan, > > > > On Mon, Oct 14, 2024 at 11:58:08AM +0100, Ryan Roberts wrote: > >> arm64 can support multiple base page sizes. Instead of selecting a page >

Re: [RFC PATCH v1 01/57] mm: Add macros ahead of supporting boot-time page size selection

2024-10-14 Thread Pingfan Liu
Hello Ryan, On Mon, Oct 14, 2024 at 11:58:08AM +0100, Ryan Roberts wrote: > arm64 can support multiple base page sizes. Instead of selecting a page > size at compile time, as is done today, we will make it possible to > select the desired page size on the command line. > > In this case PAGE_SHIFT

Re: [RFC PATCH 1/5] powerpc/smp: Adjust nr_cpu_ids to cover all threads of a core

2024-02-15 Thread Pingfan Liu
On Thu, Feb 15, 2024 at 9:09 PM Michael Ellerman wrote: > > On Fri, 29 Dec 2023 23:01:03 +1100, Michael Ellerman wrote: > > If nr_cpu_ids is too low to include at least all the threads of a single > > core adjust nr_cpu_ids upwards. This avoids triggering odd bugs in code > > that assumes all thre

Re: [PATCH v6 (proposal)] powerpc/cpu: enable nr_cpus for crash kernel

2024-01-29 Thread Pingfan Liu
26, 2024 at 3:40 AM Christophe Leroy wrote: > > Hi, > > Le 22/05/2018 à 10:23, Pingfan Liu a écrit : > > For kexec -p, the boot cpu can be not the cpu0, this causes the problem > > to alloc paca[]. In theory, there is no requirement to assign cpu's logical > > i

Re: [RFC PATCH 5/5] powerpc/smp: Remap boot CPU onto core 0 if >= nr_cpu_ids

2024-01-01 Thread Pingfan Liu
On Fri, Dec 29, 2023 at 8:07 PM Michael Ellerman wrote: > > Michael Ellerman writes: > > If nr_cpu_ids is too low to include the boot CPU, remap the boot CPU > > onto logical core 0. > > Hi guys, > > I finally got time to look at this issue. I think this series should fix Thanks a lot for sparin

[PATCHv10 3/3] powerpc/smp: Allow hole in paca_ptrs to accommodate boot_cpu

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This patch always forces the first core onlined due to some subsystem needs cpu0. After core0, a hole may follow, then comes the crashed core. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc

[PATCHv10 2/3] powerpc/kernel: Extend arrays' size to make room for a hole in cpu_possible_mask

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This patch aims to mark all the arrays which size is decided by nr_cpu_ids or num_possible_cpus(). Later if a hole is allowed in cpu_possible_mask, the corresponding array should extend to hold the last bit number in cpu_possible_mask. Signed-off-by: Pingfan Liu Cc: Michael

[PATCHv10 1/3] powerpc/kernel: Remove check on paca_ptrs_size

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu Between early_setup()->allocate_paca_ptrs() and smp_setup_cpu_maps()->free_unused_pacas(), there is no call to set_nr_cpu_ids(), which means nr_cpu_ids is unchanged. Hence removing the check. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Pigg

[PATCHv10 0/3] enable nr_cpus for powerpc without re-ordering cpu number

2023-12-26 Thread Pingfan Liu
From: Pingfan Liu This series addresses the nr_cpus issue for PowerPC without re-ordering cpu number. To save the memory used by percpu area, it also limits the possible cpu numbers by allowing hole in cpu_possible_mask. Because the last cpu number will bigger than nr_cpu_ids in this way, some

Re: [PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-11-28 Thread Pingfan Liu
Hi Hari, On Mon, Nov 27, 2023 at 12:30 PM Hari Bathini wrote: > > Hi Pingfan, Michael, > > On 17/10/23 4:03 pm, Hari Bathini wrote: > > > > > > On 17/10/23 7:58 am, Pingfan Liu wrote: > >> *** Idea *** > >> For kexec -p, the boot cpu can

Re: [PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-18 Thread Pingfan Liu
On Tue, Oct 17, 2023 at 6:39 PM Hari Bathini wrote: > > > > On 17/10/23 7:58 am, Pingfan Liu wrote: > > *** Idea *** > > For kexec -p, the boot cpu can be not the cpu0, this causes the problem > > of allocating memory for paca_ptrs[]. However, in theory, there i

[PATCHv9 2/2] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-16 Thread Pingfan Liu
s, at this phase, all threads in the boot core are forced to be onlined. This restriction will be lifted in a later patch with extra effort. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei C

[PATCHv9 1/2] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Pingfan Liu
carry that information for PPC32 in the coming patch. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: Sourabh Jain Cc: Hari Bathini Cc: ke...@lists.infradead.org To: linuxppc-dev

[PATCHv9 0/2] enable nr_cpus for powerpc

2023-10-16 Thread Pingfan Liu
From: Pingfan Liu Since my last v4 [1], the code has undergone great changes. The paca[] array has been reorganized and indexed by paca_ptrs[], which dramatically decreases the memory consumption even if there are many unpresent cpus in the middle. However, reordering the logical cpu numbers

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-16 Thread Pingfan Liu
On Mon, Oct 16, 2023 at 12:13:53PM +0530, Sourabh Jain wrote: > Hello Pingfan, > > > > > > > With this patch series applied, the kdump kernel fails to boot on > > > > > > powerpc with nr_cpus=1. > > > > > > > > > > > > Console logs: > > > > > > --- > > > > > > [root]# echo c > /pr

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-12 Thread Pingfan Liu
On Wed, Oct 11, 2023 at 6:53 PM Sourabh Jain wrote: > > Hello Pingfan, > >>> With this patch series applied, the kdump kernel fails to boot on > >>> powerpc with nr_cpus=1. > >>> > >>> Console logs: > >>> --- > >>> [root]# echo c > /proc/sysrq-trigger > >>> [ 74.783235] sysrq: Tr

Re: [PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 04:07:00PM +0530, Hari Bathini wrote: > > > On 09/10/23 5:00 pm, Pingfan Liu wrote: > > *** Idea *** > > For kexec -p, the boot cpu can be not the cpu0, this causes the problem > > of allocating memory for paca_ptrs[]. However, in theory, the

Re: [PATCHv8 3/5] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 01:56:13PM +0530, Hari Bathini wrote: > > > On 09/10/23 5:00 pm, Pingfan Liu wrote: > > If the boot_cpuid is smaller than nr_cpus, it requires extra effort to > > ensure the boot_cpu is in cpu_present_mask. This can be achieved by > > reserving

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 02:38:40PM +0530, Sourabh Jain wrote: > Hello Pingfan, > > > > > With this patch series applied, the kdump kernel fails to boot on > > powerpc with nr_cpus=1. > > > > Console logs: > > --- > > [root]# echo c > /proc/sysrq-trigger > > [   74.783235] sysrq:

[PATCHv8 5/5] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-10-09 Thread Pingfan Liu
x27; the kdump kernel brings up two cpus. While when taskset -c 4 bash -c 'echo c > /proc/sysrq-trigger', the kdump kernel brings up one cpu. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He

[PATCHv8 4/5] powerpc/cpu: Skip impossible cpu during iteration on a core

2023-10-09 Thread Pingfan Liu
ing the mask. In this way, the unpopulated pcpu struct can be skipped and left unaccessed. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: ke...@lists.infradead.org To: linuxppc-

[PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-09 Thread Pingfan Liu
carry that information for PPC32 in the coming patch. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: ke...@lists.infradead.org To: linuxppc-dev@lists.ozlabs.org --- arch/powerpc

[PATCHv8 3/5] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-10-09 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the successive patches Signed-off-by: Pingfan

[PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-09 Thread Pingfan Liu
s, at this phase, all threads in the boot core are forced to be onlined. This restriction will be lifted in a later patch with extra effort. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming L

[PATCHv8 0/5] enable nr_cpus for powerpc

2023-10-09 Thread Pingfan Liu
he Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: ke...@lists.infradead.org To: linuxppc-dev@lists.ozlabs.org Pingfan Liu (5): powerpc/setup : Enable boot_cpu_hwid for PPC32 powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt power

Re: [PATCHv7 4/4] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-10-06 Thread Pingfan Liu
On Wed, Oct 4, 2023 at 2:07 AM Mahesh J Salgaonkar wrote: > > On 2023-09-25 15:53:48 Mon, Pingfan Liu wrote: > > paca_ptrs should be large enough to hold the boot_cpuid, hence, its > > lower boundary is set to the bigger one between boot_cpuid+1 and > > nr_cpus. > &g

Re: [PATCHv7 2/4] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-28 Thread Pingfan Liu
on the DBG macro and not catch this bug. Thanks, Pingfan > cpu++; > } > + } > > -Original Message- > From: Pingfan Liu > Sent: Monday, September 25, 2023 2:54 AM > To: linuxppc-dev@lists.ozlabs.org > Cc: Pingfan Liu ; Michael Ellerman ; > Nicholas

[PATCHv7 4/4] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-09-25 Thread Pingfan Liu
x27; the kdump kernel brings up two cpus. While when taskset -c 4 bash -c 'echo c > /proc/sysrq-trigger', the kdump kernel brings up one cpu. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He

[PATCHv7 3/4] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-09-25 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the next patch Signed-off-by: Pingfan Liu Cc

[PATCHv7 2/4] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-25 Thread Pingfan Liu
s, at this phase, all threads in the boot core are forced to be onlined. This restriction will be lifted in a later patch with extra effort. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming L

[PATCHv7 1/4] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-09-25 Thread Pingfan Liu
carry that information for PPC32 in the coming patch. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: ke...@lists.infradead.org To: linuxppc-dev@lists.ozlabs.org Reported-by: kernel

[PATCHv7 0/4] enable nr_cpus for powerpc

2023-09-25 Thread Pingfan Liu
xppc-dev@lists.ozlabs.org Pingfan Liu (4): powerpc/setup : Enable boot_cpu_hwid for PPC32 powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid arch

Re: [RFC PATCH] powerpc: Make crashing cpu to be discovered first in kdump kernel.

2023-09-11 Thread Pingfan Liu
Hi Mahesh, I am not quite sure about fdt, so I skip that part, and leave some comments from the kexec view. On Thu, Sep 7, 2023 at 1:59 AM Mahesh Salgaonkar wrote: > > The kernel boot parameter 'nr_cpus=' allows one to specify number of > possible cpus in the system. In the normal scenario the f

[PATCHv6 3/3] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-09-11 Thread Pingfan Liu
t initialized to a proper present cpu. -2. power9_idle_stop() assumes the primary thread's paca is allocated. Hence lift nr_cpu_ids from one to two to ensure cpu0 is onlined, if the boot cpu is not cpu0. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe

[PATCHv6 2/3] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-09-11 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the next patch Signed-off-by: Pingfan Liu Cc

[PATCHv6 1/3] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-11 Thread Pingfan Liu
sides this, at this phase, all threads in the boot core are forced to be onlined. This restriction will be lifted in a later patch with extra effort. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc

[PATCHv6 0/3] enable nr_cpus for powerpc

2023-09-11 Thread Pingfan Liu
o tackle with the issue if nr_cpu_ids is configured as a constant Pingfan Liu (3): powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid arch

[PATCHv5 3/3] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-09-08 Thread Pingfan Liu
t initialized to a proper present cpu. -2. power9_idle_stop() assumes the primary thread's paca is allocated. Hence lift nr_cpu_ids from one to two to ensure cpu0 is onlined, if the boot cpu is not cpu0. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe

[PATCHv5 2/3] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-09-08 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the next patch Signed-off-by: Pingfan Liu Cc

[PATCHv5 0/3] enable nr_cpus for powerpc

2023-09-08 Thread Pingfan Liu
uxppc-dev/1520829790-14029-1-git-send-email-kernelf...@gmail.com/ Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming Lei Cc: ke...@lists.infradead.org To: linuxppc-dev@lists.ozlabs.org Pingfan Liu (3): powerpc/setup: L

[PATCHv5 1/3] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-08 Thread Pingfan Liu
s, at this phase, all threads in the boot core are forced to be onlined. This restriction will be lifted in a later patch with extra effort. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Mahesh Salgaonkar Cc: Wen Xiong Cc: Baoquan He Cc: Ming L

Re: [RFC PATCH] powerpc: Make crashing cpu to be discovered first in kdump kernel.

2023-09-08 Thread Pingfan Liu
Hi Mahesh, Thanks for sharing your great idea. I was in the middle of V5 and finish it today. My v5 is based on the same idea of my v4 [1] with the improvement of the code. And I will send it out. [1]: https://lore.kernel.org/linuxppc-dev/1520829790-14029-1-git-send-email-kernelf...@gmail.com/

Re: [PATCH 2/2] nvme-pci: use blk_mq_max_nr_hw_queues() to calculate io queues

2023-07-10 Thread Pingfan Liu
Hi Ming, Having no [PATCH 1/2] blk-mq: add blk_mq_max_nr_hw_queues() in inbox. So I reply here. At first glance, I think that the cpu hot plug callback hook should be the remedy for the newly introduced blk_mq_max_nr_hw_queues(), although it is more complicated. Consider the scene where nr_cpus

Re: [PATCH 2/2] nvme-pci: use blk_mq_max_nr_hw_queues() to calculate io queues

2023-07-10 Thread Pingfan Liu
On Mon, Jul 10, 2023 at 5:16 PM Ming Lei wrote: > > On Mon, Jul 10, 2023 at 08:41:09AM +0200, Christoph Hellwig wrote: > > On Sat, Jul 08, 2023 at 10:02:59AM +0800, Ming Lei wrote: > > > Take blk-mq's knowledge into account for calculating io queues. > > > > > > Fix wrong queue mapping in case of

Re: // a kdump hang caused by PPC pci patch series

2022-11-24 Thread Pingfan Liu
On Mon, Nov 21, 2022 at 8:57 PM Cédric Le Goater wrote: > > On 11/21/22 12:57, Pingfan Liu wrote: > > Sorry that forget a subject. > > > > On Mon, Nov 21, 2022 at 7:54 PM Pingfan Liu wrote: > >> > >> Hello Powerpc folks, > >> > >

Re: // a kdump hang caused by PPC pci patch series

2022-11-21 Thread Pingfan Liu
Hi Gedric, Appreciate your insight. Please see the comment inline below. On Mon, Nov 21, 2022 at 8:57 PM Cédric Le Goater wrote: > > On 11/21/22 12:57, Pingfan Liu wrote: > > Sorry that forget a subject. > > > > On Mon, Nov 21, 2022 at 7:54 PM Pingfan Liu wrote: >

Re: // a kdump hang caused by PPC pci patch series

2022-11-21 Thread Pingfan Liu
Sorry that forget a subject. On Mon, Nov 21, 2022 at 7:54 PM Pingfan Liu wrote: > > Hello Powerpc folks, > > I encounter an kdump bug, which I bisect and pin commit 174db9e7f775 > ("powerpc/pseries/pci: Add support of MSI domains to PHB hotplug") > > In that cas

[no subject]

2022-11-21 Thread Pingfan Liu
Hello Powerpc folks, I encounter an kdump bug, which I bisect and pin commit 174db9e7f775 ("powerpc/pseries/pci: Add support of MSI domains to PHB hotplug") In that case, using Fedora 36 as host, the mentioned commit as the guest kernel, and virto-block disk, the kdump kernel will hang: [0.0

[RFC 08/10] cpuhp: Replace cpumask_any_but(cpu_online_mask, cpu)

2022-08-21 Thread Pingfan Liu
). Signed-off-by: Pingfan Liu Cc: Russell King Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Fenghua Yu Cc: Dave Jiang Cc: Vinod Koul Cc: Wu Hao Cc: Tom Rix Cc: Moritz Fischer Cc: Xu Yilun Cc: Jani Nikula Cc: Joonas Lahtinen Cc

[PATCHv4 1/2] cpu/hotplug: Keep cpu hotplug disabled until the rebooting cpu is stable

2022-05-11 Thread Pingfan Liu
ode chunk can be removed and in [2/2], the callsites of smp_shutdown_nonboot_cpus() can be consistent. Signed-off-by: Pingfan Liu Cc: Eric Biederman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Donnefort Cc: Ingo Molnar Cc: Michael Ellerman Cc: Mark Rutland Cc: YueHaibing Cc: Baoku

Re: [PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo

2021-06-08 Thread Pingfan Liu
Correct mail address of Kazuhito On Tue, Jun 8, 2021 at 6:34 PM Pingfan Liu wrote: > > As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo: > Append 'MAX_PHYSMEM_BITS' to vmcoreinfo"), SECTION_SIZE_BITS in the > formula: > #define

[PATCH] crash_core, vmcoreinfo: Append 'SECTION_SIZE_BITS' to vmcoreinfo

2021-06-08 Thread Pingfan Liu
mpossible to be deduced from a crashdump vmcore. Hence append SECTION_SIZE_BITS to vmcoreinfo. Signed-off-by: Pingfan Liu Cc: Bhupesh Sharma Cc: Kazuhito Hagio Cc: Dave Young Cc: Baoquan He Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: James Morse Cc: Mark Rutland Cc: Will D

Re: [PATCHv5 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2021-04-13 Thread Pingfan Liu
On Sat, Apr 10, 2021 at 12:33 AM Michal Suchánek wrote: > > Hello, > > On Fri, Aug 28, 2020 at 04:10:09PM +0800, Pingfan Liu wrote: > > On Thu, Aug 27, 2020 at 3:53 PM Laurent Dufour > > wrote: > > > > > > Le 10/08/2020 à 10:52, Pingfan Liu a écrit

Re: [PATCH 0/3] warn and suppress irqflood

2020-10-25 Thread Pingfan Liu
On Thu, Oct 22, 2020 at 4:37 PM Thomas Gleixner wrote: > > On Thu, Oct 22 2020 at 13:56, Pingfan Liu wrote: > > I hit a irqflood bug on powerpc platform, and two years ago, on a x86 > > platform. > > When the bug happens, the kernel is totally occupies by irq. Currentl

Re: [PATCH] powerpc/time: enable sched clock for irqtime

2020-10-22 Thread Pingfan Liu
> needs an dedicated call to enable_sched_clock_irqtime() to enable irq time > accounting. > > Signed-off-by: Pingfan Liu > Cc: Michael Ellerman > Cc: Christophe Leroy > Cc: Nicholas Piggin > To: linuxppc-dev@lists.ozlabs.org > --- > arch/powerpc/kernel/time.c | 2 ++ > 1 file

[PATCH] powerpc/time: enable sched clock for irqtime

2020-10-22 Thread Pingfan Liu
to enable irq time accounting. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Christophe Leroy Cc: Nicholas Piggin To: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/time.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/ti

Re: [PATCHv5 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-08-28 Thread Pingfan Liu
On Thu, Aug 27, 2020 at 3:53 PM Laurent Dufour wrote: > > Le 10/08/2020 à 10:52, Pingfan Liu a écrit : > > A bug is observed on pseries by taking the following steps on rhel: > > -1. drmgr -c mem -r -q 5 > > -2. echo c > /proc/sysrq-trigger > > > > And

Re: [PATCHv5 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-08-26 Thread Pingfan Liu
Hello guys. Do you have further comments on this version? Thanks, Pingfan On Mon, Aug 10, 2020 at 4:53 PM Pingfan Liu wrote: > > A bug is observed on pseries by taking the following steps on rhel: > -1. drmgr -c mem -r -q 5 > -2. echo c > /proc/sysrq-trigger > > And then, t

[PATCHv5 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-08-10 Thread Pingfan Liu
for_each_drmem_lmb <-- The dt should still be only updated once, and just before the last memory online/offline event is ejected to user space. Achieve this by tracing the num of lmb added or removed. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Hari Bathini Cc: Nathan Lynch

[PATCHv5 1/2] powerpc/pseries: group lmb operation and memblock's

2020-08-10 Thread Pingfan Liu
This patch prepares for the incoming patch which swaps the order of KOBJ_ADD/REMOVE uevent and dt's updating. The dt updating should come after lmb operations, and before __remove_memory()/__add_memory(). Accordingly, grouping all lmb operations before the memblock's. Signed-off-by: P

Re: [PATCHv4 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-08-04 Thread Pingfan Liu
On Tue, Aug 4, 2020 at 12:29 AM Laurent Dufour wrote: > [...] > > lmb_set_nid(lmb); > > lmb->flags |= DRCONF_MEM_ASSIGNED; > > + if (dt_update) { > > + ret = drmem_update_dt(); > > + if (ret) > > + pr_warn("%s fail to update dt, but conti

Re: [PATCHv4 1/2] powerpc/pseries: group lmb operation and memblock's

2020-08-04 Thread Pingfan Liu
On Mon, Aug 3, 2020 at 9:52 PM Laurent Dufour wrote: > > > @@ -603,6 +606,8 @@ static int dlpar_add_lmb(struct drmem_lmb *lmb) > > } > > > > lmb_set_nid(lmb); > > + lmb->flags |= DRCONF_MEM_ASSIGNED; > > + > > block_sz = memory_block_size_bytes(); > > > > /* A

[PATCHv4 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-07-30 Thread Pingfan Liu
for_each_drmem_lmb <-- The dt should still be only updated once, and just before the last memory online/offline event is ejected to user space. Achieve this by tracing the num of lmb added or removed. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Hari Bathini Cc: Nathan Ly

[PATCHv4 1/2] powerpc/pseries: group lmb operation and memblock's

2020-07-30 Thread Pingfan Liu
This patch prepares for the incoming patch which swaps the order of KOBJ_ADD/REMOVE uevent and dt's updating. The dt updating should come after lmb operations, and before __remove_memory()/__add_memory(). Accordingly, grouping all lmb operations before the memblock's. Signed-off-by: P

Re: [PATCHv3 1/2] powerpc/pseries: group lmb operation and memblock's

2020-07-27 Thread Pingfan Liu
On Thu, Jul 23, 2020 at 10:41 PM Nathan Lynch wrote: > > Pingfan Liu writes: > > This patch prepares for the incoming patch which swaps the order of KOBJ_ > > uevent and dt's updating. > > > > It has no functional effect, just groups lmb operation and m

Re: [PATCHv3 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-07-24 Thread Pingfan Liu
On Thu, Jul 23, 2020 at 9:27 PM Nathan Lynch wrote: > > Pingfan Liu writes: > > A bug is observed on pseries by taking the following steps on rhel: > > -1. drmgr -c mem -r -q 5 > > -2. echo c > /proc/sysrq-trigger > > > > And then, the failure looks like: &

Re: [PATCHv3 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-07-22 Thread Pingfan Liu
On Wed, Jul 22, 2020 at 12:57 PM Michael Ellerman wrote: > > Pingfan Liu writes: > > A bug is observed on pseries by taking the following steps on rhel: > ^ >

[PATCHv3 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-07-21 Thread Pingfan Liu
s will introduce extra dt updating payload for each involved lmb when hotplug. But it should be fine since drmem_update_dt() is memory based operation and hotplug is not a hot path. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Hari Bathini Cc: Nathan Lynch To: linuxppc-dev@lists.o

[PATCHv3 1/2] powerpc/pseries: group lmb operation and memblock's

2020-07-21 Thread Pingfan Liu
This patch prepares for the incoming patch which swaps the order of KOBJ_ uevent and dt's updating. It has no functional effect, just groups lmb operation and memblock's in order to insert dt updating operation easily, and makes it easier to review. Signed-off-by: Pingfan Liu C

[PATCHv2 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-04-08 Thread Pingfan Liu
s will introduce extra dt updating payload for each involved lmb when hotplug. But it should be fine since drmem_update_dt() is memory based operation and hotplug is not a hot path. Signed-off-by: Pingfan Liu Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hari Bathi

[PATCHv2 1/2] powerpc/pseries: group lmb operation and memblock's

2020-04-08 Thread Pingfan Liu
This patch prepares for the incoming patch which swaps the order of KOBJ_ uevent and dt's updating. It has no functional effect, just groups lmb operation and memblock's in order to insert dt updating operation easily, and makes it easier to review. Signed-off-by: Pingfan Liu C

[PATCHv4] powerpc/crashkernel: take "mem=" option into account

2020-04-01 Thread Pingfan Liu
ffect of "mem=" takes a higher priority and pass through memblock_phys_mem_size() before calling reserve_crashkernel(). Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Hari Bathini Cc: Michael Ellerman Cc: ke...@lists.infradead.org --- v3 -> v4: fix total_mem_sz ba

Re: [PATCHv3 2/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-03-16 Thread Pingfan Liu
On Mon, Mar 16, 2020 at 10:53 AM Aneesh Kumar K.V wrote: > > On 3/4/20 2:17 PM, Pingfan Liu wrote: > > At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so > > if dumping to fsdax, it will take a very long time. > > >

Re: [PATCHv3 2/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-03-15 Thread Pingfan Liu
Appreciate for your kind review. And I have some comment as below. On Fri, Mar 13, 2020 at 11:18 AM Oliver O'Halloran wrote: > > On Wed, Mar 4, 2020 at 7:50 PM Pingfan Liu wrote: > > > > At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so > >

Re: [PATCHv3 1/2] powerpc/of: split out new_property() for reusing

2020-03-08 Thread Pingfan Liu
On Sat, Mar 7, 2020 at 3:59 AM Nathan Lynch wrote: > > Hi, > > Pingfan Liu writes: > > Splitting out new_property() for coming reusing and moving it to > > of_helpers.c. > > [...] > > > +struct property *new_property(const char *name, const int length

[PATCHv3 2/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-03-04 Thread Pingfan Liu
und address. On pseries, for kexec -l/-p kernel, there is no reset of hardware, and this step can be stepped around to save times. So the pmem bound address can be passed to the 2nd kernel through a dynamic added property "bound-addr" in dt node 'ibm,pmemory'. Signed-

[PATCHv3 1/2] powerpc/of: split out new_property() for reusing

2020-03-04 Thread Pingfan Liu
Splitting out new_property() for coming reusing and moving it to of_helpers.c. Also do some coding style cleanup. Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Hari Bathini Cc: Aneesh Kumar K.V Cc: Oliver

[PATCHv3 0/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-03-04 Thread Pingfan Liu
onnellan Cc: Christophe Leroy Cc: Rob Herring Cc: Frank Rowand Cc: ke...@lists.infradead.org Pingfan Liu (2): powerpc/of: split out new_property() for reusing pseries/scm: buffer pmem's bound addr in dt for kexec kernel arch/powerpc/platforms/pseries/of_h

[PATCHv2 2/2] pSeries/papr_scm: buffer pmem's bound addr in dt for kexec kernel

2020-02-28 Thread Pingfan Liu
und address. On pseries, for kexec -l/-p kernel, there is no reset of hardware, and this step can be stepped around to save times. So the pmem bound address can be passed to the 2nd kernel through a dynamic added property "bound-addr" in dt node 'ibm,pmemory'. Signed-

[PATCHv2 1/2] powerpc/of: split out new_property() for reusing

2020-02-28 Thread Pingfan Liu
Splitting out new_property() for coming reusing and moving it to of_helpers.c. Also do some coding style cleanup. Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Hari Bathini Cc: Aneesh Kumar K.V Cc: Oliver

Re: [PATCH 3/3] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-02-28 Thread Pingfan Liu
On Fri, Feb 28, 2020 at 2:52 PM Christophe Leroy wrote: > > > > Le 28/02/2020 à 06:53, Pingfan Liu a écrit : > > At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so > > if dumping to fsdax, it will take a very long time. > > > > Tak

Re: [PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Pingfan Liu
On Fri, Feb 28, 2020 at 2:03 PM Andrew Donnellan wrote: > > On 28/2/20 4:53 pm, Pingfan Liu wrote: > > Since new_property() is used in several calling sites, splitting it out for > > reusing. > > > > To ease the review, although the split out part has coding style i

[PATCH 3/3] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-02-27 Thread Pingfan Liu
und address. On pseries, for kexec -l/-p kernel, there is no reset of hardware, and this step can be stepped around to save times. So the pmem bound address can be passed to the 2nd kernel through a dynamic added property "bound-addr" in dt node 'ibm,pmemory'. Signed-

[PATCH 2/3] powerpc/of: coding style cleanup

2020-02-27 Thread Pingfan Liu
Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Hari Bathini Cc: Aneesh Kumar K.V Cc: Oliver O'Halloran Cc: Dan Williams Cc: ke...@lists.infradead.org --- arch/powerpc/kernel/of_property.c | 8 +-

[PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Pingfan Liu
Since new_property() is used in several calling sites, splitting it out for reusing. To ease the review, although the split out part has coding style issue, keeping it untouched and fixed in next patch. Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc

[PATCHv3] powerpc/crashkernel: take "mem=" option into account

2020-02-19 Thread Pingfan Liu
on other arches, the effect of "mem=" takes a higher priority and pass through memblock_phys_mem_size() before calling reserve_crashkernel(). Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Hari Bathini Cc: Michael Ellerman Cc: ke...@lists.infradead.org --- v2 ->

[PATCH 2/2] powerpc/pseries: update device tree before ejecting hotplug uevents

2020-02-10 Thread Pingfan Liu
before __remove_memory(), and accordingly the same rule in hot-add path. This will introduce extra dt updating payload for each involved lmb when hotplug. But it should be fine since drmem_update_dt() is memory based operation and hotplug is not a hot path. Signed-off-by: Pingfan Liu Cc: Michael Ellerm

[PATCH 1/2] powerpc/pseries: group lmb operation and memblock's

2020-02-10 Thread Pingfan Liu
This patch prepares for the incoming patch which swaps the order of KOBJ_ uevent and dt's updating. It has no functional effect, just groups lmb operation and memblock's in order to insert dt updating operation easily, and makes it easier to review. Signed-off-by: Pingfan Liu C

[PATCH] powerpc/pseries: in lmb_is_removable(), advance pfn if section is not present

2020-01-09 Thread Pingfan Liu
In lmb_is_removable(), if a section is not present, it should continue to test the rest sections in the block. But the current code fails to do so. Signed-off-by: Pingfan Liu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman To: linuxppc-dev@lists.ozlabs.org --- arch/powerpc

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-14 Thread Pingfan Liu
On Mon, Oct 14, 2019 at 10:03:03PM +0200, Jan Kara wrote: > On Mon 14-10-19 08:23:39, Eric Sandeen wrote: > > On 10/14/19 4:43 AM, Jan Kara wrote: > > > On Mon 14-10-19 16:33:15, Pingfan Liu wrote: > > > > On Sun, Oct 13, 2019 at 09:34:17AM -0700, Darrick J. Wong w

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-14 Thread Pingfan Liu
On Mon, Oct 14, 2019 at 08:23:39AM -0500, Eric Sandeen wrote: > On 10/14/19 4:43 AM, Jan Kara wrote: > > On Mon 14-10-19 16:33:15, Pingfan Liu wrote: > > > On Sun, Oct 13, 2019 at 09:34:17AM -0700, Darrick J. Wong wrote: > > > > On Sun, Oct 13, 2019 at 10:37

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-14 Thread Pingfan Liu
On Mon, Oct 14, 2019 at 01:40:27AM -0700, Christoph Hellwig wrote: > On Sun, Oct 13, 2019 at 10:37:00PM +0800, Pingfan Liu wrote: > > When using fadump (fireware assist dump) mode on powerpc, a mismatch > > between grub xfs driver and kernel xfs driver has been obsevered. Note: &

Re: [PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-14 Thread Pingfan Liu
On Sun, Oct 13, 2019 at 09:34:17AM -0700, Darrick J. Wong wrote: > On Sun, Oct 13, 2019 at 10:37:00PM +0800, Pingfan Liu wrote: > > When using fadump (fireware assist dump) mode on powerpc, a mismatch > > between grub xfs driver and kernel xfs driver has been obsevered. Note: >

[PATCH] xfs: introduce "metasync" api to sync metadata to fsblock

2019-10-13 Thread Pingfan Liu
ck explicitly. With this patch, metadata can be written to fsblock by: # update AIL sync # new introduced interface to flush metadata to fsblock mount -o remount,metasync mountpoint Signed-off-by: Pingfan Liu Cc: "Darrick J. Wong" Cc: Dave Chinner Cc: Eric Sandeen Cc: Hari Bat

Re: [PATCH] powerpc/crashkernel: take mem option into account

2019-09-22 Thread Pingfan Liu
On Wed, Sep 18, 2019 at 7:23 PM Michael Ellerman wrote: > > Pingfan Liu writes: > > Cc Kexec list. And keep the original content. > > > > On Thu, Sep 12, 2019 at 10:50 AM Pingfan Liu wrote: > >> > >> 'mem=" option is an easy way to put hig

Re: [PATCH] powerpc/crashkernel: take mem option into account

2019-09-16 Thread Pingfan Liu
Cc Kexec list. And keep the original content. On Thu, Sep 12, 2019 at 10:50 AM Pingfan Liu wrote: > > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence in stead of total mem, the effective usable memory size should > be considered

[PATCH] powerpc/crashkernel: take mem option into account

2019-09-11 Thread Pingfan Liu
4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G", and mem=5G on a 256G machine. Signed-off-by: Pingfan Liu Cc: Hari Bathini Cc: Michael Ellerman To: linuxppc-dev@lists.ozlabs.org --- v1 -> v2: fix the printk info about the total mem arch/powerpc/kernel/machine_kexec.c | 7 --- 1 fil

Re: [PATCH] powerpc/crashkernel: take mem option into account

2019-09-11 Thread Pingfan Liu
NACK it. Due to a miss the updating of printk info. I will send out V2 On Mon, Sep 9, 2019 at 12:05 PM Pingfan Liu wrote: > > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence in stead of total mem, the effective usable memory size should &

Re: [PATCH] powerpc/crashkernel: take mem option into account

2019-09-09 Thread Pingfan Liu
On Mon, Sep 9, 2019 at 12:05 PM Pingfan Liu wrote: > > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence in stead of total mem, the effective usable memory size should > be considered when reserving mem for crashkernel. Otherwise the bo

[PATCH] powerpc/crashkernel: take mem option into account

2019-09-08 Thread Pingfan Liu
4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G", and mem=5G. Signed-off-by: Pingfan Liu Cc: Hari Bathini Cc: Michael Ellerman To: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/machine_kexec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kerne

  1   2   >