Message ID | 20250129224157.2046079-5-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 748AEC0218D for <linux-mm@archiver.kernel.org>; Wed, 29 Jan 2025 22:42:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 281CA280097; Wed, 29 Jan 2025 17:42:27 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1E5B3280091; Wed, 29 Jan 2025 17:42:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2E34280097; Wed, 29 Jan 2025 17:42:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C68E0280091 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 17:42:26 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4C593AF456 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 22:42:26 +0000 (UTC) X-FDA: 83061964692.16.D92BECC Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) by imf06.hostedemail.com (Postfix) with ESMTP id 76926180007 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 22:42:24 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=lUP9Y+TQ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 3z66aZwQKCNoBR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com designates 209.85.216.73 as permitted sender) smtp.mailfrom=3z66aZwQKCNoBR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738190544; a=rsa-sha256; cv=none; b=pW61aFYxb/fYrBezVPwo7azvlvnbJ0j2Ip+Evrwn9hTltEDZqOn/KylxCA0woy60UNA4B1 UouWx42k08cpWsIJ48PgexW3jfDEnp/yF170WDhLYJknttyUthl80w+ew3tjZIbqQ+jjLX cn4HkfVmptUvIlq5idusFXSIVnv0LWI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=lUP9Y+TQ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf06.hostedemail.com: domain of 3z66aZwQKCNoBR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com designates 209.85.216.73 as permitted sender) smtp.mailfrom=3z66aZwQKCNoBR9HCKKCHA.8KIHEJQT-IIGR68G.KNC@flex--fvdl.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738190544; 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=U/uGGJrSbaHhwDwSIFP9+o74IAHqfAjITEitLcS5SV0=; b=Gn+bYlVl+ePYLLJLKp+nMEpzC9PAHfRJbjyFyOSpclXzXpe09XHQYdG/uuyDWkXht0JKwN QqdFKt9wTuc9HLiWQz69afIq1ibTsrWljSv920C/ezEBfo7Ha+bAX7q+AdiUTBsfD5AxkL dx/da7gHEKL8yxZVKUalBJBAx/KrOPc= Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-2f780a3d6e5so264196a91.0 for <linux-mm@kvack.org>; Wed, 29 Jan 2025 14:42:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738190543; x=1738795343; 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=U/uGGJrSbaHhwDwSIFP9+o74IAHqfAjITEitLcS5SV0=; b=lUP9Y+TQgFELRXjvOs0kJrWCkdgSyBvtPsEComy9Z2y8UC1Au6L+4vSWCXWGS7/uGc lXolSuE6tjVw6bLnJMvoyXVhoO/86bbiJdFfu5NOILuZRKpKn7EUXVl1ZypTmBqe35Pc xYzprg2vmJ+S71F+7X9bnQwjPrB6QAHRgBP8xcydeH9lSgPHJdxd7cqkAo36arX9Vxrq RcZWe1qh8CLI9QTSjt+j+0Xc6o/Vd6Cuk6AT6wYohEhxlEozXUrAS9Izp2trkEhlQf+y peMOzPjJ5JYBvTVQP2ja9vbkr3CHPjjLyCddbJZx/u8+JVr5MyM+YGsXS3S7edRz1eVO RX4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738190543; x=1738795343; 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=U/uGGJrSbaHhwDwSIFP9+o74IAHqfAjITEitLcS5SV0=; b=LuIefnYPVSFeiwzsRtNVaYwRL3/eTQeqdtuS5bV6RkLahtPUFny3bAkInUMsT4ZtYJ q2mal3BeYhBeW72ZPFjDa+KhImgxYtC0EuO1TxoN2ZMXfjA37cGDxX76JsvzCHlQ1Zy3 8hRpaFa7tRXIlqXblUpGYnAaxJR7lQjzkNIGfUp9MufICCM3cn3q6gja496kEahbVLz5 mw5oDe7GFZ+BInMKLazcDzn7PAqvPVK5cf7qj8a7colydfaOt2i+UiYzWU9SJYWbqaVx fkkVqDclNYKS3il8MZ8skoS3HL/ubBbw/GX+wIoVXjydTYzwlwkw3e3luAKGsMQmrug3 w7ig== X-Forwarded-Encrypted: i=1; AJvYcCW80OdSfQe3OmZ7OzwlCUTTzgQxXztoYUhilm59bvy9SmwQngROCB2MiR4IyfNVlmUTFjUiYqaaCA==@kvack.org X-Gm-Message-State: AOJu0Yyp/KDcQTXhbGB8q3frOWTSISqJ3BDYkiMMfwMsDR9Wtq4cqkhV LJdCNN6BipkcPvVTCT0kkI9zeCmclPh1hRvx9cEavkP4krpIJIQRFOnjI5SbVTkPx0PD2A== X-Google-Smtp-Source: AGHT+IH06TMw+Px25LxLv4kXiMFgHunln09KW7I6gk88clhDm/mxCvzjecCS4D0Ez1GRYeHXSw6XGkek X-Received: from pfbbt6.prod.google.com ([2002:a05:6a00:4386:b0:72f:59c7:f942]) (user=fvdl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:4f8c:b0:728:927b:7de2 with SMTP id d2e1a72fcca58-72fd0be829amr8421810b3a.8.1738190543291; Wed, 29 Jan 2025 14:42:23 -0800 (PST) Date: Wed, 29 Jan 2025 22:41:33 +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-5-fvdl@google.com> Subject: [PATCH v2 04/28] mm, hugetlb: use cma_declare_contiguous_multi 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> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Queue-Id: 76926180007 X-Rspamd-Server: rspam10 X-Stat-Signature: gh8qz9pr51oudo6bbcjrzjkqcokif1kk X-HE-Tag: 1738190544-72983 X-HE-Meta: U2FsdGVkX1+5Rru/yXhm1MICxJzucVlmcr5LXU+d2VHsYX8jSSgwVFBbTExq+/LH+WAucQdcS1Br5/75cDC9CS4Ujn8pgin6eIBlkKK9kBr+TBgCTLDyZL8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EmDQJpwt7T1Pzop6wE1fvEfarO8qaMIbQHlo1URpYg4CHgJ7o1M0NEszXOwUSnp9FreYVANughVxReLo5X8UMnUPg1rO9lb7inpIZ1DcePmDwFGH9NZ3q4nRD/jwSfOk0TDitapJ1eUO4//t+T7pNuBVEGinYn666H6NtkzYxXijBJwlBbpj8jAQxL0VES8Nm884U6ZXGlglYBN7hUB/sjiPMK+6XARJmmYW9HACB2ZHbqoPvxm+rNimfW7uHtA6Qk/g7bBAkN03KKrKsUXXdqBt3O2uPGS9HKXFaFMBhwyDPpagQHiFUgwi6L4ZfVJRYQ+CnGVSqWVF2M5nasBpMqwTk18TVO/HMqyXhUtfmvmliAZ6BlP6PUtcG1hFmsr2fxPesknt 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/mm/hugetlb.c b/mm/hugetlb.c index 3b25b69aa94f..bc8af09a3105 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -7738,9 +7738,8 @@ void __init hugetlb_cma_reserve(int order) * may be returned to CMA allocator in the case of * huge page demotion. */ - res = cma_declare_contiguous_nid(0, size, 0, - PAGE_SIZE << order, - HUGETLB_PAGE_ORDER, false, name, + res = cma_declare_contiguous_multi(size, PAGE_SIZE << order, + HUGETLB_PAGE_ORDER, name, &hugetlb_cma[nid], nid); if (res) { pr_warn("hugetlb_cma: reservation failed: err %d, node %d",
hugetlb_cma is fine with using multiple CMA ranges, as long as it can get its gigantic pages allocated from them. So, use cma_declare_contiguous_multi to allow for multiple ranges, increasing the chances of getting what we want on systems with gaps in physical memory. Signed-off-by: Frank van der Linden <fvdl@google.com> --- mm/hugetlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)