[RHEL7] Removed warning from kmalloc in function alloc_rootdomain

Submitted by Valeriy Vdovin on July 3, 2020, 4:12 p.m.


Message ID 1593792773-694225-1-git-send-email-valeriy.vdovin@virtuozzo.com
State New
Series "Removed warning from kmalloc in function alloc_rootdomain"
Headers show

Commit Message

Valeriy Vdovin July 3, 2020, 4:12 p.m.
'alloc_rootdomain' is used during cpu hotplug actions when cpu's are
removed or added. So it's relatively rare occasion. The size of
allocated structure 'struct root_domain' is ~22k, which is a warnable
order 3. Because this structure is related to sched domain the code
accessing it is considered of high priority due to execution in
scheduling codepaths, so we should not fallback to virtualized page
continuity in this allocation and suppress order warning instead.

Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3fe0d62..8d14614 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7141,7 +7141,7 @@  static struct root_domain *alloc_rootdomain(void)
 	struct root_domain *rd;
-	rd = kmalloc(sizeof(*rd), GFP_KERNEL);
+	rd = kmalloc(sizeof(*rd), GFP_KERNEL | __GFP_ORDER_NOWARN);
 	if (!rd)
 		return NULL;