commit f0217e1d6bb355da7c5f16bb50ae1527523965e7 Author: Alexandre Frade Date: Mon Dec 14 22:09:57 2020 +0000 Linux 5.10.1-xanmod1 Signed-off-by: Alexandre Frade commit 01328dbc6743fadcd7938745855449a92ebd442a Merge: 2c00287937f6 841fca5a32cc Author: Alexandre Frade Date: Mon Dec 14 22:08:51 2020 +0000 Merge tag 'v5.10.1' into 5.10 This is the 5.10.1 stable release commit 2c00287937f6f5d253a9b32b7fc04e33b1686127 Author: Alexandre Frade Date: Mon Dec 14 19:56:08 2020 +0000 Linux 5.10.0-xanmod1 Signed-off-by: Alexandre Frade commit 77467adf2a308098f00f6fc05ab7023300a5985a 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 d45f43260a2d02eee32241ece3a6a6090eedbdb1 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 9e5c157ec1805a6c92667bc49bb9cadcdd8a203e 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 78ffcf5d8641d79c183107e235eca43daf445292 Author: Térence Clastres Date: Mon Oct 12 18:58:11 2020 +0200 futex: Restore futex_key Required for FUTEX_WAIT MULTIPLE implementation on Linux v5.9+. Signed-off-by: Alexandre Frade commit 701d7904b95d8ca30d5413ba7a3527365f03d8a5 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 f315e6f977cb487f37be86593579f058cdab1a4f Author: Con Kolivas Date: Mon Dec 14 19:09:01 2020 +0000 clockevents, hrtimer: Make hrtimer granularity and minimum hrtimeout configurable in sysctl. Set default granularity to 100us and min timeout to 500us Signed-off-by: Alexandre Frade commit 841fca5a32cccd7d0123c0271f4350161ada5507 Author: Greg Kroah-Hartman Date: Mon Dec 14 19:33:01 2020 +0100 Linux 5.10.1 Link: https://lore.kernel.org/r/20201214170452.563016590@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 26934c83005e75eab2b8d54d0fa5adbee4f27535 Author: Greg Kroah-Hartman Date: Mon Dec 14 17:51:18 2020 +0100 Revert "dm raid: fix discard limits for raid1 and raid10" This reverts commit e0910c8e4f87bb9f767e61a778b0d9271c4dc512. It causes problems :( Reported-by: Dave Jones Reported-by: Mike Snitzer Cc: Zdenek Kabelac Cc: Mikulas Patocka Cc: Linus Torvalds commit 859f70354379ce53be23bca3580cb7f77978c7a2 Author: Greg Kroah-Hartman Date: Mon Dec 14 17:48:11 2020 +0100 Revert "md: change mddev 'chunk_sectors' from int to unsigned" This reverts commit 6ffeb1c3f8226244c08105bcdbeecc04bad6b89a. It causes problems :( Reported-by: Dave Jones Reported-by: Mike Snitzer Cc: Song Liu Cc: Jens Axboe Cc: Linus Torvalds commit 2ac82cd4a1d2430c796abe17d7b277aa8464b171 Author: Con Kolivas Date: Mon Feb 20 13:32:58 2017 +1100 time: Don't use hrtimer overlay when pm_freezing since some drivers still don't correctly use freezable timeouts. commit 73704132d9467d273cd168cc7cbb9f47871c4dda Author: Con Kolivas Date: Mon Feb 20 13:30:32 2017 +1100 hrtimer: Replace all calls to schedule_timeout_uninterruptible of potentially under 50ms to use schedule_msec_hrtimeout_uninterruptible commit 09df1663efffecd7759218f2c0f787a214288c71 Author: Con Kolivas Date: Mon Feb 20 13:30:07 2017 +1100 hrtimer: Replace all calls to schedule_timeout_interruptible of potentially under 50ms to use schedule_msec_hrtimeout_interruptible. commit 400ccdbeca218a93859e6dafb25d72db3a39d54b Author: Con Kolivas Date: Mon Feb 20 13:28:30 2017 +1100 hrtimer: Replace all schedule timeout(1) with schedule_min_hrtimeout() commit 53ee597e1a5894d5f8c572683c537c672ab55217 Author: Con Kolivas Date: Fri Nov 4 09:25:54 2016 +1100 timer: Convert msleep to use hrtimers when active. commit a8fc5c95ed86e1c87f23127b8af7e88149cf0110 Author: Con Kolivas Date: Sat Nov 5 09:27:36 2016 +1100 time: Special case calls of schedule_timeout(1) to use the min hrtimeout of 1ms, working around low Hz resolutions. commit 2f2cb68fff0bc87e1900f8d7e2e8e69245de939a Author: Con Kolivas Date: Sat Aug 12 11:53:39 2017 +1000 hrtimer: Create highres timeout variants of schedule_timeout functions. commit dc1c2a060000af3b5b313bdc35bb5aaeba77ae9e Author: Mark Weiman Date: Sun Aug 12 11:36:21 2018 -0400 pci: Enable overrides for missing ACS capabilities This an updated version of Alex Williamson's patch from: https://lkml.org/lkml/2013/5/30/513 Original commit message follows: PCIe ACS (Access Control Services) is the PCIe 2.0+ feature that allows us to control whether transactions are allowed to be redirected in various subnodes of a PCIe topology. For instance, if two endpoints are below a root port or downsteam switch port, the downstream port may optionally redirect transactions between the devices, bypassing upstream devices. The same can happen internally on multifunction devices. The transaction may never be visible to the upstream devices. One upstream device that we particularly care about is the IOMMU. If a redirection occurs in the topology below the IOMMU, then the IOMMU cannot provide isolation between devices. This is why the PCIe spec encourages topologies to include ACS support. Without it, we have to assume peer-to-peer DMA within a hierarchy can bypass IOMMU isolation. Unfortunately, far too many topologies do not support ACS to make this a steadfast requirement. Even the latest chipsets from Intel are only sporadically supporting ACS. We have trouble getting interconnect vendors to include the PCIe spec required PCIe capability, let alone suggested features. Therefore, we need to add some flexibility. The pcie_acs_override= boot option lets users opt-in specific devices or sets of devices to assume ACS support. The "downstream" option assumes full ACS support on root ports and downstream switch ports. The "multifunction" option assumes the subset of ACS features available on multifunction endpoints and upstream switch ports are supported. The "id:nnnn:nnnn" option enables ACS support on devices matching the provided vendor and device IDs, allowing more strategic ACS overrides. These options may be combined in any order. A maximum of 16 id specific overrides are available. It's suggested to use the most limited set of options necessary to avoid completely disabling ACS across the topology. Note to hardware vendors, we have facilities to permanently quirk specific devices which enforce isolation but not provide an ACS capability. Please contact me to have your devices added and save your customers the hassle of this boot option. Signed-off-by: Mark Weiman commit 2f8656f5c0c21b59b871ef486ea306865f870d9e Author: graysky Date: Fri Nov 13 15:45:08 2020 -0500 x86/kconfig: Enable additional cpu optimizations for gcc v10.1+ kernel v5.8+ WARNING This patch works with gcc versions 10.1+ and with kernel version 5.8+ and should NOT be applied when compiling on older versions of gcc due to key name changes of the march flags introduced with the version 4.9 release of gcc.[1] Use the older version of this patch hosted on the same github for older versions of gcc. FEATURES This patch adds additional CPU options to the Linux kernel accessible under: Processor type and features ---> Processor family ---> The expanded microarchitectures include: * AMD Improved K8-family * AMD K10-family * AMD Family 10h (Barcelona) * AMD Family 14h (Bobcat) * AMD Family 16h (Jaguar) * AMD Family 15h (Bulldozer) * AMD Family 15h (Piledriver) * AMD Family 15h (Steamroller) * AMD Family 15h (Excavator) * AMD Family 17h (Zen) * AMD Family 17h (Zen 2) * Intel Silvermont low-power processors * Intel Goldmont low-power processors (Apollo Lake and Denverton) * Intel Goldmont Plus low-power processors (Gemini Lake) * Intel 1st Gen Core i3/i5/i7 (Nehalem) * Intel 1.5 Gen Core i3/i5/i7 (Westmere) * Intel 2nd Gen Core i3/i5/i7 (Sandybridge) * Intel 3rd Gen Core i3/i5/i7 (Ivybridge) * Intel 4th Gen Core i3/i5/i7 (Haswell) * Intel 5th Gen Core i3/i5/i7 (Broadwell) * Intel 6th Gen Core i3/i5/i7 (Skylake) * Intel 6th Gen Core i7/i9 (Skylake X) * Intel 8th Gen Core i3/i5/i7 (Cannon Lake) * Intel 10th Gen Core i7/i9 (Ice Lake) * Intel Xeon (Cascade Lake) * Intel Xeon (Cooper Lake) * Intel 3rd Gen 10nm++ i3/i5/i7/i9-family (Tiger Lake) It also offers to compile passing the 'native' option which, "selects the CPU to generate code for at compilation time by determining the processor type of the compiling machine. Using -march=native enables all instruction subsets supported by the local machine and will produce code optimized for the local machine under the constraints of the selected instruction set."[2] Do NOT try using the 'native' option on AMD Piledriver, Steamroller, or Excavator CPUs (-march=bdver{2,3,4} flag). The build will error out due the kernel's objtool issue with these.[3a,b] MINOR NOTES This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9 changes. Note that upstream is using the deprecated 'match=atom' flags when I believe it should use the newer 'march=bonnell' flag for atom processors.[4] It is not recommended to compile on Atom-CPUs with the 'native' option.[5] The recommendation is to use the 'atom' option instead. BENEFITS Small but real speed increases are measurable using a make endpoint comparing a generic kernel to one built with one of the respective microarchs. See the following experimental evidence supporting this statement: https://github.com/graysky2/kernel_gcc_patch REQUIREMENTS linux version >=5.8 gcc version >=10.1 ACKNOWLEDGMENTS This patch builds on the seminal work by Jeroen.[6] REFERENCES 1. https://gcc.gnu.org/gcc-4.9/changes.html 2. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html 3a. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95671#c11 3b. https://github.com/graysky2/kernel_gcc_patch/issues/55 4. https://bugzilla.kernel.org/show_bug.cgi?id=77461 5. https://github.com/graysky2/kernel_gcc_patch/issues/15 6. http://www.linuxforge.net/docs/linux/linux-gcc.php commit cdc1cedf140cb10eed81d3689bdcd351efc9a41a Author: Ben Hutchings Date: Mon Sep 7 02:51:53 2020 +0100 android: Export symbols needed by Android drivers We want to enable use of the Android ashmem and binder drivers to support Anbox, but they should not be built-in as that would waste resources and increase security attack surface on systems that don't need them. Export the currently un-exported symbols they depend on. commit 6665150f4172c8cdda2c1a25817cdf3264fd8e79 Author: Ben Hutchings Date: Fri Jun 22 17:27:00 2018 +0100 android: Enable building ashmem and binder as modules We want to enable use of the Android ashmem and binder drivers to support Anbox, but they should not be built-in as that would waste resources and increase security attack surface on systems that don't need them. - Add a MODULE_LICENSE declaration to ashmem - Change the Makefiles to build each driver as an object with the "_linux" suffix (which is what Anbox expects) - Change config symbol types to tristate commit fba3fdf0f4c9c850b1dc32ca69e34b63b0c0aaab Author: Arjan van de Ven Date: Sun Feb 18 23:35:41 2018 +0000 locking: rwsem: spin faster tweak rwsem owner spinning a bit commit 9be657a1c35b26478768c889cd745ee5870df5c4 Author: William Douglas Date: Wed Jun 20 17:23:21 2018 +0000 firmware: Enable stateless firmware loading Prefer the order of specific version before generic and /etc before /lib to enable the user to give specific overrides for generic firmware and distribution firmware. commit a188c00ee2a8330301a4c4deda16ce9a533a0763 Author: Arjan van de Ven Date: Sun Sep 22 11:12:35 2019 -0300 intel_rapl: Silence rapl trace debug commit ef3a9310bd6e1309ea631ccfa45eda9c9699cf2f Author: Piotr Gorski Date: Thu Jul 30 16:53:12 2020 -0800 init: add support for zstd compressed modules Signed-off-by: Piotr Gorski commit cda59e1485431ee8c6da4029b87e4b31875e19bd Author: Alexandre Frade Date: Thu Oct 15 21:28:33 2020 +0000 modules: disinherit TAINT_PROPRIETARY_MODULE Signed-off-by: Alexandre Frade commit 0d7e1b0c69b223093090984c301b922e93dda1fc Author: Scott James Remnant Date: Tue Oct 27 10:05:32 2009 +0000 trace: add trace events for open(), exec() and uselib() (for v3.7+) BugLink: http://bugs.launchpad.net/bugs/462111 This patch uses TRACE_EVENT to add tracepoints for the open(), exec() and uselib() syscalls so that ureadahead can cheaply trace the boot sequence to determine what to read to speed up the next. It's not upstream because it will need to be rebased onto the syscall trace events whenever that gets merged, and is a stop-gap. [apw@canonical.com: updated for v3.7 and later.] [apw@canonical.com: updated for v3.19 and later.] BugLink: http://bugs.launchpad.net/bugs/1085766 Signed-off-by: Scott James Remnant Acked-by: Stefan Bader Acked-by: Andy Whitcroft Signed-off-by: Stefan Bader Conflicts: fs/open.c Signed-off-by: Tim Gardner commit 7530d3213e30b6406f4183a206ca5c312028cc71 Author: Alexandre Frade Date: Thu Sep 3 20:36:13 2020 +0000 init/Kconfig: Enable -O3 KBUILD_CFLAGS optimization for all architectures Signed-off-by: Alexandre Frade commit c7ae89bfea6bc055adb38ed17abd40fd8aa908ed Author: Alexandre Frade Date: Thu Jun 25 16:40:43 2020 -0300 lib/kconfig.debug: disable default CONFIG_SYMBOLIC_ERRNAME and CONFIG_DEBUG_BUGVERBOSE Signed-off-by: Alexandre Frade commit 8930564c99efe479d5c2aaca7a9760c50ca3691a Author: Alexandre Frade Date: Mon Jan 29 17:41:29 2018 +0000 scripts: disable the localversion "+" tag of a git repo Signed-off-by: Alexandre Frade commit c36df79def5f70ed2118cfee7a37e0019ec7b486 Author: Alexandre Frade Date: Tue Mar 31 13:32:08 2020 -0300 cpufreq: tunes ondemand and conservative governor for performance Signed-off-by: Alexandre Frade commit 2e97c147186bda7c18697227c8262d1fcabcbe00 Author: Alexandre Frade Date: Mon Jan 29 17:31:25 2018 +0000 mm/vmscan: vm_swappiness = 30 decreases the amount of swapping Signed-off-by: Alexandre Frade commit ecae96c998a0a3c402822c9b07c0e1f799adb72f Author: Alexandre Frade Date: Thu Aug 13 14:57:06 2020 +0000 sched/autogroup: Add kernel parameter and config option to enable/disable autogroup feature by default Signed-off-by: Alexandre Frade commit 05348849965f50fdcdb1813bff849e46f197f14f Author: Alexandre Frade Date: Mon Jan 29 16:59:22 2018 +0000 dcache: cache_pressure = 50 decreases the rate at which VFS caches are reclaimed Signed-off-by: Alexandre Frade commit 0e96d54d9a30f7d9c9fa0479307368a4710f0183 Author: Alexandre Frade Date: Sun Oct 13 03:10:39 2019 -0300 kconfig: set PREEMPT and RCU_BOOST without delay by default Signed-off-by: Alexandre Frade commit b027c4060b0e19560e97a835a7cf1e0f04860580 Author: Alexandre Frade Date: Mon Jan 29 17:26:15 2018 +0000 kconfig: add 500Hz timer interrupt kernel config option Signed-off-by: Alexandre Frade commit a4fe3d5253fcaa996a37c389b17bdee493fe8158 Author: Alexandre Frade Date: Mon Jan 29 18:29:13 2018 +0000 sched/core: nr_migrate = 256 increases number of tasks to iterate in a single balance run. Signed-off-by: Alexandre Frade commit fff3507c469d76d826c994a7473353f899c64515 Author: Alexandre Frade Date: Mon Dec 14 16:24:26 2020 +0000 block: set rq_affinity to force full multithreading I/O requests Signed-off-by: Alexandre Frade commit fd8376cc13b309493652ac320abb62812cda788e Author: Alexandre Frade Date: Mon Jun 1 18:23:51 2020 -0300 block, bfq: change BLK_DEV_ZONED depends to IOSCHED_BFQ Signed-off-by: Alexandre Frade commit b20e12746c6ff4760877cb65f449d741a99ae010 Author: Alexandre Frade Date: Mon Nov 25 15:13:06 2019 -0300 elevator: set default scheduler to bfq for blk-mq Signed-off-by: Alexandre Frade