Message ID | 20250127232207.3888640-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 10BB9C0218A for <linux-mm@archiver.kernel.org>; Mon, 27 Jan 2025 23:23:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7F8A2801CE; Mon, 27 Jan 2025 18:23:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 83CF52801D9; Mon, 27 Jan 2025 18:23:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 474612801CD; Mon, 27 Jan 2025 18:23:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 8D9062801CB for <linux-mm@kvack.org>; Mon, 27 Jan 2025 18:23:00 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 510EEA0873 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 23:23:00 +0000 (UTC) X-FDA: 83054809320.30.6F7BD74 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf16.hostedemail.com (Postfix) with ESMTP id 8B71A18000C for <linux-mm@kvack.org>; Mon, 27 Jan 2025 23:22:58 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Htl3S9Kl; spf=pass (imf16.hostedemail.com: domain of 3URWYZwQKCCABR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3URWYZwQKCCABR9HCKKCHA.8KIHEJQT-IIGR68G.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=1738020178; 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=TSDaKrPVPDHMc1QaQJs+GdkF7fbfUGH+iVn3wQSuSHmfpgLBEZK+sGeK9DKeiPAXz+k4um u7XoPcNmfYMu7vDpOWXN4LCljF2taIAh1/oXtiiJ/AVJ6UvrBNM1jPMiZWw1PbJWXy4xUg 47GfpQ/4K51ibU5A1hoHSrs4U0wqeIo= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Htl3S9Kl; spf=pass (imf16.hostedemail.com: domain of 3URWYZwQKCCABR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3URWYZwQKCCABR9HCKKCHA.8KIHEJQT-IIGR68G.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=1738020178; a=rsa-sha256; cv=none; b=eNPoqQcYuKaWeYwQ4/UPJ5/UG5Cb8aVfjZ4z4WSECOLyKmrChMz7sF2evRH2EN7Nqsh1tX iz+3ZqShGOJeQR69TuqWM93qpMYiUnMhvrTllv4M/M9sBRfGRX7Mxoa9qW8UQxQ6qqdsKp j5GjyJXrI/Ymve9Ze0Tp1zghY+7ejr0= Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-21648ddd461so103258655ad.0 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 15:22:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738020177; x=1738624977; 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=Htl3S9KlAVVCD5TMLQFo8htFwX1507Qa3bMQvMU+gQYNNjsPKryYWc7aCGVOZG3sNu wV5C/Au0yUdACiB8wzfDoBSvPCOJQc/jivdkgDIEj/AtTXkC6RrECwCFBqkMxhQy5twM swH1e/0RafzmVuY0YqOrAXcVUV1fhq5tI0lk14ryKWvfnf6iVF6BvMbR3dOAUCaM6LOL s3vI39GcXloe9GaLBZAjVA/di4hxFv3zoLoD4IQyBpWfmfX8CsfvnFJOBFUfFSRSETNU aewAlEVxuNGxY2sjOzhKzeae9vK/wQB3s2F+aHZAzLdEksyOa3o5T9f6fwoBiAssX5NC ur7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738020177; x=1738624977; 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=fVplQGw3Ze0H+SzBAYi6rDjX0DrNeVDYxvD4YJ/c/VslihFxQR5BT/3wT13/edShga 24HI4YAaPuqMNU0CTSNEYThnrZ/xqnEG0W945SJAbPQttt67T6oEI3atRsNV2B/tTpbQ UMFoWpjPJdIWO0LSsmqQtBPsRFqu1dc2JHEBWfHYBXxX2PV6ANDGMT0ERpaudnGvEgRw X+03QJL3DjpA8lOnvSI1MTlSpbINLdOpb65zEsKxSA4eyjgx/4TvKhvo3jdHCvV3E3dy dsPEZUcEIN95xh1x60yVdAr51b+a4E8770zH3e24uY0ktncN+wgIpqSXDP2EqF5G0Epy jREQ== X-Forwarded-Encrypted: i=1; AJvYcCU4M3TfZk9GcglInlZNXRbWN08BFow3nlxN8/68+iqY+aK2J6gCTAvMr/66/V72m2Y/unsY7Y9Eig==@kvack.org X-Gm-Message-State: AOJu0Yx2l87Z7hjJD8eLtl5EMj4Cw+UR+Hlvf3b1g8QhG94e2MvNPr1R 61V4GdY0hwnCNW+EsFly1geHxJggwuZZ3dUFfGAtzqBLdR0eir3AJkGu+aGGxjBM3fj1nQ== X-Google-Smtp-Source: AGHT+IHTkWT+vKPtNmML5TD/UxEnzEGLQT8O3DJ3Xye94Aonki0v0QAKyqnXLqCJrz3+wg2puwj3NqqG X-Received: from pfav8.prod.google.com ([2002:a05:6a00:ab08:b0:728:b8e3:993f]) (user=fvdl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:3942:b0:1e1:9f77:da92 with SMTP id adf61e73a8af0-1eb215901e0mr60888783637.33.1738020177482; Mon, 27 Jan 2025 15:22:57 -0800 (PST) Date: Mon, 27 Jan 2025 23:22:01 +0000 In-Reply-To: <20250127232207.3888640-1-fvdl@google.com> Mime-Version: 1.0 References: <20250127232207.3888640-1-fvdl@google.com> X-Mailer: git-send-email 2.48.1.262.g85cc9f2d1e-goog Message-ID: <20250127232207.3888640-22-fvdl@google.com> Subject: [PATCH 21/27] 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, usama.arif@bytedance.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-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8B71A18000C X-Stat-Signature: n5ot9rxs9sb8ijs76zscomqhe3zugio6 X-Rspam-User: X-HE-Tag: 1738020178-417956 X-HE-Meta: U2FsdGVkX19Ce5/tOiccZL0FKECi1HoH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hY/cORnOLt8SpVz7iymMzdDRm5t+ckcVTTrmSwHC9LYEOpVBdoOAE3X78BGwiWbVlo0CGOmV5g0F16KDERFvUBwdq8pFC1uWDkbI7AL6GFnK8L3oCX5m3h/4EpoGpUrjeUFt6OiGjeTKBkwQnw12hyNg2H+7qOkr2w28LQ2F7R3TI9vYAZi/b8TEsq+ac2qKWNGGd7/xFFc0GoWA7ADAWo7Naqzg6lhpWkjTotxhxIfH/+r9vaI3jdZX8g5s5InlF7a6uR1xqvH036colml7gPbUjXV8SBJmAvy5S+1YsQ36+PcOeWFp6ZmlL6E3XxC5JkrEOZFpcVULNH/erqs+rk11LpRcaRO7cuvPsl82RZoegwSnEjpSVL2SbSpFLSd5u4yNCDomwYbtnyrery0LCIbxI2VSpt+E5YNLpFTJHAEp8GRFh8rfY4a0DH7FrNtpi0j0Vr8s5bFGka3L3d+rYrQkms+NhWq2TWM/Y57u0qqxHikVwUMU71ZJYCxkMLfgQqg9lTyoGPZRAm0P2LIdogBmfwGTIR5hsICotFciY+ljqP38QwfJz5RmEHAnXwAZg== 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(-)