aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorBharata B Rao <bharata@amd.com>2021-10-04 16:27:03 +0530
committerPeter Zijlstra <peterz@infradead.org>2021-10-14 13:09:58 +0200
commit7a2341fc1fec0b8b3580be4226ea244756d3a1b3 (patch)
treeb3f06e41f9fdd304a66b96dead63a1319359ca86 /kernel/sched
parentsched,livepatch: Use wake_up_if_idle() (diff)
downloadlinux-dev-7a2341fc1fec0b8b3580be4226ea244756d3a1b3.tar.xz
linux-dev-7a2341fc1fec0b8b3580be4226ea244756d3a1b3.zip
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@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Mel Gorman <mgorman@suse.de> Link: https://lkml.kernel.org/r/20211004105706.3669-2-bharata@amd.com
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/fair.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 2468d1d1edef..fc0a0ed63d15 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2438,7 +2438,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)