* [merged mm-stable] mm-memcg-minor-cleanup-for-mem_cgroup_id_max.patch removed from -mm tree
@ 2023-08-11 22:59 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-11 22:59 UTC (permalink / raw)
To: mm-commits, songmuchun, shakeelb, roman.gushchin, mhocko, hannes,
linmiaohe, akpm
The quilt patch titled
Subject: mm/memcg: minor cleanup for MEM_CGROUP_ID_MAX
has been removed from the -mm tree. Its filename was
mm-memcg-minor-cleanup-for-mem_cgroup_id_max.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Miaohe Lin <linmiaohe@huawei.com>
Subject: mm/memcg: minor cleanup for MEM_CGROUP_ID_MAX
Date: Sat, 8 Jul 2023 10:33:04 +0800
MEM_CGROUP_ID_MAX is only used when CONFIG_MEMCG is configured. So remove
unneeded !CONFIG_MEMCG variant. Also it's only used in
mem_cgroup_alloc(), so move it from memcontrol.h to memcontrol.c. And
further define it as:
#define MEM_CGROUP_ID_MAX ((1UL << MEM_CGROUP_ID_SHIFT) - 1)
so if someone changes MEM_CGROUP_ID_SHIFT in the future, then
MEM_CGROUP_ID_MAX will be updated accordingly, as suggested by Muchun.
Link: https://lkml.kernel.org/r/20230708023304.1184111-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/memcontrol.h | 2 --
mm/memcontrol.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
--- a/include/linux/memcontrol.h~mm-memcg-minor-cleanup-for-mem_cgroup_id_max
+++ a/include/linux/memcontrol.h
@@ -61,7 +61,6 @@ struct mem_cgroup_reclaim_cookie {
#ifdef CONFIG_MEMCG
#define MEM_CGROUP_ID_SHIFT 16
-#define MEM_CGROUP_ID_MAX USHRT_MAX
struct mem_cgroup_id {
int id;
@@ -1158,7 +1157,6 @@ unsigned long mem_cgroup_soft_limit_recl
#else /* CONFIG_MEMCG */
#define MEM_CGROUP_ID_SHIFT 0
-#define MEM_CGROUP_ID_MAX 0
static inline struct mem_cgroup *folio_memcg(struct folio *folio)
{
--- a/mm/memcontrol.c~mm-memcg-minor-cleanup-for-mem_cgroup_id_max
+++ a/mm/memcontrol.c
@@ -5155,6 +5155,7 @@ static struct cftype mem_cgroup_legacy_f
* those references are manageable from userspace.
*/
+#define MEM_CGROUP_ID_MAX ((1UL << MEM_CGROUP_ID_SHIFT) - 1)
static DEFINE_IDR(mem_cgroup_idr);
static void mem_cgroup_id_remove(struct mem_cgroup *memcg)
_
Patches currently in -mm which might be from linmiaohe@huawei.com are
mm-memory-failure-fix-unexpected-return-value-in-soft_offline_page.patch
mm-memory-failure-fix-potential-page-refcnt-leak-in-memory_failure.patch
mm-memcg-fix-obsolete-function-name-in-mem_cgroup_protection.patch
mm-memory-failure-add-pageoffline-check.patch
mm-page_alloc-avoid-unneeded-alike_pages-calculation.patch
mm-memcg-update-obsolete-comment-above-parent_mem_cgroup.patch
mm-page_alloc-remove-unneeded-variable-base.patch
mm-memcg-fix-wrong-function-name-above-obj_cgroup_charge_zswap.patch
mm-memory-failure-use-helper-macro-llist_for_each_entry_safe.patch
mm-mm_init-use-helper-macro-bits_per_long-and-bits_per_byte.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-11 23:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 22:59 [merged mm-stable] mm-memcg-minor-cleanup-for-mem_cgroup_id_max.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.