[PATCH 20/34] xtensa: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
Zankel Cc: Max Filippov Cc: linux-xte...@linux-xtensa.org Signed-off-by: Thomas Gleixner [bigeasy: +traps.c] Signed-off-by: Sebastian Andrzej Siewior --- arch/xtensa/kernel/entry.S | 2 +- arch/xtensa/kernel/traps.c | 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH 30/34] media: cec-gpio: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
-by: Sebastian Andrzej Siewior --- drivers/media/platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index f1f61419fd292..56d4c1e91c276 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media

[PATCH 25/34] mm: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux...@kvack.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- mm/memory.c | 2 +- mm/slub.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/memory.c b

[PATCH 09/34] ia64: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
: linux-i...@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- arch/ia64/kernel/entry.S | 12 ++-- arch/ia64/kernel/kprobes.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel

[PATCH 15/34] parisc: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
lge Deller Cc: linux-par...@vger.kernel.org Signed-off-by: Thomas Gleixner [bigeasy: +Kconfig] Signed-off-by: Sebastian Andrzej Siewior --- arch/parisc/Kconfig| 2 +- arch/parisc/kernel/entry.S | 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/Kcon

[PATCH 32/34] lib: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Let DEBUG_PREEMPT depend on CONFIG_PREEMPTION. Cc: Andrew Morton Signed-off-by: Sebastian Andrzej Siewior --- lib

[PATCH 29/34] backlight/jornada720: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
Han Cc: Bartlomiej Zolnierkiewicz Cc: dri-de...@lists.freedesktop.org Cc: linux-fb...@vger.kernel.org Signed-off-by: Thomas Gleixner [bigeasy: +LCD_HP700] Signed-off-by: Sebastian Andrzej Siewior --- drivers/video/backlight/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 28/34] drm/i810: Refer to `PREEMPTION' in comment

2019-10-15 Thread Sebastian Andrzej Siewior
The dependency has been changed from `PREEMPT' to `PREEMPTION'. Reflect this change in the comment. Use `PREEMPTION' in the comment. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-de...@lists.freedesktop.org Signed-off-by: Sebastian Andrzej

[PATCH 24/34] btrfs: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
Bacik Cc: David Sterba Cc: linux-bt...@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- fs/btrfs/volumes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index a7da1f3e36275..c34187a0d949e 100644

[PATCH 33/34] tracing: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Add additional header output for PREEMPT_RT. Cc: Steven Rostedt Cc: Ingo Molnar Signed-off-by: Sebastian Andrzej Siewior

[PATCH 23/34] fs: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
for fsstack_copy_inode_size() also to refer to CONFIG_PREEMPTION. Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Signed-off-by: Thomas Gleixner [bigeasy: +PREEMPT comments] Signed-off-by: Sebastian Andrzej Siewior --- fs/stack.c| 6 +++--- include/linux/fs.h| 4 ++-- include

[PATCH 18/34] sh: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
...@vger.kernel.org Signed-off-by: Thomas Gleixner [bigeasy: +Kconfig] Signed-off-by: Sebastian Andrzej Siewior --- arch/sh/Kconfig| 2 +- arch/sh/kernel/cpu/sh5/entry.S | 4 ++-- arch/sh/kernel/entry-common.S | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 06/34] csky: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
Signed-off-by: Sebastian Andrzej Siewior --- arch/csky/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky/kernel/entry.S b/arch/csky/kernel/entry.S index a7a5b67df8989..007706328 100644 --- a/arch/csky/kernel/entry.S +++ b/arch/csky/kernel/entry.S

[PATCH 26/34] Documentation/RCU: Use CONFIG_PREEMPTION where appropriate

2019-10-15 Thread Sebastian Andrzej Siewior
it applies to both preemption models and not just to `CONFIG_PREEMPT'. Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: linux-...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- .../Expedite

[PATCH 31/34] locking: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
ill Deacon Signed-off-by: Sebastian Andrzej Siewior --- kernel/Kconfig.locks | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/Kconfig.locks b/kernel/Kconfig.locks index e0852dc333acd..3de8fd11873b4 100644 --- a/kernel/Kconfig.locks +++ b/kernel/Kconfig.locks

[PATCH 00/34] Treewide: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
This series replaces 'PREEMPT' with 'PREEMPTION' if the functionality behind it is not limited to the preemption model CONFIG_PREEMPT but also required by the preemption model CONFIG_PREEMPT_RT. Sebastian

[PATCH 34/34] workqueue: Use PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
-off-by: Sebastian Andrzej Siewior --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index bc2e09a8ea61d..a668b2118539c 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2285,7 +2285,7 @@ __acquires(>l

[PATCH 22/34] xen: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
: Juergen Gross Cc: Stefano Stabellini Cc: xen-de...@lists.xenproject.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- drivers/xen/preempt.c | 4 ++-- include/xen/xen-ops.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/preempt.c b

[PATCH 27/34] rcu: Use CONFIG_PREEMPTION where appropriate

2019-10-15 Thread Sebastian Andrzej Siewior
it applies to both preemption models and not just to `CONFIG_PREEMPT'. Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Davidlohr Bueso Cc: r...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- incl

[PATCH 05/34] c6x: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
: linux-c6x-...@linux-c6x.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- arch/c6x/kernel/entry.S | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/c6x/kernel/entry.S b/arch/c6x/kernel/entry.S index 4332a10aec6c7..fb154d19625bc 100644

[PATCH 04/34] ARC: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
-...@lists.infradead.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- arch/arc/kernel/entry.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S index 72be01270e246..1f6bb184a44db 100644 --- a/arch/arc/kernel

[PATCH 02/34] arm64: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
PREEMPT_RT output in show_stack(). Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Thomas Gleixner [bigeasy: +traps.c, Kconfig] Signed-off-by: Sebastian Andrzej Siewior --- arch/arm64/Kconfig | 52 +++--- arch

[PATCH 14/34] nios2: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
-...@lists.rocketboards.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- arch/nios2/kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nios2/kernel/entry.S b/arch/nios2/kernel/entry.S index 1e515ccd698e3..3d8d1d0bcb64b 100644 --- a/arch/nios2/kernel

[PATCH 19/34] sparc: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
c: sparcli...@vger.kernel.org Signed-off-by: Thomas Gleixner [bigeasy: +Kconfig] Signed-off-by: Sebastian Andrzej Siewior --- arch/sparc/Kconfig | 2 +- arch/sparc/kernel/rtrap_64.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kco

[PATCH 21/34] net: Use CONFIG_PREEMPTION

2019-10-15 Thread Sebastian Andrzej Siewior
kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/dev.c b/net/core/dev.c index bf3ed413abafe..11a60d69434bc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -90

Re: [PATCH RT] Revert "ARM: Initialize split page table locks for vector page"

2019-10-15 Thread Sebastian Andrzej Siewior
On 2019-10-15 09:26:09 [-0700], Matthew Wilcox wrote: > Did your test build have ALLOC_SPLIT_PTLOCKS defined? I tried to explain that ptlock_ptr() returns NULL for the page before the ctor invocation and non-NULL afterwards which means that USE_SPLIT_PTE_PTLOCKS and ALLOC_SPLIT_PTLOCKS was

[PATCH RT] Revert "ARM: Initialize split page table locks for vector page"

2019-10-14 Thread Sebastian Andrzej Siewior
I'm dropping this patch, with its original description: |ARM: Initialize split page table locks for vector page | |Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if |PREEMPT_RT_FULL=y because vectors_user_mapping() creates a |VM_ALWAYSDUMP mapping of the vector page (address 0x),

Re: [PATCH v2 1/1] mm/vmalloc: remove preempt_disable/enable when do preloading

2019-10-11 Thread Sebastian Andrzej Siewior
just and move some comments > > Fixes: 82dd23e84be3 ("mm/vmalloc.c: preload a CPU with one object for split > purpose") > Reviewed-by: Steven Rostedt (VMware) > Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Sebastian Andrzej Siewior Thank you. Sebastian

[PATCH REPOST] lib/ubsan: Don't seralize UBSAN report

2019-10-10 Thread Sebastian Andrzej Siewior
ink: https://lkml.kernel.org/r/20190920100835.14999-1-julien.gr...@arm.com Reported-by: Andre Przywara Signed-off-by: Julien Grall Acked-by: Andrey Ryabinin Signed-off-by: Sebastian Andrzej Siewior --- Repost of https://lkml.kernel.org/r/20190920100835.14999-1-julien.gr...@arm.com lib/ubsa

Re: [PATCH 0/8] clocksource/drivers/timer-atmel-tcb: add sama5d2 support

2019-10-10 Thread Sebastian Andrzej Siewior
On 2019-10-10 00:39:58 [+0200], Alexandre Belloni wrote: > This series mainly adds sama5d2 support where we need to avoid using > clock index 0 because that clock is never enabled by the driver. > > There is also a rework of the 32khz clock handling so it is not used for > clockevents on 32 bit

Re: [PATCH AUTOSEL 5.3 28/68] KVM: x86: Expose XSAVEERPTR to the guest

2019-10-10 Thread Sebastian Andrzej Siewior
On 2019-10-10 00:50:09 [+0200], Paolo Bonzini wrote: > > Also, taking advantage of this feature requires changes which just > > landed in qemu's master branch. > > That's not a big deal, every QEMU supports every kernel and vice versa. That is correct. My point was that the visibility of this

Re: [PATCH AUTOSEL 5.3 28/68] KVM: x86: Expose XSAVEERPTR to the guest

2019-10-09 Thread Sebastian Andrzej Siewior
On 2019-10-09 23:15:07 [+0200], Paolo Bonzini wrote: > > --- a/arch/x86/kvm/cpuid.c > > +++ b/arch/x86/kvm/cpuid.c > > @@ -479,6 +479,7 @@ static inline int __do_cpuid_func(struct > > kvm_cpuid_entry2 *entry, u32 function, > > > > /* cpuid 0x8008.ebx */ > > const u32

[ANNOUNCE] v5.2.19-rt11

2019-10-07 Thread Sebastian Andrzej Siewior
Dear RT folks! I'm pleased to announce the v5.2.19-rt11 patch set. Changes since v5.2.19-rt10: - Larger futex rework. Making the futex_hash_bucket lock a raw_spinlock_t in v5.0.21-rt14 fixed a one problem but led to other. This change has been reverted and the original problem was

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-07 Thread Sebastian Andrzej Siewior
On 2019-10-07 18:56:11 [+0200], Uladzislau Rezki wrote: > Actually there is a high lock contention on vmap_area_lock, because it > is still global. You can have a look at last slide: > >

Re: [PATCH RT] kmemleak: Change the lock of kmemleak_object to raw_spinlock_t

2019-10-07 Thread Sebastian Andrzej Siewior
On 2019-09-27 16:22:30 [+0800], Yongxin Liu wrote: > From: Liu Haitao > > The following call trace would be triggered as kmemleak is running. > … Applied. Sebastian

Re: [RFC PATCH] lib/ubsan: Don't seralize UBSAN report

2019-10-07 Thread Sebastian Andrzej Siewior
On 2019-09-20 11:08:35 [+0100], Julien Grall wrote: > At the moment, UBSAN report will be serialized using a spin_lock(). On > RT-systems, spinlocks are turned to rt_spin_lock and may sleep. This will > result to the following splat if the undefined behavior is in a context > that can sleep: … >

[PATCH RT] printk: handle iterating while buffer changing

2019-10-07 Thread Sebastian Andrzej Siewior
will no longer match. For syslog, add a check to make sure the provided buffer is not overfilled. For kmsg_dump, start over by recalculating the messages available. Signed-off-by: John Ogness Signed-off-by: Sebastian Andrzej Siewior --- This reassembles the behaviour that commit c9dccacfccc72 ("p

[PATCH RT] locking/rtmutex: Clean ->pi_blocked_on in the error case

2019-10-07 Thread Sebastian Andrzej Siewior
ter the interruption it longer blocks on the lock. Fixes: 1a1fb985f2e2b ("futex: Handle early deadlock return correctly") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sebastian Andrzej Siewior --- This means I'm going to revert the raw_spinlock_t changes to futex_hash_bucket, add back al

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-07 Thread Sebastian Andrzej Siewior
On 2019-10-07 10:30:37 [+0200], Daniel Wagner wrote: > Hi, Hi Daniel, > On Fri, Oct 04, 2019 at 06:30:42PM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-10-04 18:20:41 [+0200], Uladzislau Rezki wrote: > > > If we have migrate_disable/enable, then, i think preempt_enable

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-04 Thread Sebastian Andrzej Siewior
On 2019-10-04 19:04:11 [+0200], Uladzislau Rezki wrote: > if another, we can free the object allocated on previous step if > it already has it. If another CPU does not have it, save it in > ne_fit_preload_node for another current CPU to reuse later. Further > we can not migrate because of: > >

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-10-04 Thread Sebastian Andrzej Siewior
On 2019-09-24 11:35:16 [-0500], Scott Wood wrote: > > OK, sounds like stop_one_cpu_nowait() is the way to go then. so I applied the last three patches from the migrate-disable() series and it looks good. Nothing blew up in my testing. There were no objects to the stop_one_cpu_nowait() suggestion

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-04 Thread Sebastian Andrzej Siewior
On 2019-10-04 18:20:41 [+0200], Uladzislau Rezki wrote: > On Fri, Oct 04, 2019 at 05:37:28PM +0200, Sebastian Andrzej Siewior wrote: > > If you post something that is related to PREEMPT_RT please keep tglx and > > me in Cc. > > > > On 2019-10-03 11:09:06 [

Re: [PATCH] mm: vmalloc: Use the vmap_area_lock to protect ne_fit_preload_node

2019-10-04 Thread Sebastian Andrzej Siewior
If you post something that is related to PREEMPT_RT please keep tglx and me in Cc. On 2019-10-03 11:09:06 [+0200], Daniel Wagner wrote: > Replace preempt_enable() and preempt_disable() with the vmap_area_lock > spin_lock instead. Calling spin_lock() with preempt disabled is > illegal for -rt.

Re: [PATCH v2] lib/smp_processor_id: Don't use cpumask_equal()

2019-10-04 Thread Sebastian Andrzej Siewior
-off-by: Waiman Long Acked-by: Sebastian Andrzej Siewior Sebastian

Re: [PATCH] percpu-refcount: Use normal instead of RCU-sched"

2019-10-02 Thread Sebastian Andrzej Siewior
On 2019-10-02 08:08:52 [-0700], Paul E. McKenney wrote: > On Wed, Oct 02, 2019 at 01:22:53PM +0200, Sebastian Andrzej Siewior wrote: > > This is a revert of commit > >a4244454df129 ("percpu-refcount: use RCU-sched insted of normal RCU") > > > > which claim

[PATCH] percpu-refcount: Use normal instead of RCU-sched"

2019-10-02 Thread Sebastian Andrzej Siewior
u_read_lock_sched() that takes a little longer due to the additional debug code. Convert back to normal RCU. Signed-off-by: Sebastian Andrzej Siewior --- Benchmark https://breakpoint.cc/percpu_test.patch include/linux/percpu-refcount.h | 16 1 file changed, 8 insertions(+), 8 dele

Re: [PREEMPT_RT PATCH 2/3] i915: convert all irq_locks spinlocks to raw spinlocks

2019-09-27 Thread Sebastian Andrzej Siewior
On 2019-09-16 14:21:22 [-0700], Sean V Kelley wrote: > I’ve tested this also on the v5.2.14-rt7 and can confirm that it avoids the > need for making the locks raw. > > Tested-by: Sean V Kelley Good. I went for an alternative approach in v5.2.17-rt9. Now I believe that the three here are

Re: [PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-09-27 Thread Sebastian Andrzej Siewior
On 2019-09-26 11:52:42 [-0500], Scott Wood wrote: > Looks good, thanks! Thanks, just released. Moving forward. It would be nice to have some DL-dev feedback on DL patch. For the remaining once, could please throw Steven's stress-test-hostplug-cpu-script? If that one does not complain I don't see

[ANNOUNCE] v5.2.17-rt9

2019-09-27 Thread Sebastian Andrzej Siewior
Dear RT folks! I'm pleased to announce the v5.2.17-rt9 patch set. Changes since v5.2.17-rt8: - A missing unlock in the posix-CPU-timer code was found by Dan Carpenter. - Asking for the first recorded message in the printk buffer returns the first available message if it has been

Re: [PATCH RT 4/8] sched: migrate disable: Protect cpus_ptr with lock

2019-09-26 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:34 [-0500], Scott Wood wrote: > Various places assume that cpus_ptr is protected by rq/pi locks, > so don't change it before grabbing those locks. > > Signed-off-by: Scott Wood I applied now everything until here and you can take a look at

[PATCH 2/2] KVM: x86: Expose CLZERO and XSAVEERPTR to the guest

2019-09-25 Thread Sebastian Andrzej Siewior
that CLZERO is also masked out. This opcode is unprivilged so exposing it to the guest should not make any difference. Pass CLZERO and XSAVEERPTR to the guest if available on the host. Signed-off-by: Sebastian Andrzej Siewior --- arch/x86/kvm/cpuid.c | 1 + 1 file changed, 1 insertion(+) diff

KVM: x86: Pass additional FPU bits to the guest

2019-09-25 Thread Sebastian Andrzej Siewior
While testing my FPU patches on AMD's ZEN platform I noticed that the XSAVES feature flag was never used in the guest while it was present in the host. Patch #1 seemed to work but I holded on to it because I could explain why the guest did report ´fxsave_leak' while the host did not. It turns out

[PATCH 1/2] KVM: x86: svm: Pass XSAVES to guest if available on host

2019-09-25 Thread Sebastian Andrzej Siewior
the guest if it is available on the host. I didn't find anything close to VMX's "VM-Execution Controls" and exposing this flag based on the CPUID flags cause no harm so far. Expose the XSAVES flag to the guest if the host supports it. Signed-off-by: Sebastian Andrzej Siewior --- arch/x86

Re: [PREEMPT_RT PATCH 1/3] i915: do not call lockdep_assert_irqs_disabled() on PREEMPT_RT

2019-09-25 Thread Sebastian Andrzej Siewior
On 2019-08-19 19:33:17 [-0500], Clark Williams wrote: > From: Clark Williams > > The 'breadcrumb' code in the i915 driver calls lockdep_assert_irqs_disabled() > when starting some operations. This is valid on a stock kernel > but on a PREEMPT_RT kernel the spin_lock_irq*() calls to not disable >

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Sebastian Andrzej Siewior
On 2019-09-24 10:47:36 [-0500], Scott Wood wrote: > When the stop machine finishes it will do a wake_up_process() via > complete(). Since this does not pass WF_LOCK_SLEEPER, saved_state will be > cleared, and you'll have TASK_RUNNING when you get to other_func() and > schedule(), regardless of

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Sebastian Andrzej Siewior
On 2019-09-24 08:53:43 [-0500], Scott Wood wrote: > As I pointed out in the "[PATCH RT 6/8] sched: migrate_enable: Set state to > TASK_RUNNING" discussion, we can get here inside the rtmutex code (e.g. from > debug_rt_mutex_print_deadlock) where saved_state is already holding > something -- plus,

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-24 Thread Sebastian Andrzej Siewior
On 2019-09-23 19:52:33 [+0200], To Scott Wood wrote: I made dis: diff --git a/kernel/cpu.c b/kernel/cpu.c index 885a195dfbe02..25afa2bb1a2cf 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -308,7 +308,9 @@ void pin_current_cpu(void) preempt_lazy_enable(); preempt_enable(); +

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-23 Thread Sebastian Andrzej Siewior
On 2019-09-23 11:59:23 [-0500], Scott Wood wrote: > On Tue, 2019-09-17 at 09:06 -0500, Scott Wood wrote: > > On Tue, 2019-09-17 at 09:59 +0200, Sebastian Andrzej Siewior wrote: > > > On 2019-09-11 17:57:27 [+0100], Scott Wood wrote: > > > > diff --git a/kernel/cpu.

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-23 Thread Sebastian Andrzej Siewior
On 2019-09-17 11:12:48 [-0500], Scott Wood wrote: > > rcu_read_lock() does: > > > __rcu_read_lock(); > > > __acquire(RCU); > > > rcu_lock_acquire(_lock_map); > > > RCU_LOCKDEP_WARN(!rcu_is_watching(), > > > "rcu_read_lock() used illegally

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-23 Thread Sebastian Andrzej Siewior
On 2019-09-17 11:32:11 [-0500], Scott Wood wrote: > Nice! Are the "false positives" real issues from components that are > currently blacklisted on RT, or something different? So first a little bit of infrastructure like commit d5096aa65acd0 ("sched: Mark hrtimers to expire in hard interrupt

[PATCH RT] posix-timers: Unlock expiry lock in the early return

2019-09-23 Thread Sebastian Andrzej Siewior
Patch ("posix-timers: Add expiry lock") acquired a lock in run_posix_cpu_timers() but didn't drop the lock in the early return. Unlock the lock in the early return path. Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Sebastian Andrzej Siewior --- kernel/

Re: [PATCH RT 8/8] sched: Lazy migrate_disable processing

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:38 [-0500], Scott Wood wrote: > diff --git a/kernel/cpu.c b/kernel/cpu.c > index 885a195dfbe0..0096acf1a692 100644 > --- a/kernel/cpu.c > +++ b/kernel/cpu.c > @@ -939,17 +893,34 @@ static int takedown_cpu(unsigned int cpu) >*/ > irq_lock_sparse(); > > -#ifdef

Re: [PATCH RT 7/8] sched: migrate_enable: Use select_fallback_rq()

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:37 [-0500], Scott Wood wrote: > migrate_enable() currently open-codes a variant of select_fallback_rq(). > However, it does not have the "No more Mr. Nice Guy" fallback and thus > it will pass an invalid CPU to the migration thread if cpus_mask only > contains a CPU that is

Re: [PATCH RT 6/8] sched: migrate_enable: Set state to TASK_RUNNING

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:36 [-0500], Scott Wood wrote: > If migrate_enable() is called while a task is preparing to sleep > (state != TASK_RUNNING), that triggers a debug check in stop_one_cpu(). > Explicitly reset state to acknowledge that we're accepting the spurious > wakeup. > > Signed-off-by:

Re: [PATCH RT 5/8] sched/deadline: Reclaim cpuset bandwidth in .migrate_task_rq()

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:35 [-0500], Scott Wood wrote: > With the changes to migrate disabling, ->set_cpus_allowed() no longer > gets deferred until migrate_enable(). To avoid releasing the bandwidth > while the task may still be executing on the old CPU, move the subtraction > to ->migrate_task_rq().

Re: [PATCH RT 2/8] sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-07-27 00:56:32 [-0500], Scott Wood wrote: > This function is concerned with the long-term cpu mask, not the > transitory mask the task might have while migrate disabled. Before > this patch, if a task was migrate disabled at the time > __set_cpus_allowed_ptr() was called, and the new mask

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-17 09:36:22 [-0500], Scott Wood wrote: > > On non-RT you can (but should not) use the counter part of the function > > in random order like: > > local_bh_disable(); > > local_irq_disable(); > > local_bh_enable(); > > local_irq_enable(); > > Actually even non-RT will

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-17 09:06:28 [-0500], Scott Wood wrote: > Sorry, I missed that you were asking about rcu_read_lock_bh() as well. I > did remove the change to rcu_read_lock_bh_held(). Sorry for not being clear here. > With this patch, local_bh_disable() calls rcu_read_lock() on RT which > handles this

Re: [PATCH] rt-tests: backfire: Don't include asm/uaccess.h directly

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-16 23:57:32 [+0200], John Kacur wrote: > Signed-off-by: John Kacur Hmmm. I remember this thing came up years ago in the Debian BTS and then that backfire module got removed from the Debian package because there was no need for it. Just to clarify: is there any need to keep this module

Re: [PATCH RT v3 5/5] rcutorture: Avoid problematic critical section nesting on RT

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-16 11:55:57 [-0500], Scott Wood wrote: > On Thu, 2019-09-12 at 18:17 -0400, Joel Fernandes wrote: > > On Wed, Sep 11, 2019 at 05:57:29PM +0100, Scott Wood wrote: > > > rcutorture was generating some nesting scenarios that are not > > > reasonable. Constrain the state selection to avoid

Re: [PATCH RT v3 4/5] rcu: Disable use_softirq on PREEMPT_RT

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-12 17:38:43 [-0400], Joel Fernandes wrote: > > The prohibition on use_softirq should be able to be dropped once RT gets > > the latest RCU code, but the question of what use_softirq should default > > to on PREEMPT_RT remains. > > > > v3: Use IS_ENABLED I'm going to pick it up. > Out

Re: [PATCH RT v3 3/5] sched: migrate_dis/enable: Use rt_invol_sleep

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-11 17:57:27 [+0100], Scott Wood wrote: > diff --git a/kernel/cpu.c b/kernel/cpu.c > index 885a195dfbe0..32c6175b63b6 100644 > --- a/kernel/cpu.c > +++ b/kernel/cpu.c > @@ -308,7 +308,9 @@ void pin_current_cpu(void) > preempt_lazy_enable(); > preempt_enable(); > > +

Re: [PATCH RT v3 2/5] sched: Rename sleeping_lock to rt_invol_sleep

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-11 17:57:26 [+0100], Scott Wood wrote: > It's already used for one situation other than acquiring a lock, and the > next patch will add another, so change the name to avoid confusion. I know it has been suggested but please don't rename it, keep it as is. The _only_ reason why you are

Re: [PATCH RT v3 1/5] rcu: Acquire RCU lock when disabling BHs

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-11 17:57:25 [+0100], Scott Wood wrote: > index 388ace315f32..9ce7c5006a5e 100644 > --- a/include/linux/rcupdate.h > +++ b/include/linux/rcupdate.h > @@ -600,6 +600,36 @@ static inline void rcu_read_unlock(void) > rcu_lock_release(_lock_map); /* Keep acq info for rls diags. */ > }

Re: [PATCH] mm/slub: fix a deadlock in shuffle_freelist()

2019-09-17 Thread Sebastian Andrzej Siewior
On 2019-09-16 17:31:34 [-0400], Qian Cai wrote: … > get_random_u64() is also busted. … > [  753.486588]  Possible unsafe locking scenario: > > [  753.493890]CPU0CPU1 > [  753.499108] > [  753.504324]   lock(batched_entropy_u64.lock);

Re: [PATCH] mm/slub: fix a deadlock in shuffle_freelist()

2019-09-16 Thread Sebastian Andrzej Siewior
On 2019-09-16 10:01:27 [-0400], Qian Cai wrote: > On Mon, 2019-09-16 at 11:03 +0200, Sebastian Andrzej Siewior wrote: > > On 2019-09-13 12:27:44 [-0400], Qian Cai wrote: > > … > > > Chain exists of: > > > random_write_wait.lock --> >lock --> batched_entr

[PATCH] locking: locktorture: Do not include rwlock.h directly

2019-09-16 Thread Sebastian Andrzej Siewior
-by: Wolfgang M. Reimer Signed-off-by: Sebastian Andrzej Siewior --- kernel/locking/locktorture.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c index c513031cd7e33..9fb042d610d23 100644 --- a/kernel/locking/locktorture.c +++ b/kernel

Re: [PATCH] mm/slub: fix a deadlock in shuffle_freelist()

2019-09-16 Thread Sebastian Andrzej Siewior
On 2019-09-13 12:27:44 [-0400], Qian Cai wrote: … > Chain exists of: > random_write_wait.lock --> >lock --> batched_entropy_u32.lock > > Possible unsafe locking scenario: > >CPU0CPU1 > > lock(batched_entropy_u32.lock); >

[ANNOUNCE] v5.2.14-rt7

2019-09-13 Thread Sebastian Andrzej Siewior
Dear RT folks! I'm pleased to announce the v5.2.14-rt7 patch set. Changes since v5.2.14-rt6: - The recent hrtimer fix broke UP builds as reported by Alexander Dahl. Known issues - rcutorture is currently broken on -RT. Reported by Juri Lelli. The delta patch against v5.2.14-rt6 is

Re: [BUG RT] backtrace on v5.2.9-rt3

2019-09-13 Thread Sebastian Andrzej Siewior
On 2019-08-30 12:01:06 [-0400], Steven Rostedt wrote: > > I'm triggering the following call splat on 5.2-rt. > > [ 63.099414] 006: BUG: sleeping function called from invalid context at > kernel/locking/rtmutex.c:968 > [ 63.108423] 006: in_atomic(): 0, irqs_disabled(): 1, pid: 173, name: >

[tip: refs/heads/timers/core] hrtimer: Add a missing bracket and hide `migration_base' on !SMP

2019-09-05 Thread tip-bot2 for Sebastian Andrzej Siewior
The following commit has been merged into the refs/heads/timers/core branch of tip: Commit-ID: 5d2295f3a93b04986d069ebeaf5b07725f9096c1 Gitweb: https://git.kernel.org/tip/5d2295f3a93b04986d069ebeaf5b07725f9096c1 Author:Sebastian Andrzej Siewior AuthorDate:Wed, 04 Sep

[PATCH] gpio: Move gpiochip_.*lock_as_irq() to the proper ifdef

2019-09-04 Thread Sebastian Andrzej Siewior
eady under !CONFIG_GPIOLIB. Fixes: c7663fa2a6631 ("gpio: Move gpiochip_lock/unlock_as_irq to gpio/driver.h") Signed-off-by: Sebastian Andrzej Siewior --- include/linux/gpio/driver.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/gpio/driver.h b/include

[PATCH v2] hrtimer: Add a missing bracket and hide `migration_base' on !SMP

2019-09-04 Thread Sebastian Andrzej Siewior
uot;hrtimer: Don't take expiry_lock when timer is currently migrated") Signed-off-by: Sebastian Andrzej Siewior --- v1…v2: - use is_migration_base() as a helper function - slightly reword the commit message kernel/time/hrtimer.c | 12 +++- 1 file changed, 11 insertions(

[PATCH] hrtimer: Add a missing bracket and hide `migration_base' on !SMP

2019-09-04 Thread Sebastian Andrzej Siewior
68b2c8c1e4210 ("hrtimer: Don't take expiry_lock when timer is currently migrated") Signed-off-by: Sebastian Andrzej Siewior --- kernel/time/hrtimer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index f5

Re: [PREEMPT_RT PATCH 2/3] i915: convert all irq_locks spinlocks to raw spinlocks

2019-09-03 Thread Sebastian Andrzej Siewior
On 2019-09-03 10:03:35 [+0200], To Clark Williams wrote: > anything in a brief test. What I saw however is that switching to > fullscreen while playing a video gives me ~0.5 to ~2ms latency. This is > has nothing to do with this change, I have to dig deeper… It might be > one of the

Re: [PREEMPT_RT PATCH 2/3] i915: convert all irq_locks spinlocks to raw spinlocks

2019-09-03 Thread Sebastian Andrzej Siewior
On 2019-08-19 19:33:18 [-0500], Clark Williams wrote: > From: Clark Williams > > The following structures contain a member named 'irq_lock'. > These three locks are of type spinlock_t and are used in > multiple contexts including atomic: > > struct drm_i915_private > struct

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-28 Thread Sebastian Andrzej Siewior
On 2019-08-28 05:54:26 [-0700], Paul E. McKenney wrote: > On Wed, Aug 28, 2019 at 11:27:39AM +0200, Sebastian Andrzej Siewior wrote: > > On 2019-08-27 08:53:06 [-0700], Paul E. McKenney wrote: > > > Am I understanding this correctly? > > > > Everything perfect

[tip: timers/core] hrtimer: Add kernel doc annotation for HRTIMER_MODE_HARD

2019-08-28 Thread tip-bot2 for Sebastian Andrzej Siewior
The following commit has been merged into the timers/core branch of tip: Commit-ID: a67e408241783575716fcf3f79d0878f6cef0273 Gitweb: https://git.kernel.org/tip/a67e408241783575716fcf3f79d0878f6cef0273 Author:Sebastian Andrzej Siewior AuthorDate:Fri, 23 Aug 2019 13:38:44

[tip: timers/core] tick: Mark sched_timer to expire in hard interrupt context

2019-08-28 Thread tip-bot2 for Sebastian Andrzej Siewior
The following commit has been merged into the timers/core branch of tip: Commit-ID: 71fed982d63cb2bb88db6f36059e3b14a7913846 Gitweb: https://git.kernel.org/tip/71fed982d63cb2bb88db6f36059e3b14a7913846 Author:Sebastian Andrzej Siewior AuthorDate:Fri, 23 Aug 2019 13:38:45

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-28 Thread Sebastian Andrzej Siewior
On 2019-08-27 08:53:06 [-0700], Paul E. McKenney wrote: > > > On the other hand, within a PREEMPT=n kernel, the call to schedule() > > > would split even an rcu_read_lock() critical section. Which is why I > > > asked earlier if sleeping_lock_inc() and sleeping_lock_dec() are no-ops > > > in

Re: [ANNOUNCE] v5.2.10-rt5

2019-08-27 Thread Sebastian Andrzej Siewior
On 2019-08-27 14:34:19 [+0200], Alexander Dahl wrote: > Hello Sebastian, Hello Alexander, > This causes build errors on my side now, I tested with the .config we use on > our custom tree on a tag "v5.2.10-rt5-rebase", cross-compiling with gcc 7.3.1 > for ARCH=arm: of course, !SMP. What about

[ANNOUNCE] v5.2.10-rt5

2019-08-27 Thread Sebastian Andrzej Siewior
Dear RT folks! I'm pleased to announce the v5.2.10-rt5 patch set. Changes since v5.2.10-rt4: - Take care of compile issue within the timer-atmel-tcb driver on AT91. Reported by Alexander Dahl, patched by Alexandre Belloni. - Fixes to the hrtimer code to finally avoiding warnings while

[PATCH] Documentation: Rename rcu_node_context_switch() to rcu_note_context_switch()

2019-08-27 Thread Sebastian Andrzej Siewior
While Paul was explaning some RCU magic I noticed a typo in rcu_note_context_switch(). Replace rcu_node_context_switch() with rcu_note_context_switch(). Signed-off-by: Sebastian Andrzej Siewior --- .../RCU/Design/Memory-Ordering/Tree-RCU-Memory-Ordering.html| 2 +- Documentation/RCU/Design

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-27 Thread Sebastian Andrzej Siewior
On 2019-08-26 09:29:45 [-0700], Paul E. McKenney wrote: > > The mechanism that is used here may change in future. I just wanted to > > make sure that from RCU's side it is okay to schedule here. > > Good point. > > The effect from RCU's viewpoint will be to split any non-rcu_read_lock() > RCU

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-26 Thread Sebastian Andrzej Siewior
On 2019-08-23 14:46:39 [-0500], Scott Wood wrote: > > > Before consolidation, RT mapped rcu_read_lock_bh_held() to > > > rcu_read_lock_bh() and called rcu_read_lock() from > > > rcu_read_lock_bh(). This > > > somehow got lost when rebasing on top of 5.0. > > > > so now rcu_read_lock_bh_held() is

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-26 Thread Sebastian Andrzej Siewior
On 2019-08-23 23:10:14 [-0400], Joel Fernandes wrote: > On Fri, Aug 23, 2019 at 02:28:46PM -0500, Scott Wood wrote: > > On Fri, 2019-08-23 at 18:20 +0200, Sebastian Andrzej Siewior wrote: > > > > > > this looks like an ugly hack. This sleeping_lock_inc() is used w

Re: [PATCH RT v2 3/3] rcu: Disable use_softirq on PREEMPT_RT

2019-08-23 Thread Sebastian Andrzej Siewior
On 2019-08-21 16:40:18 [-0700], Paul E. McKenney wrote: > Save a couple of lines? > > static bool use_softirq = !IS_ENABLED(CONFIG_PREEMPT_RT_FULL); > > And if I understand your point above, the module_param() might be > able to be the same either way given the new RCU. But if not, > at least

Re: [PATCH RT v2 2/3] sched: migrate_enable: Use sleeping_lock to indicate involuntary sleep

2019-08-23 Thread Sebastian Andrzej Siewior
On 2019-08-21 18:19:05 [-0500], Scott Wood wrote: > Without this, rcu_note_context_switch() will complain if an RCU read > lock is held when migrate_enable() calls stop_one_cpu(). > > Signed-off-by: Scott Wood > --- > v2: Added comment. > > If my migrate disable changes aren't taken, then

Re: [PATCH RT v2 1/3] rcu: Acquire RCU lock when disabling BHs

2019-08-23 Thread Sebastian Andrzej Siewior
On 2019-08-22 22:23:23 [-0500], Scott Wood wrote: > On Thu, 2019-08-22 at 09:39 -0400, Joel Fernandes wrote: > > On Wed, Aug 21, 2019 at 04:33:58PM -0700, Paul E. McKenney wrote: > > > On Wed, Aug 21, 2019 at 06:19:04PM -0500, Scott Wood wrote: > > > > Signed-off-by: Scott Wood > > > > --- > > >

[PATCH 2/2] tick: Mark sched_timer in hard interrupt context

2019-08-23 Thread Sebastian Andrzej Siewior
The sched_timer should be initialized with the _HARD suffix. Most of this already happened in commit 902a9f9c50905 ("tick: Mark tick related hrtimers to expiry in hard interrupt context") but this one instance has been missed. Signed-off-by: Sebastian Andrzej Siewior --- k

<    1   2   3   4   5   6   7   8   9   10   >