[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220318111709.60311-8-linmiaohe@huawei.com>
Date: Fri, 18 Mar 2022 19:17:05 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: <akpm@...ux-foundation.org>
CC: <ziy@...dia.com>, <baolin.wang@...ux.alibaba.com>,
<ying.huang@...el.com>, <songmuchun@...edance.com>,
<apopple@...dia.com>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>, <linmiaohe@...wei.com>
Subject: [PATCH v2 07/11] mm/migration: avoid unneeded nodemask_t initialization
Avoid unneeded next_pass and this_pass initialization as they're always
set before using to save possible cpu cycles when there are plenty of
nodes in the system.
Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
Reviewed-by: Muchun Song <songmuchun@...edance.com>
Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
---
mm/migrate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 92068d090db8..bb36f6b40f18 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2379,8 +2379,8 @@ static int establish_migrate_target(int node, nodemask_t *used,
*/
static void __set_migration_target_nodes(void)
{
- nodemask_t next_pass = NODE_MASK_NONE;
- nodemask_t this_pass = NODE_MASK_NONE;
+ nodemask_t next_pass;
+ nodemask_t this_pass;
nodemask_t used_targets = NODE_MASK_NONE;
int node, best_distance;
--
2.23.0
Powered by blists - more mailing lists