From: Greg Kroah-Hartman Date: Sun, 16 Jul 2023 09:42:14 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v6.1.39~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ae0a12b420094ec49f7c34d7388b5da65700b8;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: ipvs-increase-ip_vs_conn_tab_bits-range-for-64bit.patch --- diff --git a/queue-5.15/ipvs-increase-ip_vs_conn_tab_bits-range-for-64bit.patch b/queue-5.15/ipvs-increase-ip_vs_conn_tab_bits-range-for-64bit.patch new file mode 100644 index 00000000000..9f1da69a48c --- /dev/null +++ b/queue-5.15/ipvs-increase-ip_vs_conn_tab_bits-range-for-64bit.patch @@ -0,0 +1,90 @@ +From 04292c695f82b6cf0d25dd5ae494f16ddbb621f6 Mon Sep 17 00:00:00 2001 +From: Abhijeet Rastogi +Date: Tue, 16 May 2023 20:08:49 -0700 +Subject: ipvs: increase ip_vs_conn_tab_bits range for 64BIT + +From: Abhijeet Rastogi + +commit 04292c695f82b6cf0d25dd5ae494f16ddbb621f6 upstream. + +Current range [8, 20] is set purely due to historical reasons +because at the time, ~1M (2^20) was considered sufficient. +With this change, 27 is the upper limit for 64-bit, 20 otherwise. + +Previous change regarding this limit is here. + +Link: https://lore.kernel.org/all/86eabeb9dd62aebf1e2533926fdd13fed48bab1f.1631289960.git.aclaudi@redhat.com/T/#u + +Signed-off-by: Abhijeet Rastogi +Acked-by: Julian Anastasov +Acked-by: Simon Horman +Signed-off-by: Pablo Neira Ayuso +Cc: Allen Pais +Signed-off-by: Greg Kroah-Hartman +--- + net/netfilter/ipvs/Kconfig | 27 ++++++++++++++------------- + net/netfilter/ipvs/ip_vs_conn.c | 4 ++-- + 2 files changed, 16 insertions(+), 15 deletions(-) + +--- a/net/netfilter/ipvs/Kconfig ++++ b/net/netfilter/ipvs/Kconfig +@@ -44,7 +44,8 @@ config IP_VS_DEBUG + + config IP_VS_TAB_BITS + int "IPVS connection table size (the Nth power of 2)" +- range 8 20 ++ range 8 20 if !64BIT ++ range 8 27 if 64BIT + default 12 + help + The IPVS connection hash table uses the chaining scheme to handle +@@ -54,24 +55,24 @@ config IP_VS_TAB_BITS + + Note the table size must be power of 2. The table size will be the + value of 2 to the your input number power. The number to choose is +- from 8 to 20, the default number is 12, which means the table size +- is 4096. Don't input the number too small, otherwise you will lose +- performance on it. You can adapt the table size yourself, according +- to your virtual server application. It is good to set the table size +- not far less than the number of connections per second multiplying +- average lasting time of connection in the table. For example, your +- virtual server gets 200 connections per second, the connection lasts +- for 200 seconds in average in the connection table, the table size +- should be not far less than 200x200, it is good to set the table +- size 32768 (2**15). ++ from 8 to 27 for 64BIT(20 otherwise), the default number is 12, ++ which means the table size is 4096. Don't input the number too ++ small, otherwise you will lose performance on it. You can adapt the ++ table size yourself, according to your virtual server application. ++ It is good to set the table size not far less than the number of ++ connections per second multiplying average lasting time of ++ connection in the table. For example, your virtual server gets 200 ++ connections per second, the connection lasts for 200 seconds in ++ average in the connection table, the table size should be not far ++ less than 200x200, it is good to set the table size 32768 (2**15). + + Another note that each connection occupies 128 bytes effectively and + each hash entry uses 8 bytes, so you can estimate how much memory is + needed for your box. + + You can overwrite this number setting conn_tab_bits module parameter +- or by appending ip_vs.conn_tab_bits=? to the kernel command line +- if IP VS was compiled built-in. ++ or by appending ip_vs.conn_tab_bits=? to the kernel command line if ++ IP VS was compiled built-in. + + comment "IPVS transport protocol load balancing support" + +--- a/net/netfilter/ipvs/ip_vs_conn.c ++++ b/net/netfilter/ipvs/ip_vs_conn.c +@@ -1484,8 +1484,8 @@ int __init ip_vs_conn_init(void) + int idx; + + /* Compute size and mask */ +- if (ip_vs_conn_tab_bits < 8 || ip_vs_conn_tab_bits > 20) { +- pr_info("conn_tab_bits not in [8, 20]. Using default value\n"); ++ if (ip_vs_conn_tab_bits < 8 || ip_vs_conn_tab_bits > 27) { ++ pr_info("conn_tab_bits not in [8, 27]. Using default value\n"); + ip_vs_conn_tab_bits = CONFIG_IP_VS_TAB_BITS; + } + ip_vs_conn_tab_size = 1 << ip_vs_conn_tab_bits; diff --git a/queue-5.15/series b/queue-5.15/series index 65fa4362715..8f4396b267f 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -355,7 +355,6 @@ mmc-core-disable-trim-on-kingston-emmc04g-m627.patch mmc-core-disable-trim-on-micron-mtfc4gacajcn-1m.patch mmc-mmci-set-probe_prefer_asynchronous.patch mmc-sdhci-fix-dma-configure-compatibility-issue-when-64bit-dma-mode-is-used.patch -wifi-ath10k-serialize-wake_tx_queue-ops.patch bcache-fixup-btree_cache_wait-list-damage.patch bcache-remove-unnecessary-null-point-check-in-node-allocations.patch bcache-fix-__bch_btree_node_alloc-to-make-the-failure-behavior-consistent.patch @@ -367,5 +366,6 @@ ext4-remove-ext4-locking-of-moved-directory.patch revert-f2fs-fix-potential-corruption-when-moving-a-directory.patch fs-establish-locking-order-for-unrelated-directories.patch fs-lock-moved-directories.patch +ipvs-increase-ip_vs_conn_tab_bits-range-for-64bit.patch jffs2-reduce-stack-usage-in-jffs2_build_xattr_subsystem.patch fs-avoid-empty-option-when-generating-legacy-mount-string.patch diff --git a/queue-5.15/wifi-ath10k-serialize-wake_tx_queue-ops.patch b/queue-5.15/wifi-ath10k-serialize-wake_tx_queue-ops.patch deleted file mode 100644 index 5640753e8bd..00000000000 --- a/queue-5.15/wifi-ath10k-serialize-wake_tx_queue-ops.patch +++ /dev/null @@ -1,86 +0,0 @@ -From b719ebc37a1eacd4fd4f1264f731b016e5ec0c6e Mon Sep 17 00:00:00 2001 -From: Alexander Wetzel -Date: Thu, 23 Mar 2023 17:55:27 +0100 -Subject: wifi: ath10k: Serialize wake_tx_queue ops - -From: Alexander Wetzel - -commit b719ebc37a1eacd4fd4f1264f731b016e5ec0c6e upstream. - -Serialize the ath10k implementation of the wake_tx_queue ops. -ath10k_mac_op_wake_tx_queue() must not run concurrent since it's using -ieee80211_txq_schedule_start(). - -The intend of this patch is to sort out an issue discovered in the discussion -referred to by the Link tag. - -I can't test it with real hardware and thus just implemented the per-ac queue -lock Felix suggested. One obvious alternative to the per-ac lock would be to -bring back the txqs_lock commit bb2edb733586 ("ath10k: migrate to mac80211 txq -scheduling") dropped. - -Fixes: bb2edb733586 ("ath10k: migrate to mac80211 txq scheduling") -Reported-by: Felix Fietkau -Link: https://lore.kernel.org/r/519b5bb9-8899-ae7c-4eff-f3116cdfdb56@nbd.name -CC: -Signed-off-by: Alexander Wetzel -Signed-off-by: Kalle Valo -Link: https://lore.kernel.org/r/20230323165527.156414-1-alexander@wetzel-home.de -Signed-off-by: Greg Kroah-Hartman ---- - drivers/net/wireless/ath/ath10k/core.c | 3 +++ - drivers/net/wireless/ath/ath10k/core.h | 3 +++ - drivers/net/wireless/ath/ath10k/mac.c | 6 ++++-- - 3 files changed, 10 insertions(+), 2 deletions(-) - ---- a/drivers/net/wireless/ath/ath10k/core.c -+++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -3496,6 +3496,9 @@ struct ath10k *ath10k_core_create(size_t - mutex_init(&ar->dump_mutex); - spin_lock_init(&ar->data_lock); - -+ for (int ac = 0; ac < IEEE80211_NUM_ACS; ac++) -+ spin_lock_init(&ar->queue_lock[ac]); -+ - INIT_LIST_HEAD(&ar->peers); - init_waitqueue_head(&ar->peer_mapping_wq); - init_waitqueue_head(&ar->htt.empty_tx_wq); ---- a/drivers/net/wireless/ath/ath10k/core.h -+++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1167,6 +1167,9 @@ struct ath10k { - /* protects shared structure data */ - spinlock_t data_lock; - -+ /* serialize wake_tx_queue calls per ac */ -+ spinlock_t queue_lock[IEEE80211_NUM_ACS]; -+ - struct list_head arvifs; - struct list_head peers; - struct ath10k_peer *peer_map[ATH10K_MAX_NUM_PEER_IDS]; ---- a/drivers/net/wireless/ath/ath10k/mac.c -+++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -4712,13 +4712,14 @@ static void ath10k_mac_op_wake_tx_queue( - { - struct ath10k *ar = hw->priv; - int ret; -- u8 ac; -+ u8 ac = txq->ac; - - ath10k_htt_tx_txq_update(hw, txq); - if (ar->htt.tx_q_state.mode != HTT_TX_MODE_SWITCH_PUSH) - return; - -- ac = txq->ac; -+ spin_lock_bh(&ar->queue_lock[ac]); -+ - ieee80211_txq_schedule_start(hw, ac); - txq = ieee80211_next_txq(hw, ac); - if (!txq) -@@ -4733,6 +4734,7 @@ static void ath10k_mac_op_wake_tx_queue( - ath10k_htt_tx_txq_update(hw, txq); - out: - ieee80211_txq_schedule_end(hw, ac); -+ spin_unlock_bh(&ar->queue_lock[ac]); - } - - /* Must not be called with conf_mutex held as workers can use that also. */