Message ID | 20250127232207.3888640-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 6605EC02188 for <linux-mm@archiver.kernel.org>; Mon, 27 Jan 2025 23:22:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 21ACD2801C3; Mon, 27 Jan 2025 18:22:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1A4332801C2; Mon, 27 Jan 2025 18:22:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F10A62801C3; Mon, 27 Jan 2025 18:22:33 -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 CAFD32801C2 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 18:22:33 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 76A00471DD for <linux-mm@kvack.org>; Mon, 27 Jan 2025 23:22:33 +0000 (UTC) X-FDA: 83054808186.16.DA802A4 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf16.hostedemail.com (Postfix) with ESMTP id A860A18000C for <linux-mm@kvack.org>; Mon, 27 Jan 2025 23:22:31 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="23/BOa1U"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf16.hostedemail.com: domain of 3NhWYZwQKCAUk0iqlttlqj.htrqnsz2-rrp0fhp.twl@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3NhWYZwQKCAUk0iqlttlqj.htrqnsz2-rrp0fhp.twl@flex--fvdl.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1738020151; a=rsa-sha256; cv=none; b=fJiVVMvG7PoXaOi+TaWtgyCG24Z/ZSTdZStLOAZU+n/FKjSZziQvpmrsScoBpUvh1ZJfC0 /yNeNAsm4QCD/Ct9VTug1vcKo7U9mskHyzoPgF95E5ZOb1HpBAe77+KQuRVu3gaRBcNlHD c16a/Ug1IOUFkA1UDEHcmzcIDOTp5po= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b="23/BOa1U"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf16.hostedemail.com: domain of 3NhWYZwQKCAUk0iqlttlqj.htrqnsz2-rrp0fhp.twl@flex--fvdl.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3NhWYZwQKCAUk0iqlttlqj.htrqnsz2-rrp0fhp.twl@flex--fvdl.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738020151; 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=nbfh28HcFIXQ9mLhqkAthugup7PcB5AKxUJWZSh0wXU=; b=XQQPYgS4xeV3FdQ4z22ThZMvX4NMM9HPQFvDVA0EFb98B8gcjy1ykUwWZ3HwsLwDqKxI/o 1hRiDU9/jkdLRjcy7f6SgUw2e7hx6lN+AbFEnewlydLjudYzojzNpV/YBHOZAij5v/bQ2F DD46LxuaWVEPsFIKxpnFV4Sn0lbEdbs= Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-216717543b7so131014145ad.0 for <linux-mm@kvack.org>; Mon, 27 Jan 2025 15:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1738020150; x=1738624950; 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=nbfh28HcFIXQ9mLhqkAthugup7PcB5AKxUJWZSh0wXU=; b=23/BOa1UzDPSMnmXJRIK5u4jO1TgvjgvZCw0Bmk92/7RnzjXaGMB+YHiqDPdqULUnN 5HD4zfYgH6Xy3dIKebXvWID0ZHj2HPsLNB/zl34ADp4ywzORZ0bupgw21643EYhCzgcU CjvC4iwaePdcpNsJnv4eIZwd5vW/vDQT+uUqq4jl+jGktg1+mMISYf6VUV1Ob3UtTcNv kI2eQRTI9pg1zKExakFoR1oW1HKvoK9YDfOihxDH3sPS9K//cE2Wfl7zQi3quGAiX5VC N6FdILuCJSeX5nS7gCQlfV2OQAdruqsgx+KKNbCnNFPfWSsLnnmHjZGo6zZ4RExKnF63 jXLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738020150; x=1738624950; 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=nbfh28HcFIXQ9mLhqkAthugup7PcB5AKxUJWZSh0wXU=; b=vopr9dDuNOls6XOixjwLsmy+IZSTpIwT5UFsd5UNF5STnzW7BE+vrRiFUVuMiOaYyF YVI2Em4IKDpLVVbcJbZo+kENSs7YD9sH2ozUqOQU79oN6QoKd5F1XZ0trtf6mg0ph5Qj i89FZLbq7POZS7c7isojerBXtR20VoBxTVtqJag94pTBmihK24hBO3ahrZxPa4g6+12L sF5vX173ZTSbi/LLZvjGR5alAgL3fIx416sakSVsCRn8fz19dnlUdzbUXV5V9RKFbghs DDcriqm34uyF0kssyz6cf8x2pOzN3QUCeB08E/G32RpjLoEBuJ9QFbtZ+S9A7dGuhheg rqhw== X-Forwarded-Encrypted: i=1; AJvYcCV1PPGg1Txi/FiIof0YGG9nYOcHI4rfQleMaIVNW4B25+NU42HxSezi0AaDX+N/Yb0qzPyFdC123A==@kvack.org X-Gm-Message-State: AOJu0Yxih775slYqGPiMQND1B4XdivoNydVaaq0juyFXQP67C/e/iYtr UWtJQywdoWtFI5UHpfIMBP9p+oil9Jy7lenh1g1E+QHmaEwHPpxjNBQaH6CAYdRYWSNKhA== X-Google-Smtp-Source: AGHT+IH+wafy7y4Yrx3/vKft4ZwmgZZYhHwu65H+dX5PMxOWLMh1lXIrwPEg8dgPsWbnMC2GdrQhOOq7 X-Received: from pfbdc11.prod.google.com ([2002:a05:6a00:35cb:b0:728:e3af:6bb0]) (user=fvdl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:430d:b0:1e1:aef4:9ce7 with SMTP id adf61e73a8af0-1eb214a08b6mr61157310637.17.1738020150464; Mon, 27 Jan 2025 15:22:30 -0800 (PST) Date: Mon, 27 Jan 2025 23:21:44 +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-5-fvdl@google.com> Subject: [PATCH 04/27] 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, usama.arif@bytedance.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: A860A18000C X-Rspamd-Server: rspam10 X-Stat-Signature: 1mnfibjxnuuycsch737uac86njfw85ng X-HE-Tag: 1738020151-736232 X-HE-Meta: U2FsdGVkX1+xM3/2/N5l8JLXp4alzVBKg0d/UhYnm/7nieXWkMy93v5RIMBjdNNPNf1nunnVrwBit7n5UYsPKqM0VKKhsetFIBsJATJJxYMSpiRMHUUwGWBk7Flc9TTon+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OY/nb3G/ZowFkwUAdIWf3vyT39y9DIogOhSITXxuVKMWu3MtQZhBppGFJk0nI7xHp9XEUUfpqCMBVHQ+IMrDdHGocMEZlYlc2Am1p3G/SxXOpTmQ3obaGNOEODCVJcD/tBPXhltDIxaKu0VwzPFxgLwnnIpzT/2vlDkU/263u8dkZ1lIxSwyWdQDw7UpoRYNrXGjPrg4rMA5HIQF0ydojT7uuPmwoTDDJxraFh/IS5b5ohSXKjfVXJqneQwBphl6q8ANYoYzNeizZhoieJmipm1lmzPRr1XGlXrYTKVfM3v+ONJ8bZ5Az9NQvKg2OUw/zRnygQUeExxSp80Xuetymir/oM0aA4u4XsimjlgAoPhXUF2 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 87761b042ed0..b187843e38fe 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(-)