[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210605075141.1359969-2-linmiaohe@huawei.com>
Date: Sat, 5 Jun 2021 15:51:40 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <akpm@...ux-foundation.org>, <sjenning@...hat.com>,
<ddstreet@...e.org>
CC: <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
<linmiaohe@...wei.com>
Subject: [PATCH 1/2] mm/zbud: reuse unbuddied[0] as buddied in zbud_pool
Since commit 9d8c5b5284e4 ("mm: zbud: fix condition check on allocation
size"), zbud_pool.unbuddied[0] is always unused. We can reuse it as buddied
field to save some possible memory.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
mm/zbud.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zbud.c b/mm/zbud.c
index a200121da400..91543be47e3d 100644
--- a/mm/zbud.c
+++ b/mm/zbud.c
@@ -96,7 +96,7 @@
struct zbud_pool {
spinlock_t lock;
struct list_head unbuddied[NCHUNKS];
- struct list_head buddied;
+#define buddied unbuddied[0]
struct list_head lru;
u64 pages_nr;
const struct zbud_ops *ops;
--
2.23.0
Powered by blists - more mailing lists