[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220308134311.59086-8-linmiaohe@huawei.com>
Date: Tue, 8 Mar 2022 21:43:10 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <akpm@...ux-foundation.org>, <vitaly.wool@...sulko.com>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<linmiaohe@...wei.com>
Subject: [PATCH v2 7/8] mm/z3fold: remove redundant list_del_init of zhdr->buddy in z3fold_free
The do_compact_page will do list_del_init(&zhdr->buddy) for us. Remove this
extra one to save some possible cpu cycles.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
Reviewed-by: Vitaly Wool <vitaly.wool@...sulko.com>
---
mm/z3fold.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/z3fold.c b/mm/z3fold.c
index 18a697f6fe32..867c590df027 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1244,9 +1244,6 @@ static void z3fold_free(struct z3fold_pool *pool, unsigned long handle)
return;
}
if (zhdr->cpu < 0 || !cpu_online(zhdr->cpu)) {
- spin_lock(&pool->lock);
- list_del_init(&zhdr->buddy);
- spin_unlock(&pool->lock);
zhdr->cpu = -1;
kref_get(&zhdr->refcount);
clear_bit(PAGE_CLAIMED, &page->private);
--
2.23.0
Powered by blists - more mailing lists