From fd7675fd4c523bd3ef7b6a4a4b95b7fd19896aa3 Mon Sep 17 00:00:00 2001 From: Kernel Build Daemon Date: Mar 29 2023 07:29:46 +0000 Subject: Merge branch 'SLE15-SP5-GA' into SLE15-SP5-AZURE --- diff --git a/patches.suse/mm-memcontrol-deprecate-charge-moving.patch b/patches.suse/mm-memcontrol-deprecate-charge-moving.patch new file mode 100644 index 0000000..6d69304 --- /dev/null +++ b/patches.suse/mm-memcontrol-deprecate-charge-moving.patch @@ -0,0 +1,103 @@ +From: Johannes Weiner +Date: Wed, 7 Dec 2022 14:00:39 +0100 +Subject: mm: memcontrol: deprecate charge moving +Git-commit: da34a8484d162585e22ed8c1e4114aa2f60e3567 +Patch-mainline: v6.3-rc1 +References: bsc#1209801 + +Charge moving mode in cgroup1 allows memory to follow tasks as they +migrate between cgroups. This is, and always has been, a questionable +thing to do - for several reasons. + +First, it's expensive. Pages need to be identified, locked and isolated +from various MM operations, and reassigned, one by one. + +Second, it's unreliable. Once pages are charged to a cgroup, there isn't +always a clear owner task anymore. Cache isn't moved at all, for example. +Mapped memory is moved - but if trylocking or isolating a page fails, +it's arbitrarily left behind. Frequent moving between domains may leave a +task's memory scattered all over the place. + +Third, it isn't really needed. Launcher tasks can kick off workload tasks +directly in their target cgroup. Using dedicated per-workload groups +allows fine-grained policy adjustments - no need to move tasks and their +physical pages between control domains. The feature was never +forward-ported to cgroup2, and it hasn't been missed. + +Despite it being a niche usecase, the maintenance overhead of supporting +it is enormous. Because pages are moved while they are live and subject +to various MM operations, the synchronization rules are complicated. +There are lock_page_memcg() in MM and FS code, which non-cgroup people +don't understand. In some cases we've been able to shift code and cgroup +API calls around such that we can rely on native locking as much as +possible. But that's fragile, and sometimes we need to hold MM locks for +longer than we otherwise would (pte lock e.g.). + +Mark the feature deprecated. Hopefully we can remove it soon. + +And backport into -stable kernels so that people who develop against +earlier kernels are warned about this deprecation as early as possible. + +[akpm@linux-foundation.org: fix memory.rst underlining] +Link: https://lkml.kernel.org/r/Y5COd+qXwk/S+n8N@cmpxchg.org +Signed-off-by: Johannes Weiner +Acked-by: Shakeel Butt +Acked-by: Hugh Dickins +Acked-by: Michal Hocko +Cc: Muchun Song +Cc: Roman Gushchin +Cc: +Signed-off-by: Andrew Morton +Acked-by: Michal Koutný +--- + Documentation/admin-guide/cgroup-v1/memory.rst | 13 +++++++++++-- + mm/memcontrol.c | 4 ++++ + 2 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/Documentation/admin-guide/cgroup-v1/memory.rst b/Documentation/admin-guide/cgroup-v1/memory.rst +index 60370f2c67b9..258e45cc3b2d 100644 +--- a/Documentation/admin-guide/cgroup-v1/memory.rst ++++ b/Documentation/admin-guide/cgroup-v1/memory.rst +@@ -86,6 +86,8 @@ Brief summary of control files. + memory.swappiness set/show swappiness parameter of vmscan + (See sysctl's vm.swappiness) + memory.move_charge_at_immigrate set/show controls of moving charges ++ This knob is deprecated and shouldn't be ++ used. + memory.oom_control set/show oom controls. + memory.numa_stat show the number of memory usage per numa + node +@@ -717,8 +719,15 @@ NOTE2: + It is recommended to set the soft limit always below the hard limit, + otherwise the hard limit will take precedence. + +-8. Move charges at task migration +-================================= ++8. Move charges at task migration (DEPRECATED!) ++=============================================== ++ ++THIS IS DEPRECATED! ++ ++It's expensive and unreliable! It's better practice to launch workload ++tasks directly from inside their target cgroup. Use dedicated workload ++cgroups to allow fine-grained policy adjustments without having to ++move physical pages between control domains. + + Users can move charges associated with a task along with task migration, that + is, uncharge task's pages from the old cgroup and charge them to the new cgroup. +diff --git a/mm/memcontrol.c b/mm/memcontrol.c +index a698a2b6523b..49f67176a1a2 100644 +--- a/mm/memcontrol.c ++++ b/mm/memcontrol.c +@@ -3919,6 +3919,10 @@ static int mem_cgroup_move_charge_write(struct cgroup_subsys_state *css, + { + struct mem_cgroup *memcg = mem_cgroup_from_css(css); + ++ pr_warn_once("Cgroup memory moving (move_charge_at_immigrate) is deprecated. " ++ "Please report your usecase to linux-mm@kvack.org if you " ++ "depend on this functionality.\n"); ++ + if (val & ~MOVE_MASK) + return -EINVAL; + + diff --git a/patches.suse/net-add-net-device-refcount-tracker-infrastructure.patch b/patches.suse/net-add-net-device-refcount-tracker-infrastructure.patch index 4155931..74cdc95 100644 --- a/patches.suse/net-add-net-device-refcount-tracker-infrastructure.patch +++ b/patches.suse/net-add-net-device-refcount-tracker-infrastructure.patch @@ -65,7 +65,7 @@ Acked-by: Thomas Bogendoerfer struct gro_list { struct list_head list; int count; -@@ -1854,6 +1861,7 @@ enum netdev_ml_priv_type { +@@ -1859,6 +1866,7 @@ enum netdev_ml_priv_type { * @proto_down_reason: reason a netdev interface is held down * @pcpu_refcnt: Number of references to this device * @dev_refcnt: Number of references to this device @@ -73,7 +73,7 @@ Acked-by: Thomas Bogendoerfer * @todo_list: Delayed register/unregister * @link_watch_list: XXX: need comments on this one * -@@ -2161,6 +2169,7 @@ struct net_device { +@@ -2166,6 +2174,7 @@ struct net_device { #else refcount_t dev_refcnt; #endif @@ -81,7 +81,7 @@ Acked-by: Thomas Bogendoerfer struct list_head link_watch_list; -@@ -3783,6 +3792,7 @@ void netdev_run_todo(void); +@@ -3793,6 +3802,7 @@ void netdev_run_todo(void); * @dev: network device * * Release reference to device to allow it to be freed. @@ -89,7 +89,7 @@ Acked-by: Thomas Bogendoerfer */ static inline void dev_put(struct net_device *dev) { -@@ -3798,6 +3808,7 @@ static inline void dev_put(struct net_de +@@ -3810,6 +3820,7 @@ static inline void dev_put(struct net_de * @dev: network device * * Hold reference to device to keep it from being freed. @@ -97,8 +97,8 @@ Acked-by: Thomas Bogendoerfer */ static inline void dev_hold(struct net_device *dev) { -@@ -3808,6 +3819,40 @@ static inline void dev_hold(struct net_d - #endif +@@ -3822,6 +3833,40 @@ static inline void dev_hold(struct net_d + } } +static inline void netdev_tracker_alloc(struct net_device *dev, @@ -140,7 +140,7 @@ Acked-by: Thomas Bogendoerfer * who is responsible for serialization of these calls. --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug -@@ -595,6 +595,11 @@ config DEBUG_MISC +@@ -596,6 +596,11 @@ config DEBUG_MISC Say Y here if you need to enable miscellaneous debug code that should be under a more specific debug option but isn't. @@ -167,7 +167,7 @@ Acked-by: Thomas Bogendoerfer + This adds memory and cpu costs. --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -9806,6 +9806,7 @@ static void netdev_wait_allrefs(struct n +@@ -9863,6 +9863,7 @@ static void netdev_wait_allrefs(struct n netdev_unregister_timeout_secs * HZ)) { pr_emerg("unregister_netdevice: waiting for %s to become free. Usage count = %d\n", dev->name, refcnt); @@ -175,7 +175,7 @@ Acked-by: Thomas Bogendoerfer warning_time = jiffies; } } -@@ -10096,6 +10097,7 @@ struct net_device *alloc_netdev_mqs(int +@@ -10153,6 +10154,7 @@ struct net_device *alloc_netdev_mqs(int dev = PTR_ALIGN(p, NETDEV_ALIGN); dev->padded = (char *)dev - (char *)p; @@ -183,7 +183,7 @@ Acked-by: Thomas Bogendoerfer #ifdef CONFIG_PCPU_DEV_REFCNT dev->pcpu_refcnt = alloc_percpu(int); if (!dev->pcpu_refcnt) -@@ -10212,6 +10214,7 @@ void free_netdev(struct net_device *dev) +@@ -10269,6 +10271,7 @@ void free_netdev(struct net_device *dev) list_for_each_entry_safe(p, n, &dev->napi_list, dev_list) netif_napi_del(p); diff --git a/patches.suse/netdevice-add-the-case-if-dev-is-NULL.patch b/patches.suse/netdevice-add-the-case-if-dev-is-NULL.patch new file mode 100644 index 0000000..533c4ea --- /dev/null +++ b/patches.suse/netdevice-add-the-case-if-dev-is-NULL.patch @@ -0,0 +1,51 @@ +From: Yajun Deng +Date: Thu, 5 Aug 2021 19:54:34 +0800 +Subject: netdevice: add the case if dev is NULL +Patch-mainline: v5.15-rc1 +Git-commit: b37a466837393af72fe8bcb8f1436410f3f173f3 +References: bsc#1208628 + +Add the case if dev is NULL in dev_{put, hold}, so the caller doesn't +need to care whether dev is NULL or not. + +Signed-off-by: Yajun Deng +Signed-off-by: David S. Miller +Acked-by: Thomas Bogendoerfer +--- + include/linux/netdevice.h | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/include/linux/netdevice.h ++++ b/include/linux/netdevice.h +@@ -4130,11 +4130,13 @@ void netdev_run_todo(void); + */ + static inline void dev_put(struct net_device *dev) + { ++ if (dev) { + #ifdef CONFIG_PCPU_DEV_REFCNT +- this_cpu_dec(*dev->pcpu_refcnt); ++ this_cpu_dec(*dev->pcpu_refcnt); + #else +- refcount_dec(&dev->dev_refcnt); ++ refcount_dec(&dev->dev_refcnt); + #endif ++ } + } + + /** +@@ -4145,11 +4147,13 @@ static inline void dev_put(struct net_de + */ + static inline void dev_hold(struct net_device *dev) + { ++ if (dev) { + #ifdef CONFIG_PCPU_DEV_REFCNT +- this_cpu_inc(*dev->pcpu_refcnt); ++ this_cpu_inc(*dev->pcpu_refcnt); + #else +- refcount_inc(&dev->dev_refcnt); ++ refcount_inc(&dev->dev_refcnt); + #endif ++ } + } + + /* Carrier loss detection, dial on demand. The functions netif_carrier_on diff --git a/series.conf b/series.conf index ee5d8c7..c926590 100644 --- a/series.conf +++ b/series.conf @@ -1187,6 +1187,7 @@ patches.suse/net-Replace-deprecated-CPU-hotplug-functions.patch patches.suse/net-ipa-fix-IPA-v4.9-interconnects.patch patches.suse/net-fix-GRO-skb-truesize-update.patch + patches.suse/netdevice-add-the-case-if-dev-is-NULL.patch patches.suse/net-dsa-tag_sja1105-optionally-build-as-module-when-.patch patches.suse/netdevsim-Forbid-devlink-reload-when-adding-or-delet.patch patches.suse/netdevsim-Protect-both-reload_down-and-reload_up-pat.patch @@ -36897,6 +36898,7 @@ patches.suse/ipmi_ssif-Rename-idle-state-and-check.patch patches.suse/ipmi-ssif-Remove-rtc_us_timer.patch patches.suse/ipmi-ssif-Add-a-timer-between-request-retries.patch + patches.suse/mm-memcontrol-deprecate-charge-moving.patch patches.suse/ibmvnic-Assign-XPS-map-to-correct-queue-index.patch patches.suse/bnxt_en-Avoid-order-5-memory-allocation-for-TPA-data.patch