commit e0f6a8c9f8412fe70bc98e9538a41f22a4d47e59 Author: Alexandre Frade Date: Sun Apr 26 19:12:34 2020 -0300 Linux 5.6.4-rt3-xanmod1 Signed-off-by: Alexandre Frade commit b53de5a8b22851d12352684b6fe0c6d45f24efbf Author: Gabriel Krisman Bertazi Date: Thu Feb 13 18:45:25 2020 -0300 selftests: futex: Add FUTEX_WAIT_MULTIPLE wake up test Add test for wait at multiple futexes mechanism. Skip the test if it's a x32 application and the kernel returned the approtiaded error, since this ABI is not supported for this operation. Signed-off-by: Gabriel Krisman Bertazi Co-developed-by: André Almeida Signed-off-by: André Almeida Signed-off-by: Alexandre Frade commit 5977ca86d0056ecd862a02fee0b76871ce4ead0c Author: Gabriel Krisman Bertazi Date: Thu Feb 13 18:45:24 2020 -0300 selftests: futex: Add FUTEX_WAIT_MULTIPLE wouldblock test Add test for wouldblock return when waiting for multiple futexes. Skip the test if it's a x32 application and the kernel returned the approtiaded error, since this ABI is not supported for this operation. Signed-off-by: Gabriel Krisman Bertazi Co-developed-by: André Almeida Signed-off-by: André Almeida Signed-off-by: Alexandre Frade commit f3928a14da0ef3c42bde82233d14a3fe2b5861a3 Author: Gabriel Krisman Bertazi Date: Thu Feb 13 18:45:23 2020 -0300 selftests: futex: Add FUTEX_WAIT_MULTIPLE timeout test Add test for timeout when waiting for multiple futexes. Skip the test if it's a x32 application and the kernel returned the approtiaded error, since this ABI is not supported for this operation. Signed-off-by: Gabriel Krisman Bertazi Co-developed-by: André Almeida Signed-off-by: André Almeida Signed-off-by: Alexandre Frade commit c86cebee1fffa10edfbf58714e0358bece68ac5e Author: Gabriel Krisman Bertazi Date: Thu Feb 13 18:45:22 2020 -0300 futex: Implement mechanism to wait on any of several futexes This is a new futex operation, called FUTEX_WAIT_MULTIPLE, which allows a thread to wait on several futexes at the same time, and be awoken by any of them. In a sense, it implements one of the features that was supported by pooling on the old FUTEX_FD interface. The use case lies in the Wine implementation of the Windows NT interface WaitMultipleObjects. This Windows API function allows a thread to sleep waiting on the first of a set of event sources (mutexes, timers, signal, console input, etc) to signal. Considering this is a primitive synchronization operation for Windows applications, being able to quickly signal events on the producer side, and quickly go to sleep on the consumer side is essential for good performance of those running over Wine. Wine developers have an implementation that uses eventfd, but it suffers from FD exhaustion (there is applications that go to the order of multi-milion FDs), and higher CPU utilization than this new operation. The futex list is passed as an array of `struct futex_wait_block` (pointer, value, bitset) to the kernel, which will enqueue all of them and sleep if none was already triggered. It returns a hint of which futex caused the wake up event to userspace, but the hint doesn't guarantee that is the only futex triggered. Before calling the syscall again, userspace should traverse the list, trying to re-acquire any of the other futexes, to prevent an immediate -EWOULDBLOCK return code from the kernel. This was tested using three mechanisms: 1) By reimplementing FUTEX_WAIT in terms of FUTEX_WAIT_MULTIPLE and running the unmodified tools/testing/selftests/futex and a full linux distro on top of this kernel. 2) By an example code that exercises the FUTEX_WAIT_MULTIPLE path on a multi-threaded, event-handling setup. 3) By running the Wine fsync with Valve's Proton compatibility code implementation and executing multi-threaded applications, in particular modern games, on top of this implementation. Changes were tested for the following ABIs: x86_64, i386 and x32. Support for x32 applications is not implemented since it would take a major rework adding a new entry point and splitting the current futex 64 entry point in two and we can't change the current x32 syscall number without breaking user space compatibility. CC: Steven Rostedt Cc: Richard Yao Cc: Thomas Gleixner Cc: Peter Zijlstra Co-developed-by: Zebediah Figura Signed-off-by: Zebediah Figura Co-developed-by: Steven Noonan Signed-off-by: Steven Noonan Co-developed-by: Pierre-Loup A. Griffais Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Gabriel Krisman Bertazi [Added compatibility code] Co-developed-by: André Almeida Signed-off-by: André Almeida Signed-off-by: Alexandre Frade commit 2fd175207070d27ca01a2a44eda6c575d3148f98 Author: Alexandre Frade Date: Sun Apr 26 21:33:32 2020 -0300 Revert "futex: Add support for multiple keys at the same time" This reverts commit 704b2277b5e2a8b82f0a04db89fe6e0257696a39. commit 4bfd27b94dd15da7802b75a6edc4b5602ef64c39 Author: Alexandre Frade Date: Sun Apr 26 18:08:19 2020 -0300 sched/core: Set nr_migrate to increases number of tasks to iterate in a single balance run Signed-off-by: Alexandre Frade commit 0b7bf6cdb74c85cad1ad940db16ad28a52fc6d6c Author: Alexandre Frade Date: Sun Oct 13 03:10:39 2019 -0300 kconfig: set PREEMPT_RT and RCU_BOOST without delay by default Signed-off-by: Alexandre Frade commit 0c7d41f281d9a24ac89c827e6e9c6caa1102059a Merge: f3c81ea529d8 dfaaff88ce47 Author: Alexandre Frade Date: Sun Apr 26 21:31:56 2020 -0300 Merge tag 'v5.6.4-rt3' into 5.6-rt v5.6.4-rt3 commit f3c81ea529d8aaed1c86ce0ea5c1563bff055c86 Author: Alexandre Frade Date: Sun Apr 26 21:31:46 2020 -0300 Revert "sched/core: nr_migrate = 256 increases number of tasks to iterate in a single balance run." This reverts commit a82aa93072ecbba8c8d2090b8064260f6c69f3a6. commit ffd3350e0301ed7b78c251a4d40ca028b9bf8b4c Author: Alexandre Frade Date: Sun Apr 26 21:31:37 2020 -0300 Revert "kconfig: set PREEMPT and RCU_BOOST without delay by default" This reverts commit dabe920e725a16e8c8d492b8e3a2bb08bf7557fb. commit 987c068869c1d4a29597bdef80be626efcf5c453 Author: Alexandre Frade Date: Sun Apr 26 21:31:24 2020 -0300 Revert "fs: Introduce the Advanced Multi Layered Unification Filesystem (AUFS) v5.x-rcN 20200302" This reverts commit 40e69b3292279fc4e30792c9b4e8ba3387770545. commit 865ec92f9cbcdcddf453a81523ef56aa837753ca Author: Alexandre Frade Date: Tue Jul 18 01:34:22 2017 +0000 cpufreq: intel_pstate: Set default cpufreq_driver to intel_cpufreq for intel p-state Signed-off-by: Alexandre Frade commit dfaaff88ce47a3989eecefb50061bf2a3d51cabf Author: Sebastian Andrzej Siewior Date: Thu Apr 16 16:25:46 2020 +0200 v5.6.4-rt3 Signed-off-by: Sebastian Andrzej Siewior commit 9567db2ebe566a93485e1a27d8759969d0002d7a Author: Matt Fleming Date: Tue Apr 7 10:54:13 2020 +0100 signal: Prevent double-free of user struct The way user struct reference counting works changed significantly with, fda31c50292a ("signal: avoid double atomic counter increments for user accounting") Now user structs are only freed once the last pending signal is dequeued. Make sigqueue_free_current() follow this new convention to avoid freeing the user struct multiple times and triggering this warning: refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 6794 at lib/refcount.c:288 refcount_dec_not_one+0x45/0x50 Call Trace: refcount_dec_and_lock_irqsave+0x16/0x60 free_uid+0x31/0xa0 __dequeue_signal+0x17c/0x190 dequeue_signal+0x5a/0x1b0 do_sigtimedwait+0x208/0x250 __x64_sys_rt_sigtimedwait+0x6f/0xd0 do_syscall_64+0x72/0x200 entry_SYSCALL_64_after_hwframe+0x49/0xbe Signed-off-by: Matt Fleming Reported-by: Daniel Wagner Signed-off-by: Sebastian Andrzej Siewior commit 228e32024bdd543490cd70002b74cad05b532924 Author: Sebastian Andrzej Siewior Date: Thu Apr 16 11:37:51 2020 +0200 time: Properly initialize nohz_full_kick_work The ->flags member is of atomic_t type, use the proper initialisation method. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior commit 279f90ddf53cd6bd3c203fbbf488d642ea2603de Author: Sebastian Andrzej Siewior Date: Thu Apr 16 12:42:15 2020 +0200 fs/dcache: Include swait.h header Include the swait.h header so it compiles even if not all patches are applied. Reported-by: kbuild test robot Signed-off-by: Sebastian Andrzej Siewior commit 86535373f4377403e2a7da0279aecf1ba933d6b3 Author: John Ogness Date: Mon Apr 6 23:22:17 2020 +0200 printk: console must not schedule for drivers Even though the printk kthread is always preemptible, it is still not allowed to call cond_resched() from within console drivers. The task may become non-preemptible in the console driver call chain. For example, vt_console_print() takes a spinlock and then can call into fbcon_redraw(), which can conditionally invoke cond_resched(): |BUG: sleeping function called from invalid context at kernel/printk/printk.c:2322 |in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 177, name: printk |CPU: 0 PID: 177 Comm: printk Not tainted 5.6.2-00011-ga536059557f1d9 #1 |Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 |Call Trace: | dump_stack+0x66/0x8b | ___might_sleep+0x102/0x120 | console_conditional_schedule+0x24/0x30 | fbcon_redraw+0x96/0x1c0 | fbcon_scroll+0x556/0xd70 | con_scroll+0x147/0x1e0 | lf+0x9e/0xb0 | vt_console_print+0x253/0x3d0 | printk_kthread_func+0x1d5/0x3b0 Disable cond_resched() for the call into the console drivers. Reported-by: kernel test robot Signed-off-by: John Ogness Signed-off-by: Sebastian Andrzej Siewior commit 5a814b63783b9e98acb30cd81ae844bf79434c0a Author: Sebastian Andrzej Siewior Date: Thu Apr 16 16:21:24 2020 +0200 v5.6.4-rt2 Signed-off-by: Sebastian Andrzej Siewior commit e31acb8a8ac221d64555b91498375daddeb907c5 Merge: be0ee11d10b2 0a27a2949606 Author: Sebastian Andrzej Siewior Date: Thu Apr 16 16:21:07 2020 +0200 Merge tag 'v5.6.4' into linux-5.6.y-rt This is the 5.6.4 stable release Signed-off-by: Sebastian Andrzej Siewior