Message ID | 20250129224157.2046079-22-fvdl@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C2CAC02190 for <linux-mm@archiver.kernel.org>; Wed, 29 Jan 2025 22:43:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B5D8F28026A; Wed, 29 Jan 2025 17:42:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A740F280269; Wed, 29 Jan 2025 17:42:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6734F28026C; Wed, 29 Jan 2025 17:42:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D3F3C28026C for <linux-mm@kvack.org>; Wed, 29 Jan 2025 17:42:52 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 914A9C04E9 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 22:42:52 +0000 (UTC) X-FDA: 83061965784.28.2794056 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf13.hostedemail.com (Postfix) with ESMTP id CE40C20008 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 22:42:50 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=KXAeoMCB; spf=pass (imf13.hostedemail.com: domain of 36a6aZwQKCPQbrZhckkcha.Ykihejqt-iigrWYg.knc@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=36a6aZwQKCPQbrZhckkcha.Ykihejqt-iigrWYg.knc@flex--fvdl.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738190570; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=m0+bWUW0pfRrXDtFyRBgF5DnwWrUxEqL81u9NMeAeCs=; b=wm7RjPBkXFGisIvh0dWMQEPz2+xSmpYEe981asaixWkhtNSdSIBRPDbWqJkQSP2ibnKcdG rEk7mBtb1T1kWgYB2f4ODhnJtqiOmQfogMN1ct/YGLl+BZjiCKGbm0GI5B4L+RcXfjeixV /GkTrGPlxIrTbhjIfmTacb5/4sUzgbs= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=KXAeoMCB; spf=pass (imf13.hostedemail.com: domain of 36a6aZwQKCPQbrZhckkcha.Ykihejqt-iigrWYg.knc@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=36a6aZwQKCPQbrZhckkcha.Ykihejqt-iigrWYg.knc@flex--fvdl.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738190570; a=rsa-sha256; cv=none; b=HSlRbPU7YaOPq5WKvTkw2wgZd194/IPdOoHVpPFG06eqK5Q2CBD50t/L0q3rDUYYeplUmv 0FOhBtYhSAChhCKUlBklmBIPEubXVrqkGBR8TFCa34QoxlwtZLb6zoHVr4tgoSZLLg4D1f eb4WDHTwm4rj2089AHHj1O0dF2z5Ob8= Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-216717543b7so3955005ad.0 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 14:42:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738190569; x=1738795369; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=m0+bWUW0pfRrXDtFyRBgF5DnwWrUxEqL81u9NMeAeCs=; b=KXAeoMCB+G0MmAo+P3hAkcvMprD8p7HzSNfPU0joYbrq32GNDCW1g2mbdmYtTbFlfG W0NqQkwxiqNPv/hqbUHO/SUSc5sa7OXGDvTMAN5V8HkaG8h/9Z2lDdI/uY0SpeqWH8Ho OG0rETDODLRi3cMYb7MHpo3u5QdROMS1doEiBmUFNBoHWEsRYJfKBuL4gF9fxLjY3RQ6 S8tOWoXwr3LNSkXsmVabX+C2V4GGV0mhdwSAeE2552wSH9ggR35r0R2VtRN8Vere0A3L bZVGoGsZWk/vEflulMpIw/x/CJYceg/flZ+VOHAyoLE0qXCpwssUbYlqwYH5zw/cZISK ej0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738190569; x=1738795369; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m0+bWUW0pfRrXDtFyRBgF5DnwWrUxEqL81u9NMeAeCs=; b=kIgzd7gwkQuM/gDHkLXFPdgx1t1sHTEjwhIMsH9MDa9Ri6FqwgyqD+THPiy36yZZv3 NatKujn42hyQEZRIPwKn+c1jK0Tpl+2a3QJur2oCs3Y09OWjU0TvsaIyJSgeUi/HaCYe sE4ygPbjLOIoeAFOvUjErJAWoyO++62m1yU9Yhpi7qn5mHVJ3w2cAfNnyPa3j/XgzUY8 1hTApNR6GJVj9EiUn+o3IGfsZBGju6H9nEwT6p6Oi4H4C4Ez6O4lJKAcgHh3KdqL5yGJ ttrihg0T62Ah3wN0WQo5xf1kzGrz0Bj/+FXiqMfMzTRhxvm7HRxp+sJN2rD07ddLU02I sC/g== X-Forwarded-Encrypted: i=1; AJvYcCVuKB4fcFhPWuEKndC2oqjaUnfgzmTje0IGJHbuBaSNpTtz/4S9DrKtkXiTrY6BpBgtCf/7w0F7yQ==@kvack.org X-Gm-Message-State: AOJu0Yx/+2wW1xKh2j4YIdef/ixqBrauoQ02XBZX9KVkZXPrFs1X4XnW HZaRPZMTn418+DbxvKal0jfDsXgbGtpHVPbQRMo90w2Mv0MtEiPpM0NIwl628Hs/wGZd8g== X-Google-Smtp-Source: AGHT+IGzEL5Rip0Mz0fmGy5xX7dEt6FjPy6j1I5Lgvi49arCFvPrf2CjjL7zxLhk7rZXQGyKts87I7hf X-Received: from pgwg3.prod.google.com ([2002:a65:6cc3:0:b0:7fd:50ab:dc45]) (user=fvdl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:498:b0:1e1:a647:8a54 with SMTP id adf61e73a8af0-1ed7a640d32mr8499455637.20.1738190569677; Wed, 29 Jan 2025 14:42:49 -0800 (PST) Date: Wed, 29 Jan 2025 22:41:50 +0000 In-Reply-To: <20250129224157.2046079-1-fvdl@google.com> Mime-Version: 1.0 References: <20250129224157.2046079-1-fvdl@google.com> X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: <20250129224157.2046079-22-fvdl@google.com> Subject: [PATCH v2 21/28] x86/setup: call hugetlb_bootmem_alloc early From: Frank van der Linden <fvdl@google.com> To: akpm@linux-foundation.org, muchun.song@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: yuzhao@google.com, usamaarif642@gmail.com, joao.m.martins@oracle.com, roman.gushchin@linux.dev, Frank van der Linden <fvdl@google.com>, Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CE40C20008 X-Stat-Signature: kgrxppiirdbj64b9mommznhi8hyybtty X-HE-Tag: 1738190570-968098 X-HE-Meta: U2FsdGVkX1+F/1dd8XO49Blm4/AiPwSre80fg/cLCi2d5hFYd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PTPGotbK6HypP1XOk7elaF39NvHfncg4KUfGiw9yCDR848DTPocd0nqxipWPDZmgzrRL+21HLl/9uky4Eo1vEzu5aUvceVSnlfJt/oA2ULI5MAK31zic5XJAOGqOYsrjufFq2xH+aCz03pFtrsX7Fv2riklEZ7lrHaa16LLpMZGhi4l6CJh0jsuOL1VEvZl3kScOBXq6CTxm66OtKEKKXlJPQEkgAMhIoNChSc3U0nbjZ71JkjZyoK6syh+SjR/hLqFsekSXmSpkbbndRpktsuzLZVlMC8i9OsQhglHSCrF7anWHmAdeatsAIb2mXXlolk27Av9SU3H59tIhmKwoJEHW8Eu5pQhJ6bkudKPtgfkCYhRIXPmSMOK7SpcCkpCwIbLetKkHQWrN0ZVDvzSiiOe/+5EZ1PqPSxTprSzjd2iqF+0j/lAYsU2GyTvy1RHiJbSaAcriz9lEV/HlU31sOT8aZVE1mWkE+lQGiZ3g24I6ssto6PG5ha4K8wf1OlodK3m3iVtQ3NtQUgiV9J5cirh1Ta1Dj5xSGRsB/ecDjGyWN9g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
hugetlb/CMA improvements for large systems
|
expand
|
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index cebee310e200..ff8604007b08 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1108,8 +1108,10 @@ void __init setup_arch(char **cmdline_p) initmem_init(); dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT); - if (boot_cpu_has(X86_FEATURE_GBPAGES)) + if (boot_cpu_has(X86_FEATURE_GBPAGES)) { hugetlb_cma_reserve(PUD_SHIFT - PAGE_SHIFT); + hugetlb_bootmem_alloc(); + } /* * Reserve memory for crash kernel after SRAT is parsed so that it
Call hugetlb_bootmem_allloc in an earlier spot in setup, after hugelb_cma_reserve. This will make vmemmap preinit of the sections covered by the allocated hugetlb pages possible. Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Frank van der Linden <fvdl@google.com> --- arch/x86/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)