Re: [PATCH v4 00/10] Introduce SMT level and add PowerPC support

2023-08-10 Thread Laurent Dufour
Le 10/08/2023 à 08:23, Michael Ellerman a écrit : Thomas Gleixner writes: Laurent, Michael! On Wed, Jul 05 2023 at 16:51, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2]. This series is addressing

Re: [PATCH v4 00/10] Introduce SMT level and add PowerPC support

2023-07-31 Thread Laurent Dufour
Le 28/07/2023 à 09:58, Thomas Gleixner a écrit : Laurent, Michael! On Wed, Jul 05 2023 at 16:51, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2]. This series is addressing the comments sent by Thomas

[PATCH] powerpc/kexec: fix minor typo

2023-07-25 Thread Laurent Dufour
Function name in the descriptor was not correct. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307251721.bugcsceq-...@intel.com/ Signed-off-by: Laurent Dufour --- arch/powerpc/kexec/file_load_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: [PATCH v4 00/10] Introduce SMT level and add PowerPC support

2023-07-10 Thread Laurent Dufour
Ecores without HT), and it works as expected. So, for patch 1~7 in this series, Tested-by: Zhang Rui Thanks Rui! thanks, rui On Wed, 2023-07-05 at 16:51 +0200, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2

[PATCH v4 02/10] cpu/SMT: Move SMT prototypes into cpu_smt.h

2023-07-05 Thread Laurent Dufour
header. Signed-off-by: Michael Ellerman [ldufour: rewording the commit's description] Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 ++ include/linux/cpu.h | 25 + include/linux/cpu_smt.h | 29

[PATCH v4 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v4 09/10] powerpc: Add HOTPLUG_SMT support

2023-07-05 Thread Laurent Dufour
_supported] [ldufour: remove topology_smt_threads_supported] [ldufour: select CONFIG_SMT_NUM_THREADS_DYNAMIC] [ldufour: update kernel-parameters.txt] Signed-off-by: Laurent Dufour --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/powerpc/Kconfig|

[PATCH v4 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-07-05 Thread Laurent Dufour
ldufour: fix build issue in control_show()] Signed-off-by: Laurent Dufour --- .../ABI/testing/sysfs-devices-system-cpu | 1 + kernel/cpu.c | 60 ++- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/Documentation/ABI/testing/sysfs

[PATCH v4 06/10] cpu/SMT: Create topology_smt_thread_allowed()

2023-07-05 Thread Laurent Dufour
to move from a higher to lower number of threads online. Signed-off-by: Michael Ellerman Suggested-by: Thomas Gleixner [ldufour: slightly reword the commit's description] [ldufour: introduce CONFIG_SMT_NUM_THREADS_DYNAMIC] Signed-off-by: Laurent Dufour --- arch/Kconfig | 3 +++ kernel/cpu.c

[PATCH v4 08/10] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman As part of the generic HOTPLUG_SMT code, there is support for disabling secondary SMT threads at boot time, by passing "nosmt" on the kernel command line. The way that is implemented is the secondary threads are brought partly online, and then taken back offline again.

[PATCH v4 05/10] cpu/SMT: Remove topology_smt_supported()

2023-07-05 Thread Laurent Dufour
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know if SMT is supported. Cc: Michael Ellerman Suggested-by: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 -- arch/x86/kernel/smpboot.c

[PATCH v4 03/10] cpu/SMT: Move smt/control simple exit cases earlier

2023-07-05 Thread Laurent Dufour
From: Michael Ellerman Move the simple exit cases, ie. which don't depend on the value written, earlier in the function. That makes it clearer that regardless of the input those states can not be transitioned out of. That does have a user-visible effect, in that the error returned will now

[PATCH v4 00/10] Introduce SMT level and add PowerPC support

2023-07-05 Thread Laurent Dufour
[2] https://lore.kernel.org/linuxppc-dev/20230331153905.31698-1-lduf...@linux.ibm.com/ Laurent Dufour (2): cpu/hotplug: remove dependancy against cpu_primary_thread_mask cpu/SMT: Remove topology_smt_supported() Michael Ellerman (8): cpu/SMT: Move SMT prototypes into cpu_smt.h cpu/SMT: Move s

[PATCH v4 04/10] cpu/SMT: Store the current/max number of threads

2023-07-05 Thread Laurent Dufour
pass that value. Signed-off-by: Michael Ellerman [ldufour: slightly reword the commit message] [ldufour: rename cpu_smt_check_topology and add a num_threads argument] Signed-off-by: Laurent Dufour --- arch/x86/kernel/cpu/common.c | 2 +- include/linux/cpu_smt.h | 8 ++-- kernel/cpu.c

[PATCH v4 01/10] cpu/hotplug: remove dependancy against cpu_primary_thread_mask

2023-07-05 Thread Laurent Dufour
_primary_thread_mask() and cpuhp_smt_aware() are only used when CONFIG_HOTPLUG_PARALLEL is set, don't define them when it is not set. There is no functional change introduce by that patch. Cc: Thomas Gleixner Signed-off-by: Laurent Dufour --- kernel/cpu.c | 24 ++-- 1 file ch

Re: [PATCH v3 3/9] cpu/SMT: Store the current/max number of threads

2023-07-05 Thread Laurent Dufour
Le 05/07/2023 à 05:05, Zhang, Rui a écrit : On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: From: Michael Ellerman Some architectures allows partial SMT states at boot time, s/allows/allow. Thanks Rui !

Re: [PATCH v3 6/9] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-07-05 Thread Laurent Dufour
Le 05/07/2023 à 05:14, Zhang, Rui a écrit : On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: @@ -2580,6 +2597,17 @@ static ssize_t control_show(struct device *dev,  { const char *state = smt_states[cpu_smt_control]; +#ifdef CONFIG_HOTPLUG_SMT

Re: [PATCH v3 0/9] Introduce SMT level and add PowerPC support

2023-07-05 Thread Laurent Dufour
came into the PowerPC next branch. I'm working on a rebase. Cheers, Laurent. thanks, rui On Thu, 2023-06-29 at 16:31 +0200, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2].  This series is addressing

Re: [PATCH v3 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-30 Thread Laurent Dufour
Hi Michael, Le 29/06/2023 à 16:31, Laurent Dufour a écrit : From: Michael Ellerman Add support for HOTPLUG_SMT, which enables the generic sysfs SMT support files in /sys/devices/system/cpu/smt, as well as the "nosmt" boot parameter. Implement the recently added hooks to allow p

Re: [PATCH v3 0/9] Introduce SMT level and add PowerPC support

2023-06-30 Thread Laurent Dufour
Le 30/06/2023 à 15:32, Sachin Sant a écrit : On 29-Jun-2023, at 8:01 PM, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2]. This series is addressing the comments sent by Thomas and me on the Michael's

[PATCH v3 2/9] cpu/SMT: Move smt/control simple exit cases earlier

2023-06-29 Thread Laurent Dufour
From: Michael Ellerman Move the simple exit cases, ie. which don't depend on the value written, earlier in the function. That makes it clearer that regardless of the input those states can not be transitioned out of. That does have a user-visible effect, in that the error returned will now

[PATCH v3 5/9] cpu/SMT: Create topology_smt_thread_allowed()

2023-06-29 Thread Laurent Dufour
to move from a higher to lower number of threads online. Signed-off-by: Michael Ellerman Suggested-by: Thomas Gleixner [ldufour: slightly reword the commit's description] [ldufour: introduce CONFIG_SMT_NUM_THREADS_DYNAMIC] Signed-off-by: Laurent Dufour --- arch/Kconfig | 3 +++ kernel/cpu.c

[PATCH v3 6/9] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-29 Thread Laurent Dufour
ldufour: fix build issue in control_show()] Signed-off-by: Laurent Dufour --- .../ABI/testing/sysfs-devices-system-cpu | 1 + kernel/cpu.c | 60 ++- 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/Documentation/ABI/testing/sysfs

[PATCH v3 9/9] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-06-29 Thread Laurent Dufour
From: Michael Ellerman Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v3 4/9] cpu/SMT: Remove topology_smt_supported()

2023-06-29 Thread Laurent Dufour
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know if SMT is supported. Cc: Michael Ellerman Suggested-by: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 -- arch/x86/kernel/smpboot.c

[PATCH v3 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-29 Thread Laurent Dufour
_supported] [ldufour: remove topology_smt_threads_supported] [ldufour: select CONFIG_SMT_NUM_THREADS_DYNAMIC] [ldufour: update kernel-parameters.txt] Signed-off-by: Laurent Dufour --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/powerpc/Kconfig|

[PATCH v3 3/9] cpu/SMT: Store the current/max number of threads

2023-06-29 Thread Laurent Dufour
pass that value. Signed-off-by: Michael Ellerman [ldufour: slightly reword the commit message] [ldufour: rename cpu_smt_check_topology and add a num_threads argument] Signed-off-by: Laurent Dufour --- arch/x86/kernel/cpu/bugs.c | 3 ++- include/linux/cpu_smt.h| 8 ++-- kernel/cpu.c

[PATCH v3 7/9] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-06-29 Thread Laurent Dufour
From: Michael Ellerman As part of the generic HOTPLUG_SMT code, there is support for disabling secondary SMT threads at boot time, by passing "nosmt" on the kernel command line. The way that is implemented is the secondary threads are brought partly online, and then taken back offline again.

[PATCH v3 0/9] Introduce SMT level and add PowerPC support

2023-06-29 Thread Laurent Dufour
Introduce CONFIG_SMT_NUM_THREADS_DYNAMIC Remove switch() in __store_smt_control() Update kernel-parameters.txt [1] https://lore.kernel.org/linuxppc-dev/20230524155630.794584-1-...@ellerman.id.au/ [2] https://lore.kernel.org/linuxppc-dev/20230331153905.31698-1-lduf...@linux.ibm.com/ Laurent Dufour (1):

[PATCH v3 1/9] cpu/SMT: Move SMT prototypes into cpu_smt.h

2023-06-29 Thread Laurent Dufour
header. Signed-off-by: Michael Ellerman [ldufour: rewording the commit's description] Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 ++ include/linux/cpu.h | 25 + include/linux/cpu_smt.h | 29

Re: [PATCH v2 0/9] Introduce SMT level and add PowerPC support

2023-06-29 Thread Laurent Dufour
Le 29/06/2023 à 13:10, Michael Ellerman a écrit : Sachin Sant writes: On 28-Jun-2023, at 3:35 PM, Laurent Dufour wrote: I'm taking over the series Michael sent previously [1] which is smartly reviewing the initial series I sent [2]. This series is addressing the comments sent by Thomas

[PATCH v2 0/9] Introduce SMT level and add PowerPC support

2023-06-28 Thread Laurent Dufour
ove switch() in __store_smt_control() Update kernel-parameters.txt [1] https://lore.kernel.org/linuxppc-dev/20230524155630.794584-1-...@ellerman.id.au/ [2] https://lore.kernel.org/linuxppc-dev/20230331153905.31698-1-lduf...@linux.ibm.com/ Laurent Dufour (1): cpu/SMT: Remove topology_smt_supported(

[PATCH v2 7/9] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-06-28 Thread Laurent Dufour
From: Michael Ellerman As part of the generic HOTPLUG_SMT code, there is support for disabling secondary SMT threads at boot time, by passing "nosmt" on the kernel command line. The way that is implemented is the secondary threads are brought partly online, and then taken back offline again.

[PATCH v2 4/9] cpu/SMT: Remove topology_smt_supported()

2023-06-28 Thread Laurent Dufour
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know if SMT is supported. Cc: Michael Ellerman Suggested-by: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 -- arch/x86/kernel/smpboot.c

[PATCH v2 2/9] cpu/SMT: Move smt/control simple exit cases earlier

2023-06-28 Thread Laurent Dufour
From: Michael Ellerman Move the simple exit cases, ie. which don't depend on the value written, earlier in the function. That makes it clearer that regardless of the input those states can not be transitioned out of. That does have a user-visible effect, in that the error returned will now

[PATCH v2 9/9] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-06-28 Thread Laurent Dufour
From: Michael Ellerman Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH v2 3/9] cpu/SMT: Store the current/max number of threads

2023-06-28 Thread Laurent Dufour
pass that value. Signed-off-by: Michael Ellerman [ldufour: slightly reword the commit message] [ldufour: rename cpu_smt_check_topology and add a num_threads argument] Signed-off-by: Laurent Dufour --- arch/x86/kernel/cpu/bugs.c | 3 ++- include/linux/cpu_smt.h| 8 ++-- kernel/cpu.c

[PATCH v2 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-28 Thread Laurent Dufour
_supported] [ldufour: remove topology_smt_threads_supported] [ldufour: select CONFIG_SMT_NUM_THREADS_DYNAMIC] [ldufour: update kernel-parameters.txt] Signed-off-by: Laurent Dufour --- Documentation/admin-guide/kernel-parameters.txt | 4 ++-- arch/powerpc/Kconfig|

[PATCH v2 5/9] cpu/SMT: Create topology_smt_thread_allowed()

2023-06-28 Thread Laurent Dufour
to move from a higher to lower number of threads online. Signed-off-by: Michael Ellerman Suggested-by: Thomas Gleixner [ldufour: slightly reword the commit's description] [ldufour: introduce CONFIG_SMT_NUM_THREADS_DYNAMIC] Signed-off-by: Laurent Dufour --- arch/Kconfig | 3 +++ kernel/cpu.c

[PATCH v2 1/9] cpu/SMT: Move SMT prototypes into cpu_smt.h

2023-06-28 Thread Laurent Dufour
header. Signed-off-by: Michael Ellerman [ldufour: rewording the commit's description] Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 ++ include/linux/cpu.h | 25 + include/linux/cpu_smt.h | 29

[PATCH v2 6/9] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-28 Thread Laurent Dufour
SMT states, like PowerPC, should define it. Signed-off-by: Michael Ellerman [ldufour: slightly reword the commit's description] [ldufour: remove switch() in __store_smt_control()] Signed-off-by: Laurent Dufour --- .../ABI/testing/sysfs-devices-system-cpu | 1 + kernel/cpu

[PATCH 04/10] cpu/SMT: Remove topology_smt_supported()

2023-06-15 Thread Laurent Dufour
Since the maximum number of threads is now passed to cpu_smt_set_num_threads(), checking that value is enough to know if SMT is supported. Cc: Michael Ellerman Suggested-by: Thomas Gleixner Signed-off-by: Laurent Dufour --- arch/x86/include/asm/topology.h | 2 -- arch/x86/kernel/smpboot.c

[PATCH 08/10] powerpc/pseries: Initialise CPU hotplug callbacks earlier

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman As part of the generic HOTPLUG_SMT code, there is support for disabling secondary SMT threads at boot time, by passing "nosmt" on the kernel command line. The way that is implemented is the secondary threads are brought partly online, and then taken back offline again.

[PATCH 01/10] cpu/SMT: Move SMT prototypes into cpu_smt.h

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman A subsequent patch would like to use the cpuhp_smt_control enum as part of the interface between generic and arch code. Currently that leads to circular header dependencies. So split the enum and related declarations into a separate header. Signed-off-by: Michael

[PATCH 03/10] cpu/SMT: Store the current/max number of threads

2023-06-15 Thread Laurent Dufour
, also pass that value. Signed-off-by: Michael Ellerman [ldufour: slightly reword the commit message] [ldufour: rename cpu_smt_check_topology and add a num_threads argument] Signed-off-by: Laurent Dufour --- arch/x86/kernel/cpu/bugs.c | 3 ++- include/linux/cpu_smt.h| 8 ++-- kernel

[PATCH 09/10] powerpc: Add HOTPLUG_SMT support

2023-06-15 Thread Laurent Dufour
_supported] Signed-off-by: Laurent Dufour --- arch/powerpc/Kconfig| 1 + arch/powerpc/include/asm/topology.h | 20 arch/powerpc/kernel/smp.c | 8 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/power

[PATCH 07/10] cpu/SMT: Allow enabling partial SMT states via sysfs

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman Add support to the /sys/devices/system/cpu/smt/control interface for enabling a specified number of SMT threads per core, including partial SMT states where not all threads are brought online. The current interface accepts "on" and "off", to enable either 1 or all SMT

[PATCH 02/10] cpu/SMT: Move smt/control simple exit cases earlier

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman Move the simple exit cases, ie. which don't depend on the value written, earlier in the function. That makes it clearer that regardless of the input those states can not be transitioned out of. That does have a user-visible effect, in that the error returned will now

[PATCH 00/10] Introduce SMT level and add PowerPC support

2023-06-15 Thread Laurent Dufour
and a "at boot" level, and controling whether a thread should be onlined or not. [1] https://lore.kernel.org/linuxppc-dev/20230524155630.794584-1-...@ellerman.id.au/ [2] https://lore.kernel.org/linuxppc-dev/20230331153905.31698-1-lduf...@linux.ibm.com/ Laurent Dufour (1): cpu/S

[PATCH 06/10] cpu/SMT: Create topology_smt_thread_allowed()

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman A subsequent patch will enable partial SMT states, ie. when not all SMT threads are brought online. To support that, add an arch helper which checks whether a given CPU is allowed to be brought online depending on how many SMT threads are currently enabled. Call the

[PATCH 10/10] powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 05/10] cpu/SMT: Create topology_smt_threads_supported()

2023-06-15 Thread Laurent Dufour
From: Michael Ellerman A subsequent patch will enable partial SMT states, ie. when not all SMT threads are brought online. To support that, add an arch helper to check how many SMT threads are supported. To retain existing behaviour, the x86 implementation only allows a single thread or all

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-14 Thread Laurent Dufour
On 13/06/2023 20:53:56, Thomas Gleixner wrote: > On Tue, Jun 13 2023 at 19:16, Laurent Dufour wrote: >> On 10/06/2023 23:26:18, Thomas Gleixner wrote: >>> On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: >>>> #ifdef CONFIG_HOTPLUG_SMT >>>&g

Re: [PATCH 3/9] cpu/SMT: Store the current/max number of threads

2023-06-13 Thread Laurent Dufour
On 10/06/2023 23:26:18, Thomas Gleixner wrote: > On Thu, May 25 2023 at 01:56, Michael Ellerman wrote: >> #ifdef CONFIG_HOTPLUG_SMT >> enum cpuhp_smt_control cpu_smt_control __read_mostly = CPU_SMT_ENABLED; >> +static unsigned int cpu_smt_max_threads __ro_after_init; >> +unsigned int

Re: [PATCH 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-12 Thread Laurent Dufour
On 10/06/2023 23:10:02, Thomas Gleixner wrote: > On Thu, Jun 01 2023 at 18:19, Laurent Dufour wrote: >> @@ -435,12 +435,17 @@ void __init cpu_smt_disable(bool force) >> * The decision whether SMT is supported can only be done after the full >> * CPU identification. Cal

Re: [PATCH 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-01 Thread Laurent Dufour
On 01/06/2023 15:27:30, Laurent Dufour wrote: > On 24/05/2023 17:56:29, Michael Ellerman wrote: >> Add support for HOTPLUG_SMT, which enables the generic sysfs SMT support >> files in /sys/devices/system/cpu/smt, as well as the "nosmt" boot >> parameter.

Re: [PATCH 8/9] powerpc: Add HOTPLUG_SMT support

2023-06-01 Thread Laurent Dufour
On 24/05/2023 17:56:29, Michael Ellerman wrote: > Add support for HOTPLUG_SMT, which enables the generic sysfs SMT support > files in /sys/devices/system/cpu/smt, as well as the "nosmt" boot > parameter. Hi Michael, It seems that there is now a conflict between with the PPC 'smt-enabled' boot

Re: [PATCH v10 4/5] crash: forward memory_notify args to arch crash hotplug handler

2023-04-24 Thread Laurent Dufour
t. > > How passing memory_notify to arch crash hotplug handler will help? > > memory_notify holds the start PFN and page count of the hot removed > memory. With that base address and the size of the hot removed memory > can be calculated and same can be used to avoid adding

Re: [PATCH v10 5/5] powerpc/kexec: add crash memory hotplug support

2023-04-24 Thread Laurent Dufour
oredhr with additional space to > accommodate future memory regions as it is done for kexec_file_load > system call in the kernel. > > Signed-off-by: Sourabh Jain > Reviewed-by: Laurent Dufour I don't remember sending a review-by on this patch earlier, do you? > --

Re: [PATCH v10 3/5] powerpc/crash: add crash CPU hotplug support

2023-04-24 Thread Laurent Dufour
will also work for the kexec_load system call > given that the kexec tool builds the FDT segment with additional space > to accommodate possible CPU nodes. > > Since memory crash hotplug support is not there yet the crash hotplug > the handler simply warns the user and returns.

Re: [PATCH v10 2/5] powerpc/crash: introduce a new config option CRASH_HOTPLUG

2023-04-24 Thread Laurent Dufour
. > This arch-specific handler is triggered from a generic crash handler > that registers with the CPU/Memory add/remove notifiers. > > The CRASH_HOTPLUG config option is enabled by default. > > Signed-off-by: Sourabh Jain > Reviewed-by: Laurent Dufour I can't remember having sent

Re: [PATCH 1/2] pseries/smp: export the smt level in the SYS FS.

2023-04-13 Thread Laurent Dufour
On 13/04/2023 15:37:59, Michael Ellerman wrote: > Hi Laurent, > > Laurent Dufour writes: >> There is no SMT level recorded in the kernel neither in user space. >> Indeed there is no real constraint about that and mixed SMT levels are >> allowed and system is working f

Re: [PATCH 1/2] pseries/smp: export the smt level in the SYS FS.

2023-04-03 Thread Laurent Dufour
On 31/03/2023 18:05:27, Michal Suchánek wrote: > Hello, > > On Fri, Mar 31, 2023 at 05:39:04PM +0200, Laurent Dufour wrote: >> There is no SMT level recorded in the kernel neither in user space. >> Indeed there is no real constraint about that and mixed SMT levels are

[PATCH 0/2] Online new threads according to the current SMT level

2023-03-31 Thread Laurent Dufour
set at boot time, even if no kernel option is specified. The change is specific to pseries since CPU hot-plug is only provided for this platform. The second patch of this series is implementing the change to online only the right number of threads when a new CPU is added. Laurent Dufour (2

[PATCH 2/2] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-03-31 Thread Laurent Dufour
the smt-enabled kernel option. This way on a LPAR running in SMT=4, newly added CPU will be running 4 threads, which is what a end user would expect. Cc: Srikar Dronamraju Signed-off-by: Laurent Dufour --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 18 +- arch/powerpc/platforms

[PATCH 1/2] pseries/smp: export the smt level in the SYS FS.

2023-03-31 Thread Laurent Dufour
ppc64_cpu should update the sysfs when changing the SMT level to keep the system consistent. Suggested-by: Srikar Dronamraju Signed-off-by: Laurent Dufour --- arch/powerpc/platforms/pseries/pseries.h | 3 ++ arch/powerpc/platforms/pseries/smp.c | 39 2 files changed, 42

Re: [PATCH] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-03-31 Thread Laurent Dufour
On 30/03/2023 18:19:38, Michal Suchánek wrote: > On Thu, Mar 30, 2023 at 05:51:57PM +0200, Laurent Dufour wrote: >> On 13/02/2023 16:40:50, Nathan Lynch wrote: >>> Michal Suchánek writes: >>>> On Mon, Feb 13, 2023 at 08:46:50AM -0600, Nathan Lynch wrote: >>>

Re: [PATCH] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-03-30 Thread Laurent Dufour
On 13/02/2023 16:40:50, Nathan Lynch wrote: > Michal Suchánek writes: >> On Mon, Feb 13, 2023 at 08:46:50AM -0600, Nathan Lynch wrote: >>> Laurent Dufour writes: >>>> When a new CPU is added, the kernel is activating all its threads. This >>>> leads to

Re: [PATCH v9 3/6] powerpc/crash: add a new member to the kimage_arch struct

2023-03-13 Thread Laurent Dufour
On 12/03/2023 19:11:51, Sourabh Jain wrote: > A new member "fdt_index" is added to the kimage_arch struct to hold > the index of the FDT (Flattened Device Tree) segment from the kexec > the segment array. > > fdt_index will provide direct access to the FDT segment in the kexec > segment array

Re: [PATCH v9 1/6] powerpc/kexec: turn some static helper functions public

2023-03-13 Thread Laurent Dufour
r in the series, these functions are utilized to do in-kernel update to > kexec segments on CPU/Memory hotplug events for both kexec_load and > kexec_file_load syscalls. > > No functional change intended. > FWIW, despite the 2 minor typos above, Reviewed-by: Laurent Dufour > Signed-of

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
: 169db3bb4609 ("powerc/mm: try VMA lock-based page fault handling first") Reported-by: Sachin Sant Link: https://lore.kernel.org/linux-mm/842502fb-f99c-417c-9648-a37d0ecdc...@linux.ibm.com Cc: Suren Baghdasaryan Signed-off-by: Laurent Dufour --- arch/powerpc/mm/fault.c | 8 ++-- 1 fi

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
On 06/03/2023 15:07:26, David Hildenbrand wrote: > On 06.03.23 14:55, Laurent Dufour wrote: >> When page fault is tried holding the per VMA lock, bad_access_pkey() and >> bad_access() should not be called because it is assuming the mmap_lock is >> held. >> In the ca

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
: 169db3bb4609 ("powerc/mm: try VMA lock-based page fault handling first") Reported-by: Sachin Sant Link: https://lore.kernel.org/linux-mm/842502fb-f99c-417c-9648-a37d0ecdc...@linux.ibm.com Cc: Suren Baghdasaryan Signed-off-by: Laurent Dufour --- arch/powerpc/mm/fault.c | 8 ++-- 1 fi

Re: Selftests powerpc/primitives test hangs (linux-next)

2023-03-06 Thread Laurent Dufour
On 03/03/2023 10:19:29, Sachin Sant wrote: > While running powerpc/primitives selftests, the test (load_unaligned_zeropad) > hangs indefinitely. This behaviour is seen with linux-next 6.2.0-next-20230303 > on a Power10 logical partition. > > Git bisect points to following commit > > commit

Re: [PATCH] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-02-14 Thread Laurent Dufour
On 13/02/2023 16:40:50, Nathan Lynch wrote: > Michal Suchánek writes: >> On Mon, Feb 13, 2023 at 08:46:50AM -0600, Nathan Lynch wrote: >>> Laurent Dufour writes: >>>> When a new CPU is added, the kernel is activating all its threads. This >>>> leads to

[PATCH] powerpc/pseries/cpuhp: respect current SMT when adding new CPU

2023-02-13 Thread Laurent Dufour
on a LPAR running in SMT=4, newly added CPU will be running 4 threads, which is what a end user would expect. Cc: Srikar Dronamraju Signed-off-by: Laurent Dufour --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 24 1 file changed, 19 insertions(+), 5 deletions(-) diff

Re: [PATCH v2 3/4] powerpc/rtas: remove lock and args fields from global rtas struct

2023-01-24 Thread Laurent Dufour
opriate spacing around > operators and cause checkpatch errors; fix these as well. Reviewed-by: Laurent Dufour > > Suggested-by: Laurent Dufour > Signed-off-by: Nathan Lynch > --- > arch/powerpc/include/asm/rtas-types.h | 2 -- > arch/powerpc/kernel/rtas.c|

Re: [PATCH v2 2/4] powerpc/rtas: make all exports GPL

2023-01-24 Thread Laurent Dufour
backward once it is upstream. Crossing fingers! Reviewed-by: Laurent Dufour > > Signed-off-by: Nathan Lynch > --- > arch/powerpc/kernel/rtas.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/arch/powerpc/kernel

Re: [PATCH v7 4/8] crash: add phdr for possible CPUs in elfcorehdr

2023-01-20 Thread Laurent Dufour
On 19/01/2023 19:29:52, Laurent Dufour wrote: > On 15/01/2023 16:02:02, Sourabh Jain wrote: >> On architectures like PowerPC the crash notes are available for all >> possible CPUs. So let's populate the elfcorehdr for all possible >> CPUs having crash notes to avoid updat

Re: [PATCH v7 3/8] powerpc/crash: update kimage_arch struct

2023-01-19 Thread Laurent Dufour
On 15/01/2023 16:02:01, Sourabh Jain wrote: > Add a new member "fdt_index" to kimage_arch struct to hold the index of > the FDT (Flattened Device Tree) segment in the kexec segment array. > > Having direct access to FDT segment will help arch crash hotplug handler > to avoid looping kexec segment

Re: [PATCH v7 4/8] crash: add phdr for possible CPUs in elfcorehdr

2023-01-19 Thread Laurent Dufour
On 15/01/2023 16:02:02, Sourabh Jain wrote: > On architectures like PowerPC the crash notes are available for all > possible CPUs. So let's populate the elfcorehdr for all possible > CPUs having crash notes to avoid updating elfcorehdr during in-kernel > crash update on CPU hotplug events. > >

Re: [PATCH] powerpc/rtas: upgrade internal arch spinlocks

2023-01-12 Thread Laurent Dufour
is only used in that file. I think, this would be good, in case of future change about that lock, and in order to not break KABI, to move it out of that structure, and to define it statically in that file. Otherwise, looks good to me. Reviewed-by: Laurent Dufour > > @@ -80,28

[PATCH] pseries/mobility: reset the RCU watchdogs after a LPM

2022-11-25 Thread Laurent Dufour
The RCU watchdog timer should be reset when restarting the CPU after a Live Partition Mobility operation. Signed-off-by: Laurent Dufour --- arch/powerpc/platforms/pseries/mobility.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/mobility.c

[PATCH] powerpc/pseries: unregister VPA when hot unplugging a CPU

2022-11-14 Thread Laurent Dufour
an unexpected value and kill the LPAR. Suggested-by: Nathan Lynch Signed-off-by: Laurent Dufour --- arch/powerpc/platforms/pseries/hotplug-cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index

[PATCH v2 0/2] Consider the size of the added CPU nodes in the kexec FDT

2022-11-10 Thread Laurent Dufour
tested on a PowerVM LPAR running with than 256 CPUs in shared mode, adding 320 CPUs to this LPAR. Changes in v2: - Fix build issue, moving definition in prom.h Laurent Dufour (2): powerpc: export the CPU node count powerpc: Take in account addition CPU node when building kexec FDT arch

[PATCH v2 2/2] powerpc: Take in account addition CPU node when building kexec FDT

2022-11-10 Thread Laurent Dufour
of additional CPU nodes. The assumption is that the size of the CPU node is _same_ for all the node, the only variable part should be the name "PowerPC,POWERxx@##" where "##" may vary a bit. Signed-off-by: Laurent Dufour --- arch/powerpc/kexec

[PATCH v2 1/2] powerpc: export the CPU node count

2022-11-10 Thread Laurent Dufour
-by: Laurent Dufour --- arch/powerpc/include/asm/prom.h | 1 + arch/powerpc/kernel/prom.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index 2e82820fbd64..c0107d8ddd8c 100644 --- a/arch/powerpc/include/asm/prom.h +++ b

Re: [PATCH 1/2] powerpc: export the CPU node count

2022-11-07 Thread Laurent Dufour
On 07/11/2022 13:11:17, Nicholas Piggin wrote: > On Sat Oct 29, 2022 at 2:00 AM AEST, Laurent Dufour wrote: >> At boot time, the FDT is parsed to compute the number of CPUs. >> In addition count the number of CPU nodes and export it. >> >> This is useful when building t

[PATCH 2/2] powerpc: Take in account addition CPU node when building kexec FDT

2022-10-28 Thread Laurent Dufour
of additional CPU nodes. The assumption is that the size of the CPU node is _same_ for all the node, the only variable part should be the name "PowerPC,POWERxx@##" where "##" may vary a bit. Signed-off-by: Laurent Dufour --- arch/powerpc/kexec

[PATCH 1/2] powerpc: export the CPU node count

2022-10-28 Thread Laurent Dufour
-by: Laurent Dufour --- arch/powerpc/include/asm/kexec_ranges.h | 2 ++ arch/powerpc/kernel/prom.c | 4 2 files changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/kexec_ranges.h b/arch/powerpc/include/asm/kexec_ranges.h index f83866a19e87..bf35d00ddd09 100644 --- a/arch

[PATCH 0/2] Consider the size of the added CPU nodes in the kexec FDT

2022-10-28 Thread Laurent Dufour
tested on a PowerVM LPAR running with than 256 CPUs in shared mode, adding 320 CPUs to this LPAR. Laurent Dufour (2): powerpc: export the CPU node count powerpc: Take in account addition CPU node when building kexec FDT arch/powerpc/include/asm/kexec_ranges.h | 2 + arch/powerpc/kernel

Re: [PATCH 11/17] powerpc/qspinlock: allow propagation of yield CPU down the queue

2022-10-06 Thread Laurent Dufour
On 28/07/2022 08:31:14, Nicholas Piggin wrote: > Having all CPUs poll the lock word for the owner CPU that should be > yielded to defeats most of the purpose of using MCS queueing for > scalability. Yet it may be desirable for queued waiters to to yield > to a preempted owner. > > s390 addreses

Re: [PATCH 16/17] powerpc/qspinlock: allow indefinite spinning on a preempted owner

2022-09-22 Thread Laurent Dufour
On 28/07/2022 08:31:19, Nicholas Piggin wrote: > Provide an option that holds off queueing indefinitely while the lock > owner is preempted. This could reduce queueing latencies for very > overcommitted vcpu situations. > > This is disabled by default. Hi Nick, I should have missed something

Re: [RFC PATCH RESEND 28/28] kernel/fork: throttle call_rcu() calls in vm_area_free

2022-09-09 Thread Laurent Dufour
Le 09/09/2022 à 18:02, Suren Baghdasaryan a écrit : > On Fri, Sep 9, 2022 at 8:19 AM Laurent Dufour wrote: >> >> Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : >>> call_rcu() can take a long time when callback offloading is enabled. >>> Its use in the v

Re: [RFC PATCH RESEND 10/28] mm/mmap: mark VMAs as locked in vma_adjust

2022-09-09 Thread Laurent Dufour
Le 09/09/2022 à 02:51, Suren Baghdasaryan a écrit : > On Tue, Sep 6, 2022 at 8:35 AM Laurent Dufour wrote: >> >> Le 01/09/2022 à 19:34, Suren Baghdasaryan a écrit : >>> vma_adjust modifies a VMA and possibly its neighbors. Mark them as locked >>> before making

Re: [RFC PATCH RESEND 28/28] kernel/fork: throttle call_rcu() calls in vm_area_free

2022-09-09 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > call_rcu() can take a long time when callback offloading is enabled. > Its use in the vm_area_free can cause regressions in the exit path when > multiple VMAs are being freed. To minimize that impact, place VMAs into > a list and free them in

Re: [RFC PATCH RESEND 21/28] mm: introduce find_and_lock_anon_vma to be used from arch-specific code

2022-09-09 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > Introduce find_and_lock_anon_vma function to lookup and lock an anonymous > VMA during page fault handling. When VMA is not found, can't be locked > or changes after being locked, the function returns NULL. The lookup is > performed under RCU

Re: [RFC PATCH RESEND 20/28] mm: introduce per-VMA lock statistics

2022-09-09 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > Add a new CONFIG_PER_VMA_LOCK_STATS config option to dump extra > statistics about handling page fault under VMA lock. > Why not making this a default when per VMA lock are enabled? > Signed-off-by: Suren Baghdasaryan > --- >

Re: [RFC PATCH RESEND 19/28] mm: disallow do_swap_page to handle page faults under VMA lock

2022-09-09 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > Due to the possibility of do_swap_page dropping mmap_lock, abort fault > handling under VMA lock and retry holding mmap_lock. This can be handled > more gracefully in the future. > > Signed-off-by: Suren Baghdasaryan Revie

Re: [RFC PATCH RESEND 18/28] mm: add FAULT_FLAG_VMA_LOCK flag

2022-09-09 Thread Laurent Dufour
Le 01/09/2022 à 19:35, Suren Baghdasaryan a écrit : > Add a new flag to distinguish page faults handled under protection of > per-vma lock. > > Signed-off-by: Suren Baghdasaryan FWIW, Reviewed-by: Laurent Dufour > --- > include/linux/mm.h | 3 ++- > include/linux/

  1   2   3   4   5   6   7   8   9   10   >