diff options
Diffstat (limited to 'SOURCES/tkg.patch')
-rw-r--r-- | SOURCES/tkg.patch | 428 |
1 files changed, 0 insertions, 428 deletions
diff --git a/SOURCES/tkg.patch b/SOURCES/tkg.patch deleted file mode 100644 index f29c409..0000000 --- a/SOURCES/tkg.patch +++ /dev/null @@ -1,428 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jan200101 <sentrycraft123@gmail.com> -Date: Tue, 6 Aug 2024 19:20:54 +0200 -Subject: [PATCH] tkg glitched base - -Signed-off-by: Jan200101 <sentrycraft123@gmail.com> ---- - .../admin-guide/kernel-parameters.txt | 3 ++ - Makefile | 3 ++ - block/elevator.c | 6 ++-- - drivers/cpufreq/intel_pstate.c | 2 ++ - drivers/infiniband/core/addr.c | 1 + - drivers/input/evdev.c | 19 ++++++----- - drivers/md/dm-crypt.c | 5 +++ - fs/dcache.c | 2 +- - include/linux/mm.h | 3 +- - include/linux/pageblock-flags.h | 2 +- - include/linux/pagemap.h | 2 +- - init/Kconfig | 32 +++++++++++++++++++ - init/Makefile | 2 +- - kernel/sched/rt.c | 4 +-- - mm/huge_memory.c | 4 +++ - mm/page_alloc.c | 9 +++--- - net/ipv4/Kconfig | 4 +++ - net/sched/Kconfig | 4 +++ - scripts/setlocalversion | 14 ++++---- - 19 files changed, 91 insertions(+), 30 deletions(-) - -diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt -index 2569e7f19b47..5b79a61afd6d 100644 ---- a/Documentation/admin-guide/kernel-parameters.txt -+++ b/Documentation/admin-guide/kernel-parameters.txt -@@ -355,6 +355,9 @@ - disable - Do not enable amd_pstate as the default - scaling driver for the supported processors -+ enable -+ Enable intel_pstate in-case "disable" was passed -+ previously in the kernel boot parameters - passive - Use amd_pstate with passive mode as a scaling driver. - In this mode autonomous selection is disabled. -diff --git a/Makefile b/Makefile -index c0af6d8aeb05..94d76f300914 100644 ---- a/Makefile -+++ b/Makefile -@@ -999,6 +999,9 @@ KBUILD_CFLAGS += $(call cc-option, -fstrict-flex-arrays=3) - KBUILD_CFLAGS-$(CONFIG_CC_NO_STRINGOP_OVERFLOW) += $(call cc-option, -Wno-stringop-overflow) - KBUILD_CFLAGS-$(CONFIG_CC_STRINGOP_OVERFLOW) += $(call cc-option, -Wstringop-overflow) - -+# disable GCC vectorization on trees -+KBUILD_CFLAGS += $(call cc-option, -fno-tree-vectorize) -+ - # disable invalid "can't wrap" optimizations for signed / pointers - KBUILD_CFLAGS += -fno-strict-overflow - -diff --git a/block/elevator.c b/block/elevator.c -index f64ebd726e58..73227b97162b 100644 ---- a/block/elevator.c -+++ b/block/elevator.c -@@ -557,8 +557,8 @@ 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) - { -@@ -569,7 +569,7 @@ static struct elevator_type *elevator_get_default(struct request_queue *q) - !blk_mq_is_shared_tags(q->tag_set->flags)) - return NULL; - -- return elevator_find_get(q, "mq-deadline"); -+ return elevator_find_get(q, "bfq"); - } - - /* -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index c31914a9876f..d6ed90b3c930 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -3558,6 +3558,8 @@ static int __init intel_pstate_setup(char *str) - if (!strcmp(str, "no_hwp")) - no_hwp = 1; - -+ if (!strcmp(str, "enable")) -+ no_load = 0; - if (!strcmp(str, "force")) - force_load = 1; - if (!strcmp(str, "hwp_only")) -diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c -index be0743dac3ff..358eb15e1d69 100644 ---- a/drivers/infiniband/core/addr.c -+++ b/drivers/infiniband/core/addr.c -@@ -814,6 +814,7 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid, - union { - struct sockaddr_in _sockaddr_in; - struct sockaddr_in6 _sockaddr_in6; -+ struct sockaddr_ib _sockaddr_ib; - } sgid_addr, dgid_addr; - int ret; - -diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c -index 51e0c4954600..35c3ad741870 100644 ---- a/drivers/input/evdev.c -+++ b/drivers/input/evdev.c -@@ -46,6 +46,7 @@ struct evdev_client { - struct fasync_struct *fasync; - struct evdev *evdev; - struct list_head node; -+ struct rcu_head rcu; - enum input_clock_type clk_type; - bool revoked; - unsigned long *evmasks[EV_CNT]; -@@ -377,13 +378,22 @@ static void evdev_attach_client(struct evdev *evdev, - spin_unlock(&evdev->client_lock); - } - -+static void evdev_reclaim_client(struct rcu_head *rp) -+{ -+ struct evdev_client *client = container_of(rp, struct evdev_client, rcu); -+ unsigned int i; -+ for (i = 0; i < EV_CNT; ++i) -+ bitmap_free(client->evmasks[i]); -+ kvfree(client); -+} -+ - static void evdev_detach_client(struct evdev *evdev, - struct evdev_client *client) - { - spin_lock(&evdev->client_lock); - list_del_rcu(&client->node); - spin_unlock(&evdev->client_lock); -- synchronize_rcu(); -+ call_rcu(&client->rcu, evdev_reclaim_client); - } - - static int evdev_open_device(struct evdev *evdev) -@@ -436,7 +446,6 @@ static int evdev_release(struct inode *inode, struct file *file) - { - struct evdev_client *client = file->private_data; - struct evdev *evdev = client->evdev; -- unsigned int i; - - mutex_lock(&evdev->mutex); - -@@ -448,11 +457,6 @@ static int evdev_release(struct inode *inode, struct file *file) - - evdev_detach_client(evdev, client); - -- for (i = 0; i < EV_CNT; ++i) -- bitmap_free(client->evmasks[i]); -- -- kvfree(client); -- - evdev_close_device(evdev); - - return 0; -@@ -495,7 +499,6 @@ static int evdev_open(struct inode *inode, struct file *file) - - err_free_client: - evdev_detach_client(evdev, client); -- kvfree(client); - return error; - } - -diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c -index 1b7a97cc3779..bed9d9588b87 100644 ---- a/drivers/md/dm-crypt.c -+++ b/drivers/md/dm-crypt.c -@@ -3284,6 +3284,11 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) - goto bad; - } - -+#ifdef CONFIG_ZENIFY -+ set_bit(DM_CRYPT_NO_READ_WORKQUEUE, &cc->flags); -+ set_bit(DM_CRYPT_NO_WRITE_WORKQUEUE, &cc->flags); -+#endif -+ - ret = crypt_ctr_cipher(ti, argv[0], argv[1]); - if (ret < 0) - goto bad; -diff --git a/fs/dcache.c b/fs/dcache.c -index 4c144519aa70..fb0f9a1368c8 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); -diff --git a/include/linux/mm.h b/include/linux/mm.h -index b58bad248eef..dbae141dc3ce 100644 ---- a/include/linux/mm.h -+++ b/include/linux/mm.h -@@ -192,8 +192,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 (16777216) - - extern int sysctl_max_map_count; - -diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h -index 547e82cdc89a..67a999944cdb 100644 ---- a/include/linux/pageblock-flags.h -+++ b/include/linux/pageblock-flags.h -@@ -52,7 +52,7 @@ extern unsigned int pageblock_order; - #else /* CONFIG_TRANSPARENT_HUGEPAGE */ - - /* If huge pages are not used, group by MAX_ORDER_NR_PAGES */ --#define pageblock_order MAX_PAGE_ORDER -+#define pageblock_order PAGE_ALLOC_COSTLY_ORDER - - #endif /* CONFIG_HUGETLB_PAGE */ - -diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h -index a0a026d2d244..4d2e7d8512d1 100644 ---- a/include/linux/pagemap.h -+++ b/include/linux/pagemap.h -@@ -1281,7 +1281,7 @@ struct readahead_control { - ._index = i, \ - } - --#define VM_READAHEAD_PAGES (SZ_128K / PAGE_SIZE) -+#define VM_READAHEAD_PAGES (SZ_2M / PAGE_SIZE) - - void page_cache_ra_unbounded(struct readahead_control *, - unsigned long nr_to_read, unsigned long lookahead_count); -diff --git a/init/Kconfig b/init/Kconfig -index febdea2afc3b..c8c6671c9549 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -132,6 +132,38 @@ config THREAD_INFO_IN_TASK - - menu "General setup" - -+config ZENIFY -+ bool "A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience" -+ default y -+ help -+ Tunes the kernel for responsiveness at the cost of throughput and power usage. -+ -+ --- Virtual Memory Subsystem --------------------------- -+ -+ Mem dirty before bg writeback..: 10 % -> 20 % -+ Mem dirty before sync writeback: 20 % -> 50 % -+ -+ --- Block Layer ---------------------------------------- -+ -+ Queue depth...............: 128 -> 512 -+ Default MQ scheduler......: mq-deadline -> bfq -+ -+ --- CFS CPU Scheduler ---------------------------------- -+ -+ Scheduling latency.............: 6 -> 3 ms -+ Minimal granularity............: 0.75 -> 0.3 ms -+ Wakeup granularity.............: 1 -> 0.5 ms -+ CPU migration cost.............: 0.5 -> 0.25 ms -+ Bandwidth slice size...........: 5 -> 3 ms -+ Ondemand fine upscaling limit..: 95 % -> 85 % -+ -+ --- MuQSS CPU Scheduler -------------------------------- -+ -+ Scheduling interval............: 6 -> 3 ms -+ ISO task max realtime use......: 70 % -> 25 % -+ Ondemand coarse upscaling limit: 80 % -> 45 % -+ Ondemand fine upscaling limit..: 95 % -> 45 % -+ - config BROKEN - bool - -diff --git a/init/Makefile b/init/Makefile -index ab71cedc5fd6..eafc4ef50ab5 100644 ---- a/init/Makefile -+++ b/init/Makefile -@@ -33,7 +33,7 @@ build-timestamp = $(or $(KBUILD_BUILD_TIMESTAMP), $(build-timestamp-auto)) - - # Maximum length of UTS_VERSION is 64 chars - filechk_uts_version = \ -- utsver=$$(echo '$(pound)'"$(build-version)" $(smp-flag-y) $(preempt-flag-y) "$(build-timestamp)" | cut -b -64); \ -+ utsver=$$(echo '$(pound)'"$(build-version)" $(smp-flag-y) $(preempt-flag-y) "TKG" "$(build-timestamp)" | cut -b -64); \ - echo '$(pound)'define UTS_VERSION \""$${utsver}"\" - - # -diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c -index aa4c1c874fa4..cd58198e990f 100644 ---- a/kernel/sched/rt.c -+++ b/kernel/sched/rt.c -@@ -20,9 +20,9 @@ int sysctl_sched_rt_period = 1000000; - - /* - * part of the period that we allow rt tasks to run in us. -- * default: 0.95s -+ * XanMod default: 0.98s - */ --int sysctl_sched_rt_runtime = 950000; -+int sysctl_sched_rt_runtime = 980000; - - #ifdef CONFIG_SYSCTL - static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC * RR_TIMESLICE) / HZ; -diff --git a/mm/huge_memory.c b/mm/huge_memory.c -index 374a0d54b08d..1d4efe9df1a6 100644 ---- a/mm/huge_memory.c -+++ b/mm/huge_memory.c -@@ -63,7 +63,11 @@ unsigned long transparent_hugepage_flags __read_mostly = - #ifdef CONFIG_TRANSPARENT_HUGEPAGE_MADVISE - (1<<TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG)| - #endif -+#ifdef CONFIG_ZENIFY -+ (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KSWAPD_OR_MADV_FLAG)| -+#else - (1<<TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG)| -+#endif - (1<<TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG)| - (1<<TRANSPARENT_HUGEPAGE_USE_ZERO_PAGE_FLAG); - -diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index df2c442f1c47..d8d83c503419 100644 ---- a/mm/page_alloc.c -+++ b/mm/page_alloc.c -@@ -2228,16 +2228,17 @@ __rmqueue(struct zone *zone, unsigned int order, int migratetype, - } - - /* -- * Obtain a specified number of elements from the buddy allocator, all under -- * a single hold of the lock, for efficiency. Add them to the supplied list. -- * Returns the number of new pages which were placed at *list. -+ * Obtain a specified number of elements from the buddy allocator, and relax the -+ * zone lock when needed. Add them to the supplied list. Returns the number of -+ * new pages which were placed at *list. - */ - static int rmqueue_bulk(struct zone *zone, unsigned int order, - unsigned long count, struct list_head *list, - int migratetype, unsigned int alloc_flags) - { - unsigned long flags; -- int i; -+ const bool can_resched = !preempt_count() && !irqs_disabled(); -+ int i, allocated = 0, last_mod = 0; - - spin_lock_irqsave(&zone->lock, flags); - for (i = 0; i < count; ++i) { -diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig -index 8e94ed7c56a0..c103bc45c900 100644 ---- a/net/ipv4/Kconfig -+++ b/net/ipv4/Kconfig -@@ -700,6 +700,9 @@ choice - config DEFAULT_VEGAS - bool "Vegas" if TCP_CONG_VEGAS=y - -+ config DEFAULT_YEAH -+ bool "YeAH" if TCP_CONG_YEAH=y -+ - config DEFAULT_VENO - bool "Veno" if TCP_CONG_VENO=y - -@@ -733,6 +736,7 @@ config DEFAULT_TCP_CONG - default "htcp" if DEFAULT_HTCP - default "hybla" if DEFAULT_HYBLA - default "vegas" if DEFAULT_VEGAS -+ default "yeah" if DEFAULT_YEAH - default "westwood" if DEFAULT_WESTWOOD - default "veno" if DEFAULT_VENO - default "reno" if DEFAULT_RENO -diff --git a/net/sched/Kconfig b/net/sched/Kconfig -index 8180d0c12fce..22c5a59d5058 100644 ---- a/net/sched/Kconfig -+++ b/net/sched/Kconfig -@@ -438,6 +438,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 -@@ -449,6 +452,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 - -diff --git a/scripts/setlocalversion b/scripts/setlocalversion -index 38b96c6797f4..e22768e0e875 100755 ---- a/scripts/setlocalversion -+++ b/scripts/setlocalversion -@@ -92,7 +92,7 @@ scm_version() - # If only the short version is requested, don't bother - # running further git commands - if $short; then -- echo "+" -+ #echo "+" - return - fi - # If we are past the tagged commit, we pretty print it. -@@ -119,12 +119,12 @@ scm_version() - # git-diff-index does not refresh the index, so it may give misleading - # results. - # See git-update-index(1), git-diff-index(1), and git-status(1). -- if { -- git --no-optional-locks status -uno --porcelain 2>/dev/null || -- git diff-index --name-only HEAD -- } | read dummy; then -- printf '%s' -dirty -- fi -+ #if { -+ # git --no-optional-locks status -uno --porcelain 2>/dev/null || -+ # git diff-index --name-only HEAD -+ #} | read dummy; then -+ # printf '%s' -dirty -+ #fi - } - - collect_files() |