* Peter Zijlstra wrote:
> On Wed, May 24, 2023 at 03:44:59PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the tip tree, today's linux-next build (powerpc
> > pseries_le_defconfig) failed to boot like this:
> >
> > Built 1 zonelists, mobility grouping on. Total pages: 327
Can't find how that can happen.
I have:
CONFIG_PREEMPT_BUILD=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_RCU=y
We are inside an access_begin / access_end block.
[ 380.407589] [
On Thu 2023-05-25 13:08:04, Doug Anderson wrote:
> Hi,
>
> On Thu, May 25, 2023 at 9:27 AM Petr Mladek wrote:
> >
> > On Fri 2023-05-19 10:18:38, Douglas Anderson wrote:
> > > Implement a hardlockup detector that doesn't doesn't need any extra
> > > arch-specific support code to detect lockups. I
On Fri 2023-05-19 10:18:39, Douglas Anderson wrote:
> On arm64, NMI support needs to be detected at runtime. Add a weak
> function to the perf hardlockup detector so that an architecture can
> implement it to detect whether NMIs are available.
>
> Signed-off-by: Douglas Anderson
> ---
> While I w
On Wed 2023-05-24 12:38:49, Doug Anderson wrote:
> Hi,
>
> On Wed, May 24, 2023 at 6:59 AM Petr Mladek wrote:
> >
> > On Fri 2023-05-19 10:18:37, Douglas Anderson wrote:
> > > The fact that there watchdog_hardlockup_enable(),
> > > watchdog_hardlockup_disable(), and watchdog_hardlockup_probe() ar
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: fsl-cpm: Use 16 bit mode for large transfers
with even size
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: fsl-spi: Re-organise transfer bits_per_word
adaptation
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: spi-fsl-spi: automatically adapt bits-per-word
in cpu mode
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: fsl-cpm: Use 16 bit mode for large transfers
with even size
to the 4.19-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: spi-fsl-spi: automatically adapt bits-per-word
in cpu mode
to the 4.19-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
Subject:[For 4.19/4.14] spi: fsl-spi: Re-organise transfer bits_per_word
adaptation
to the 4.19-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The
This is a note to let you know that I've just added the patch titled
Subject:[For 5.15/5.10/5.4] spi: fsl-cpm: Use 16 bit mode for large
transfers with even size
to the 5.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summ
This is a note to let you know that I've just added the patch titled
Subject:[For 5.15/5.10/5.4] spi: fsl-spi: Re-organise transfer
bits_per_word adaptation
to the 5.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
Subject:[For 5.15/5.10/5.4] spi: fsl-cpm: Use 16 bit mode for large
transfers with even size
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summ
This is a note to let you know that I've just added the patch titled
Subject:[For 5.15/5.10/5.4] spi: fsl-spi: Re-organise transfer
bits_per_word adaptation
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
This is a note to let you know that I've just added the patch titled
spi: fsl-cpm: Use 16 bit mode for large transfers with even size
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch
This is a note to let you know that I've just added the patch titled
spi: fsl-spi: Re-organise transfer bits_per_word adaptation
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
stage2_try_set_pte() and KVM_PTE_LEAF_ATTR_LO_S2_AF are needed to
implement kvm_arch_test_clear_young().
Signed-off-by: Yu Zhao
---
arch/arm64/include/asm/kvm_pgtable.h | 53
arch/arm64/kvm/hyp/pgtable.c | 53
2 files changed, 53
Add mmu_notifier_ops->test_clear_young() to supersede test_young()
and clear_young().
test_clear_young() has a fast path, which if supported, allows its
callers to safely clear the accessed bit without taking
kvm->mmu_lock.
The fast path requires arch-specific code that generally relies on
RCU an
Replace test_young() and clear_young() with test_clear_young().
Signed-off-by: Yu Zhao
---
include/linux/mmu_notifier.h | 29 ++-
include/trace/events/kvm.h | 15 --
mm/mmu_notifier.c| 42
virt/kvm/kvm_main.c | 54 --
Stage2 page tables are currently not RCU safe against unmapping or VM
destruction. The previous mmu_notifier_ops members rely on
kvm->mmu_lock to synchronize with those operations.
However, the new mmu_notifier_ops member test_clear_young() provides
a fast path that does not take kvm->mmu_lock. To
TLDR
This patchset adds a fast path to clear the accessed bit without
taking kvm->mmu_lock. It can significantly improve the performance of
guests when the host is under heavy memory pressure.
ChromeOS has been using a similar approach [1] since mid 2021 and it
was proven successful on tens o
Implement kvm_arch_test_clear_young() to support the fast path in
mmu_notifier_ops->test_clear_young().
It focuses on a simple case, i.e., hardware sets the accessed bit in
KVM PTEs and VMs are not protected, where it can rely on RCU and
cmpxchg to safely clear the accessed bit without taking
kvm-
KVM page tables are currently not RCU safe against remapping, i.e.,
kvmppc_unmap_free_pmd_entry_table() et al. The previous
mmu_notifier_ops members rely on kvm->mmu_lock to synchronize with
that operation.
However, the new mmu_notifier_ops member test_clear_young() provides
a fast path that does
Implement kvm_arch_test_clear_young() to support the fast path in
mmu_notifier_ops->test_clear_young().
It focuses on a simple case, i.e., radix MMU sets the accessed bit in
KVM PTEs and VMs are not nested, where it can rely on RCU and
pte_xchg() to safely clear the accessed bit without taking
kvm
tdp_mmu_enabled and shadow_accessed_mask are needed to implement
kvm_arch_has_test_clear_young().
Signed-off-by: Yu Zhao
---
arch/x86/include/asm/kvm_host.h | 6 ++
arch/x86/kvm/mmu.h | 6 --
arch/x86/kvm/mmu/spte.h | 1 -
3 files changed, 6 insertions(+), 7 deletion
Implement kvm_arch_test_clear_young() to support the fast path in
mmu_notifier_ops->test_clear_young().
It focuses on a simple case, i.e., TDP MMU sets the accessed bit in
KVM PTEs and VMs are not nested, where it can rely on RCU and
clear_bit() to safely clear the accessed bit without taking
kvm-
Use mmu_notifier_test_clear_young() to handle KVM PTEs in batches
when the fast path is supported. This reduces the contention on
kvm->mmu_lock when the host is under heavy memory pressure.
An existing selftest can quickly demonstrate the effectiveness of
this patch. On a generic workstation equip
Right now there is one arch (sparc64) that selects HAVE_NMI_WATCHDOG
without selecting HAVE_HARDLOCKUP_DETECTOR_ARCH. Because of that one
architecture, we have some special case code in the watchdog core to
handle the fact that watchdog_hardlockup_probe() isn't implemented.
Let's implement watchdo
The permissions for the kernel.nmi_watchdog sysctl have always been
set at compile time despite the fact that a watchdog can fail to
probe. Let's fix this and set the permissions based on whether the
hardlockup detector actually probed.
Fixes: a994a3147e4c ("watchdog/hardlockup/perf: Implement ini
This patch series attempts to finish resolving the feedback received
from Petr Mladek on the v5 series I posted. Andrew has already landed
v5 so I'm posting this as additional patches.
Probably the only thing that wasn't fully as clean as Petr requested
was the Kconfig stuff. I couldn't find a b
In the patch ("watchdog/hardlockup: add a "cpu" param to
watchdog_hardlockup_check()") there was no reason to use
raw_cpu_ptr(). Using this_cpu_ptr() works fine.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
kernel/watchdog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
In the patch ("watchdog/hardlockup: add a "cpu" param to
watchdog_hardlockup_check()") we started using a cpumask to keep track
of which CPUs to backtrace. When setting up this cpumask, it's better
to use cpumask_copy() than to just copy the structure directly. Fix this.
Suggested-by: Petr Mladek
In the patch ("watchdog/hardlockup: add comments to
touch_nmi_watchdog()") we adjusted some comments for
touch_nmi_watchdog(). The comment about the softlockup had a typo and
were also felt to be too obvious. Remove it.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
include/linu
In the patch ("watchdog/hardlockup: detect hard lockups using
secondary (buddy) CPUs"), we added a call from the common watchdog.c
file into the buddy. That call could be done more cleanly.
Specifically:
1. If we move the call into watchdog_hardlockup_kick() then it keeps
watchdog_timer_fn() sim
There's no reason to make a copy of the "watchdog_cpus" locally in
watchdog_next_cpu(). Making a copy wouldn't make things any more race
free and we're just reading the value so there's no need for a copy.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
kernel/watchdog_buddy.c |
The dependency for HARDLOCKUP_DETECTOR_PREFER_BUDDY was more
complicated than it needed to be. If the "perf" detector is available
and we have SMP then we have a choice, so enable the config based on
just those two config items.
Suggested-by: Petr Mladek
Signed-off-by: Douglas Anderson
---
lib
It's been suggested that since the SMP barriers are only potentially
useful for the buddy hardlockup detector, not the perf hardlockup
detector, that the barriers belong in the buddy code. Let's move them
and add clearer comments about why they're needed.
Suggested-by: Petr Mladek
Signed-off-by:
HAVE_HARDLOCKUP_DETECTOR_NON_ARCH is a mouthful and
confusing. HAVE_HARDLOCKUP_DETECTOR_PERF_OR_BUDDY is even more of a
mouthful, but probably less confusing. Rename the Kconfig names.
Signed-off-by: Douglas Anderson
---
lib/Kconfig.debug | 12 ++--
1 file changed, 6 insertions(+), 6 de
39 matches
Mail list logo