Re: [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu

2022-11-26 Thread Zhouyi Zhou
Thank Thomas for your guidance On Sun, Nov 27, 2022 at 1:05 AM Thomas Gleixner wrote: > > On Mon, Nov 21 2022 at 11:51, Zhouyi Zhou wrote: > > During CPU-hotplug torture (CONFIG_NO_HZ_FULL=y), if we try to > > offline tick_do_timer_cpu, the operation will fail because in > > function tick_nohz_cp

Re: [PATCH 3/3] init/version.c: remove #include

2022-11-26 Thread Masahiro Yamada
On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > Commit 2df8220cc511 ("kbuild: build init/built-in.a just once") moved > the usage of the define UTS_VERSION to the file version-timestamp.c. With s/UTS_VERSION/UTS_RELEASE/, Reviewed-by: Masahiro Yamada > > version-timestamp.c in tur

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-26 Thread Masahiro Yamada
On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include > ") > removed the usage of the define UTS_VERSION but forgot to drop the > include. > > Fixes: 7ad4bd887d27 ("powerpc/book3e: get rid of #include > ") > Signed-off-by: Thomas We

Re: [PATCH 1/3] firmware_loader: remove #include

2022-11-26 Thread Masahiro Yamada
On Sat, Nov 26, 2022 at 2:10 PM Thomas Weißschuh wrote: > > utsrelease.h is potentially generated on each build. > By removing this unused include we can get rid of some spurious > recompilations. > > Signed-off-by: Thomas Weißschuh > --- Reviewed-by: Masahiro Yamada > drivers/base/firmware_

Re: [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu

2022-11-26 Thread Thomas Gleixner
On Mon, Nov 21 2022 at 11:51, Zhouyi Zhou wrote: > During CPU-hotplug torture (CONFIG_NO_HZ_FULL=y), if we try to > offline tick_do_timer_cpu, the operation will fail because in > function tick_nohz_cpu_down: > ``` > if (tick_nohz_full_running && tick_do_timer_cpu == cpu) > return -EBUSY; > `

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-11-26 Thread Pali Rohár
On Wednesday 02 November 2022 14:05:35 Christophe Leroy wrote: > Le 01/11/2022 à 23:12, Pali Rohár a écrit : > > On Sunday 09 October 2022 13:06:52 Pali Rohár wrote: > >> On Monday 29 August 2022 10:54:51 Pali Rohár wrote: > >>> On Sunday 28 August 2022 17:43:53 Christophe Leroy wrote: > Le 28

Re: [PATCH 2/7] powerpc/85xx: Mark mpc85xx_ds_pic_init() as static

2022-11-26 Thread Pali Rohár
On Wednesday 02 November 2022 00:25:03 Pali Rohár wrote: > On Sunday 16 October 2022 16:59:53 Christophe Leroy wrote: > > Hello, > > > > Le 16/10/2022 à 13:05, Pali Rohár a écrit : > > > Hello Christophe! Do you have any other comments for this patch series? > > > > I'm AFK for two weeks, but as

Re: [PATCH] powerpc: dts: turris1x.dts: Add channel labels for temperature sensor

2022-11-26 Thread Pali Rohár
PING? On Tuesday 01 November 2022 23:43:48 Pali Rohár wrote: > Michael, could you take this patch? > > On Sunday 09 October 2022 14:05:06 Pali Rohár wrote: > > On Friday 30 September 2022 14:46:18 Pali Rohár wrote: > > > + CC hwmon ML > > > > > > On Friday 30 September 2022 14:39:01 Pali Rohár w

Re: [PATCH 1/2] powerpc/pci: Allow to disable filling deprecated pci-OF-bus-map

2022-11-26 Thread Pali Rohár
PING? On Tuesday 01 November 2022 23:26:03 Pali Rohár wrote: > Hello! Gentle reminder... > > On Sunday 09 October 2022 13:25:55 Pali Rohár wrote: > > Hello! Any comments on this? It would be nice to take these two patches > > (or at least patch 2) to finally enable PPC_PCI_BUS_NUM_DOMAIN_DEPENDEN

Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary

2022-11-26 Thread Pali Rohár
PING? On Tuesday 01 November 2022 23:19:09 Pali Rohár wrote: > Hello! I would like to remind this patch. > > On Sunday 09 October 2022 13:08:08 Pali Rohár wrote: > > Hello! Any opinion on this patch? > > > > On Saturday 20 August 2022 14:33:27 Pali Rohár wrote: > > > If there's no PCI host bridg

Re: [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-11-26 Thread Andy Shevchenko
On Tue, Nov 22, 2022 at 09:16:54PM +0100, Uwe Kleine-König wrote: > On Tue, Nov 22, 2022 at 06:58:18PM +, Jonathan Cameron wrote: > > Queued all of the below: > > with one tweaked as per your suggestion and the highlighted one dropped on > > basis > > I was already carrying the equivalent - a

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-26 Thread Christophe Leroy
Le 26/11/2022 à 15:07, Thomas Weißschuh a écrit : > On 2022-11-26 07:36+, Christophe Leroy wrote: >> Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit : >>> Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include >>> ") >>> removed the usage of the define UTS_VERSION but forgot to drop the >

Re: [PATCH 2/3] powerpc/book3e: remove #include

2022-11-26 Thread Thomas Weißschuh
On 2022-11-26 07:36+, Christophe Leroy wrote: > Le 26/11/2022 à 06:10, Thomas Weißschuh a écrit : >> Commit 7ad4bd887d27 ("powerpc/book3e: get rid of #include >> ") >> removed the usage of the define UTS_VERSION but forgot to drop the >> include. > > What about: > arch/powerpc/platforms/52xx/

Re: [PATCH] fbdev: make offb driver tristate

2022-11-26 Thread Thomas Zimmermann
Am 26.11.22 um 01:04 schrieb Randy Dunlap: Make the offb (Open Firmware frame buffer) driver tristate, i.e., so that it can be built as a loadable module. However, it still depends on the setting of DRM_OFDRM so that both of these drivers cannot be builtin at the same time nor can one be built

[PATCH v3 17/17] powerpc/qspinlock: add compile-time tuning adjustments

2022-11-26 Thread Nicholas Piggin
This adds compile-time options that allow the EH lock hint bit to be enabled or disabled, and adds some new options that may or may not help matters. To help with experimentation and tuning. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/qspinlock.h | 61 ++--

[PATCH v3 16/17] powerpc/qspinlock: provide accounting and options for sleepy locks

2022-11-26 Thread Nicholas Piggin
Finding the owner or a queued waiter on a lock with a preempted vcpu is indicative of an oversubscribed guest causing the lock to get into trouble. Provide some options to detect this situation and have new CPUs avoid queueing for a longer time (more steal iterations) to minimise the problems cause

[PATCH v3 15/17] powerpc/qspinlock: allow indefinite spinning on a preempted owner

2022-11-26 Thread Nicholas Piggin
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. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c | 77 +-

[PATCH v3 14/17] powerpc/qspinlock: reduce remote node steal spins

2022-11-26 Thread Nicholas Piggin
Allow for a reduction in the number of times a CPU from a different node than the owner can attempt to steal the lock before queueing. This could bias the transfer behaviour of the lock across the machine and reduce NUMA crossings. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c

[PATCH v3 13/17] powerpc/qspinlock: use spin_begin/end API

2022-11-26 Thread Nicholas Piggin
Use the spin_begin/spin_cpu_relax/spin_end APIs in qspinlock, which helps to prevent threads issuing a lot of expensive priority nops which may not have much effect due to immediately executing low then medium priority. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c | 39 +++

[PATCH v3 12/17] powerpc/qspinlock: allow lock stealing in trylock and lock fastpath

2022-11-26 Thread Nicholas Piggin
This change allows trylock to steal the lock. It also allows the initial lock attempt to steal the lock rather than bailing out and going to the slow path. This gives trylock more strength: without this a continually-contended lock will never permit a trylock to succeed. With this change, the tryl

[PATCH v3 11/17] powerpc/qspinlock: add ability to prod new queue head CPU

2022-11-26 Thread Nicholas Piggin
After the head of the queue acquires the lock, it releases the next waiter in the queue to become the new head. Add an option to prod the new head if its vCPU was preempted. This may only have an effect if queue waiters are yielding. Disable this option by default for now, i.e., no logical change.

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

2022-11-26 Thread Nicholas Piggin
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. With this change, queue waiters never sample the owner CPU directly from th

[PATCH v3 09/17] powerpc/qspinlock: allow stealing when head of queue yields

2022-11-26 Thread Nicholas Piggin
If the head of queue is preventing stealing but it finds the owner vCPU is preempted, it will yield its cycles to the owner which could cause it to become preempted. Add an option to re-allow stealers before yielding, and disallow them again after returning from the yield. Disable this option by d

[PATCH v3 08/17] powerpc/qspinlock: implement option to yield to previous node

2022-11-26 Thread Nicholas Piggin
Queued waiters which are not at the head of the queue don't spin on the lock word but their qnode lock word, waiting for the previous queued CPU to release them. Add an option which allows these waiters to yield to the previous CPU if its vCPU is preempted. Signed-off-by: Nicholas Piggin --- arc

[PATCH v3 07/17] powerpc/qspinlock: paravirt yield to lock owner

2022-11-26 Thread Nicholas Piggin
Waiters spinning on the lock word should yield to the lock owner if the vCPU is preempted. This improves performance when the hypervisor has oversubscribed physical CPUs. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/qspinlock.c | 99 +++- 1 file changed, 87

[PATCH v3 06/17] powerpc/qspinlock: store owner CPU in lock word

2022-11-26 Thread Nicholas Piggin
Store the owner CPU number in the lock word so it may be yielded to, as powerpc's paravirtualised simple spinlocks do. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/qspinlock.h | 12 ++-- arch/powerpc/include/asm/qspinlock_types.h | 12 +++- arch/powerpc/lib/q

[PATCH v3 05/17] powerpc/qspinlock: theft prevention to control latency

2022-11-26 Thread Nicholas Piggin
Give the queue head the ability to stop stealers. After a number of spins without sucessfully acquiring the lock, the queue head sets this, which halts stealing and will assure it is the next owner. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/qspinlock_types.h | 8 +++- arch/pow

[PATCH v3 04/17] powerpc/qspinlock: allow new waiters to steal the lock before queueing

2022-11-26 Thread Nicholas Piggin
Allow new waiters to "steal" the lock before queueing. That is, to acquire it while other CPUs have queued. This particularly helps paravirt performance when physical CPUs are oversubscribed, by keeping the lock from becoming a strict FIFO and vCPU preemption causing queue train wrecks. The new _

[PATCH v3 03/17] powerpc/qspinlock: convert atomic operations to assembly

2022-11-26 Thread Nicholas Piggin
This uses more optimal ll/sc style access patterns (rather than cmpxchg), and also sets the EH=1 lock hint on those operations which acquire ownership of the lock. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/qspinlock.h | 24 +-- arch/powerpc/include/asm/qspinlock_types

[PATCH v3 02/17] powerpc/qspinlock: use a half-word store to unlock to avoid larx/stcx.

2022-11-26 Thread Nicholas Piggin
The first 16 bits of the lock are only modified by the owner, and other modifications always use atomic operations on the entire 32 bits, so unlocks can use plain stores on the 16 bits. This is the same kind of optimisation done by core qspinlock code. Signed-off-by: Nicholas Piggin --- arch/pow

[PATCH v3 01/17] powerpc/qspinlock: add mcs queueing for contended waiters

2022-11-26 Thread Nicholas Piggin
This forms the basis of the qspinlock slow path. Like generic qspinlocks and unlike the vanilla MCS algorithm, the lock owner does not participate in the queue, only waiters. The first waiter spins on the lock word, then when the lock is released it takes ownership and unqueues the next waiter. Th

[PATCH v3 00/17] powerpc: alternate queued spinlock implementation

2022-11-26 Thread Nicholas Piggin
This replaces the generic queued spinlock code (like s390 does) with our own implementation. There is an extra shim patch 1a to get the series to apply. Generic PV qspinlock code is causing latency / starvation regressions on large systems that are resulting in hard lockups reported (mostly in pat