summaryrefslogtreecommitdiff
path: root/SOURCES/zen.patch
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCES/zen.patch')
-rw-r--r--SOURCES/zen.patch402
1 files changed, 398 insertions, 4 deletions
diff --git a/SOURCES/zen.patch b/SOURCES/zen.patch
index 89c1934..8507e36 100644
--- a/SOURCES/zen.patch
+++ b/SOURCES/zen.patch
@@ -1,3 +1,71 @@
+From c304f43d14e98d4bf1215fc10bc5012f554bdd8a Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <admfrade@gmail.com>
+Date: Mon, 29 Jan 2018 16:59:22 +0000
+Subject: [PATCH 02/17] dcache: cache_pressure = 50 decreases the rate at which
+ VFS caches are reclaimed
+
+Signed-off-by: Alexandre Frade <admfrade@gmail.com>
+---
+ fs/dcache.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/fs/dcache.c b/fs/dcache.c
+index 361ea7ab30ea..0c5cf69b241a 100644
+--- a/fs/dcache.c
++++ b/fs/dcache.c
+@@ -71,7 +71,7 @@
+ * If no ancestor relationship:
+ * arbitrary, since it's serialized on rename_lock
+ */
+-int sysctl_vfs_cache_pressure __read_mostly = 100;
++int sysctl_vfs_cache_pressure __read_mostly = 50;
+ EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
+
+ __cacheline_aligned_in_smp DEFINE_SEQLOCK(rename_lock);
+--
+2.28.0
+
+
+From 28f32f59d9d55ac7ec3a20b79bdd02d2a0a5f7e1 Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <admfrade@gmail.com>
+Date: Mon, 29 Jan 2018 18:29:13 +0000
+Subject: [PATCH 03/17] sched/core: nr_migrate = 128 increases number of tasks
+ to iterate in a single balance run.
+
+Signed-off-by: Alexandre Frade <admfrade@gmail.com>
+---
+ kernel/sched/core.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/kernel/sched/core.c b/kernel/sched/core.c
+index b1e0da5..1b43411 100644
+--- a/kernel/sched/core.c
++++ b/kernel/sched/core.c
+@@ -63,7 +63,7 @@ const_debug unsigned int sysctl_sched_features =
+ * Number of tasks to iterate in a single balance run.
+ * Limited because this is done with IRQs disabled.
+ */
+-const_debug unsigned int sysctl_sched_nr_migrate = 32;
++const_debug unsigned int sysctl_sched_nr_migrate = 128;
+
+ /*
+ * period over which we measure -rt task CPU usage in us.
+@@ -75,9 +75,9 @@ __read_mostly int scheduler_running;
+
+ /*
+ * part of the period that we allow rt tasks to run in us.
+- * default: 0.95s
++ * default: 0.98s
+ */
+-int sysctl_sched_rt_runtime = 950000;
++int sysctl_sched_rt_runtime = 980000;
+
+
+ /*
+--
+2.28.0
+
+
From f85ed068b4d0e6c31edce8574a95757a60e58b87 Mon Sep 17 00:00:00 2001
From: Etienne Juvigny <Ti3noU@gmail.com>
Date: Mon, 3 Sep 2018 17:36:25 +0200
@@ -246,6 +314,224 @@ index 74300e337c3c..9277f22c10a7 100644
2.28.0
+From 2b65a1329cb220b43c19c4d0de5833fae9e2b22d Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <admfrade@gmail.com>
+Date: Wed, 24 Oct 2018 16:58:52 -0300
+Subject: [PATCH 10/17] net/sched: allow configuring cake qdisc as default
+
+Signed-off-by: Alexandre Frade <admfrade@gmail.com>
+---
+ net/sched/Kconfig | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/net/sched/Kconfig b/net/sched/Kconfig
+index a3b37d8..1fcfd47 100644
+--- a/net/sched/Kconfig
++++ b/net/sched/Kconfig
+@@ -474,6 +474,9 @@ choice
+ config DEFAULT_SFQ
+ bool "Stochastic Fair Queue" if NET_SCH_SFQ
+
++ config DEFAULT_CAKE
++ bool "Common Applications Kept Enhanced" if NET_SCH_CAKE
++
+ config DEFAULT_PFIFO_FAST
+ bool "Priority FIFO Fast"
+ endchoice
+@@ -485,6 +488,7 @@ config DEFAULT_NET_SCH
+ default "fq_codel" if DEFAULT_FQ_CODEL
+ default "fq_pie" if DEFAULT_FQ_PIE
+ default "sfq" if DEFAULT_SFQ
++ default "cake" if DEFAULT_CAKE
+ default "pfifo_fast"
+ endif
+
+--
+2.28.0
+
+
+From 816ee502759e954304693813bd03d94986b28dba Mon Sep 17 00:00:00 2001
+From: Tk-Glitch <ti3nou@gmail.com>
+Date: Mon, 18 Feb 2019 17:40:57 +0100
+Subject: [PATCH 11/17] mm: Set watermark_scale_factor to 200 (from 10)
+
+Multiple users have reported it's helping reducing/eliminating stuttering
+with DXVK.
+---
+ mm/page_alloc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 898ff44f2c7b..e72074034793 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -330,7 +330,7 @@ int watermark_boost_factor __read_mostly;
+ #else
+ int watermark_boost_factor __read_mostly = 15000;
+ #endif
+-int watermark_scale_factor = 10;
++int watermark_scale_factor = 200;
+
+ static unsigned long nr_kernel_pages __initdata;
+ static unsigned long nr_all_pages __initdata;
+--
+2.28.0
+
+
+From 90240bcd90a568878738e66c0d45bed3e38e347b Mon Sep 17 00:00:00 2001
+From: Tk-Glitch <ti3nou@gmail.com>
+Date: Fri, 19 Apr 2019 12:33:38 +0200
+Subject: [PATCH 12/17] Set vm.max_map_count to 262144 by default
+
+The value is still pretty low, and AMD64-ABI and ELF extended numbering
+supports that, so we should be fine on modern x86 systems.
+
+This fixes crashes in some applications using more than 65535 vmas (also
+affects some windows games running in wine, such as Star Citizen).
+---
+ include/linux/mm.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index 8615504..2e10042 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -197,8 +197,7 @@ static inline void __mm_zero_struct_page(struct page *page)
+ * not a hard limit any more. Although some userspace tools can be surprised by
+ * that.
+ */
+-#define MAPCOUNT_ELF_CORE_MARGIN (5)
+-#define DEFAULT_MAX_MAP_COUNT (USHRT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
++#define DEFAULT_MAX_MAP_COUNT (262144)
+
+ extern int sysctl_max_map_count;
+
+--
+2.28.0
+
+
+From 3a34034dba5efe91bcec491efe8c66e8087f509b Mon Sep 17 00:00:00 2001
+From: Tk-Glitch <ti3nou@gmail.com>
+Date: Mon, 27 Jul 2020 00:19:18 +0200
+Subject: [PATCH 13/17] mm: bump DEFAULT_MAX_MAP_COUNT
+
+Some games such as Detroit: Become Human tend to be very crash prone with
+lower values.
+---
+ include/linux/mm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/mm.h b/include/linux/mm.h
+index 2e10042..84b708a 100644
+--- a/include/linux/mm.h
++++ b/include/linux/mm.h
+@@ -197,7 +197,7 @@ static inline void __mm_zero_struct_page(struct page *page)
+ * not a hard limit any more. Although some userspace tools can be surprised by
+ * that.
+ */
+-#define DEFAULT_MAX_MAP_COUNT (262144)
++#define DEFAULT_MAX_MAP_COUNT (524288)
+
+ extern int sysctl_max_map_count;
+
+--
+2.28.0
+
+
+From 977812938da7c7226415778c340832141d9278b7 Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <admfrade@gmail.com>
+Date: Mon, 25 Nov 2019 15:13:06 -0300
+Subject: [PATCH 14/17] elevator: set default scheduler to bfq for blk-mq
+
+Signed-off-by: Alexandre Frade <admfrade@gmail.com>
+---
+ block/elevator.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/block/elevator.c b/block/elevator.c
+index 90ed7a2..067482e 100644
+--- a/block/elevator.c
++++ b/block/elevator.c
+@@ -623,15 +623,15 @@ static inline bool elv_support_iosched(struct request_queue *q)
+ }
+
+ /*
+- * For single queue devices, default to using mq-deadline. If we have multiple
+- * queues or mq-deadline is not available, default to "none".
++ * For single queue devices, default to using bfq. If we have multiple
++ * queues or bfq is not available, default to "none".
+ */
+ static struct elevator_type *elevator_get_default(struct request_queue *q)
+ {
+ if (q->nr_hw_queues != 1)
+ return NULL;
+
+- return elevator_get(q, "mq-deadline", false);
++ return elevator_get(q, "bfq", false);
+ }
+
+ /*
+--
+2.28.0
+
+
+From e2111bc5989131c675659d40e0cc4f214df2f990 Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <admfrade@gmail.com>
+Date: Fri, 10 May 2019 16:45:59 -0300
+Subject: [PATCH 15/17] block: set rq_affinity = 2 for full multithreading I/O
+ requests
+
+Signed-off-by: Alexandre Frade <admfrade@gmail.com>
+---
+ include/linux/blkdev.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
+index 868e11f..47e5dc6 100644
+--- a/include/linux/blkdev.h
++++ b/include/linux/blkdev.h
+@@ -619,7 +619,8 @@ struct request_queue {
+ #define QUEUE_FLAG_RQ_ALLOC_TIME 27 /* record rq->alloc_time_ns */
+
+ #define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \
+- (1 << QUEUE_FLAG_SAME_COMP))
++ (1 << QUEUE_FLAG_SAME_COMP) | \
++ (1 << QUEUE_FLAG_SAME_FORCE))
+
+ void blk_queue_flag_set(unsigned int flag, struct request_queue *q);
+ void blk_queue_flag_clear(unsigned int flag, struct request_queue *q);
+--
+2.28.0
+
+
+From 3c229f434aca65c4ca61772bc03c3e0370817b92 Mon Sep 17 00:00:00 2001
+From: Alexandre Frade <kernel@xanmod.org>
+Date: Mon, 3 Aug 2020 17:05:04 +0000
+Subject: [PATCH 16/17] mm: set 2 megabytes for address_space-level file
+ read-ahead pages size
+
+Signed-off-by: Alexandre Frade <kernel@xanmod.org>
+---
+ include/linux/pagemap.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
+index 434c9c3..10c7117 100644
+--- a/include/linux/pagemap.h
++++ b/include/linux/pagemap.h
+@@ -699,7 +699,7 @@ int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask);
+ void delete_from_page_cache_batch(struct address_space *mapping,
+ struct pagevec *pvec);
+
+-#define VM_READAHEAD_PAGES (SZ_128K / PAGE_SIZE)
++#define VM_READAHEAD_PAGES (SZ_2M / PAGE_SIZE)
+
+ void page_cache_sync_readahead(struct address_space *, struct file_ra_state *,
+ struct file *, pgoff_t index, unsigned long req_count);
+--
+2.28.0
+
+
From 716f41cf6631f3a85834dcb67b4ce99185b6387f Mon Sep 17 00:00:00 2001
From: Steven Barrett <steven@liquorix.net>
Date: Wed, 15 Jan 2020 20:43:56 -0600
@@ -277,10 +563,10 @@ selection.
2 files changed, 5 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
-index fb95fad81c79..3e92fee81e33 100644
+index dca917a..dfc5f85 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
-@@ -1857,6 +1857,9 @@
+@@ -1880,6 +1880,9 @@
disable
Do not enable intel_pstate as the default
scaling driver for the supported processors
@@ -291,10 +577,10 @@ index fb95fad81c79..3e92fee81e33 100644
Use intel_pstate as a scaling driver, but configure it
to work with generic cpufreq governors (instead of
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
-index 36a469150ff9..aee891c9b78a 100644
+index ef15ec4..3a0d083 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
-@@ -2845,6 +2845,8 @@ static int __init intel_pstate_setup(char *str)
+@@ -3097,6 +3097,8 @@ static int __init intel_pstate_setup(char *str)
pr_info("HWP disabled\n");
no_hwp = 1;
}
@@ -306,3 +592,111 @@ index 36a469150ff9..aee891c9b78a 100644
--
2.28.0
+From: Sathish Narasimman <nsathish41@gmail.com>
+Subject: [PATCH] Bluetooth: Fix: LL PRivacy BLE device fails to connect
+Date: Thu, 22 Oct 2020 13:53:04 +0530
+
+When adding device to white list the device is added to resolving list
+also it has to be added only when HCI_ENABLE_LL_PRIVACY flag is set.
+HCI_ENABLE_LL_PRIVACY flag has to be tested before adding/deleting devices
+to resolving list. use_ll_privacy macro is used only to check if controller
+supports LL_Privacy.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=209745
+
+Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
+---
+ net/bluetooth/hci_request.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
+index e026919..f30bc18 100644
+--- a/net/bluetooth/hci_request.c
++++ b/net/bluetooth/hci_request.c
+@@ -698,7 +698,8 @@ static void del_from_white_list(struct hci_request *req, bdaddr_t *bdaddr,
+ cp.bdaddr_type);
+ hci_req_add(req, HCI_OP_LE_DEL_FROM_WHITE_LIST, sizeof(cp), &cp);
+
+- if (use_ll_privacy(req->hdev)) {
++ if (use_ll_privacy(req->hdev) &&
++ hci_dev_test_flag(req->hdev, HCI_ENABLE_LL_PRIVACY)) {
+ struct smp_irk *irk;
+
+ irk = hci_find_irk_by_addr(req->hdev, bdaddr, bdaddr_type);
+@@ -732,7 +733,8 @@ static int add_to_white_list(struct hci_request *req,
+ return -1;
+
+ /* White list can not be used with RPAs */
+- if (!allow_rpa && !use_ll_privacy(hdev) &&
++ if (!allow_rpa &&
++ !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) &&
+ hci_find_irk_by_addr(hdev, &params->addr, params->addr_type)) {
+ return -1;
+ }
+@@ -750,7 +752,8 @@ static int add_to_white_list(struct hci_request *req,
+ cp.bdaddr_type);
+ hci_req_add(req, HCI_OP_LE_ADD_TO_WHITE_LIST, sizeof(cp), &cp);
+
+- if (use_ll_privacy(hdev)) {
++ if (use_ll_privacy(hdev) &&
++ hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY)) {
+ struct smp_irk *irk;
+
+ irk = hci_find_irk_by_addr(hdev, &params->addr,
+@@ -812,7 +815,8 @@ static u8 update_white_list(struct hci_request *req)
+ }
+
+ /* White list can not be used with RPAs */
+- if (!allow_rpa && !use_ll_privacy(hdev) &&
++ if (!allow_rpa &&
++ !hci_dev_test_flag(hdev, HCI_ENABLE_LL_PRIVACY) &&
+ hci_find_irk_by_addr(hdev, &b->bdaddr, b->bdaddr_type)) {
+ return 0x00;
+ }
+
+From: Rajat Jain <rajatja@google.com>
+Subject: [PATCH] PCI: Always call pci_enable_acs() regardless of pdev->acs_cap
+Date: Wed, 28 Oct 2020 16:15:45 -0700
+
+Some devices may have have anomalies with the ACS cpability structure,
+and they may be using quirks to support ACS functionality via other
+registers. For such devices, it is important we always call
+pci_enable_acs() to give the quirks a chance to enable ACS in other ways.
+
+For Eg:
+There seems a class of Intel devices quirked with *_intel_pch_acs_*
+functions, that do not expose the standard ACS capability structure. But
+these quirks help support ACS on these devices using other registers:
+pci_quirk_enable_intel_pch_acs() -> doesn't use acs_cap to enable ACS
+
+This has already been taken care of in the quirks, in the other direction
+i.e. when checking if the ACS is enabled or not. So no need to do
+anything there.
+
+Reported-by: Boris V <borisvk@bstnet.org>
+Fixes: 52fbf5bdeeef ("PCI: Cache ACS capability offset in device")
+Signed-off-by: Rajat Jain <rajatja@google.com>
+---
+ drivers/pci/pci.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
+index e39c549..2e721e7 100644
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -3503,8 +3503,13 @@ void pci_acs_init(struct pci_dev *dev)
+ {
+ dev->acs_cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ACS);
+
+- if (dev->acs_cap)
+- pci_enable_acs(dev);
++ /*
++ * Attempt to enable ACS regardless of capability because some rootports
++ * (e.g. the ones quirked with *_intel_pch_acs_*) may not expose
++ * standard rootport capability structure, but still may support ACS via
++ * those quirks.
++ */
++ pci_enable_acs(dev);
+ }
+
+ /**