[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211004105706.3669-2-bharata@amd.com>
Date: Mon, 4 Oct 2021 16:27:03 +0530
From: Bharata B Rao <bharata@....com>
To: <linux-kernel@...r.kernel.org>
CC: <mingo@...hat.com>, <peterz@...radead.org>, <mgorman@...e.de>,
<riel@...hat.com>, Bharata B Rao <bharata@....com>
Subject: [PATCH 1/4] sched/numa: Replace hard-coded number by a define in numa_task_group()
While allocating group fault stats, task_numa_group()
is using a hard coded number 4. Replace this by
NR_NUMA_HINT_FAULT_STATS.
No functionality change in this commit.
Signed-off-by: Bharata B Rao <bharata@....com>
---
kernel/sched/fair.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ff69f245b939..e8a696fd713d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2481,7 +2481,8 @@ static void task_numa_group(struct task_struct *p, int cpupid, int flags,
if (unlikely(!deref_curr_numa_group(p))) {
unsigned int size = sizeof(struct numa_group) +
- 4*nr_node_ids*sizeof(unsigned long);
+ NR_NUMA_HINT_FAULT_STATS *
+ nr_node_ids * sizeof(unsigned long);
grp = kzalloc(size, GFP_KERNEL | __GFP_NOWARN);
if (!grp)
--
2.25.1
Powered by blists - more mailing lists