Skip to content

Commit 04b2252

Browse files
committed
Merge: mm/mm_init: use node's number of cpus in deferred_page_init_max_threads
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/6326 JIRA: https://issues.redhat.com/browse/RHEL-77271 Signed-off-by: Eric Chanudet <echanude@redhat.com> Approved-by: Desnes Nunes <desnesn@redhat.com> Approved-by: Herton R. Krzesinski <herton@redhat.com> Approved-by: Rafael Aquini <raquini@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Augusto Caringi <acaringi@redhat.com>
2 parents e5d2461 + 161697f commit 04b2252

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

arch/x86/mm/init_64.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,18 +1366,6 @@ void __init mem_init(void)
13661366
preallocate_vmalloc_pages();
13671367
}
13681368

1369-
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
1370-
int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask)
1371-
{
1372-
/*
1373-
* More CPUs always led to greater speedups on tested systems, up to
1374-
* all the nodes' CPUs. Use all since the system is otherwise idle
1375-
* now.
1376-
*/
1377-
return max_t(int, cpumask_weight(node_cpumask), 1);
1378-
}
1379-
#endif
1380-
13811369
int kernel_set_to_readonly;
13821370

13831371
void mark_rodata_ro(void)

include/linux/memblock.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,6 @@ void __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
325325
for (; i != U64_MAX; \
326326
__next_mem_pfn_range_in_zone(&i, zone, p_start, p_end))
327327

328-
int __init deferred_page_init_max_threads(const struct cpumask *node_cpumask);
329-
330328
#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
331329

332330
/**

mm/mm_init.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,11 +2165,10 @@ deferred_init_memmap_chunk(unsigned long start_pfn, unsigned long end_pfn,
21652165
}
21662166
}
21672167

2168-
/* An arch may override for more concurrency. */
2169-
__weak int __init
2168+
static unsigned int __init
21702169
deferred_page_init_max_threads(const struct cpumask *node_cpumask)
21712170
{
2172-
return 1;
2171+
return max(cpumask_weight(node_cpumask), 1U);
21732172
}
21742173

21752174
/* Initialise remaining memory on a node */

0 commit comments

Comments
 (0)