From: Miaohe Lin <linmiaohe@huawei.com>
To: <akpm@linux-foundation.org>, <sjenning@redhat.com>, <ddstreet@ieee.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
<linmiaohe@huawei.com>
Subject: [PATCH 1/2] mm/zbud: reuse unbuddied[0] as buddied in zbud_pool
Date: Sat, 5 Jun 2021 15:51:40 +0800 [thread overview]
Message-ID: <20210605075141.1359969-2-linmiaohe@huawei.com> (raw)
In-Reply-To: <20210605075141.1359969-1-linmiaohe@huawei.com>
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@huawei.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
next prev parent reply other threads:[~2021-06-05 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 7:51 [PATCH 0/2] Cleanups for zbud Miaohe Lin
2021-06-05 7:51 ` Miaohe Lin [this message]
2021-06-07 23:10 ` [PATCH 1/2] mm/zbud: reuse unbuddied[0] as buddied in zbud_pool Andrew Morton
2021-06-08 1:41 ` Miaohe Lin
2021-06-05 7:51 ` [PATCH 2/2] mm/zbud: don't export any zbud API Miaohe Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210605075141.1359969-2-linmiaohe@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=ddstreet@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjenning@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox