Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp346892rdh; Tue, 19 Dec 2023 00:07:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5joYJVa1Cf8PQwYWrTXbIybF0+aBSizfhUNTwekGtBckzAqEXiO2n3IN9Ho7jpHbAMr9m X-Received: by 2002:a05:6512:201a:b0:50e:3107:29cd with SMTP id a26-20020a056512201a00b0050e310729cdmr1762934lfb.34.1702973253434; Tue, 19 Dec 2023 00:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702973253; cv=none; d=google.com; s=arc-20160816; b=vgzPyVB3Ixjt+mlf9zSckQwZWX0ehIytb90bzhdVKsx9oinosXO1Ku9g2YEKxscvM5 Bfan+PhAiTSIoqIJwY2PmoCcIrteOB4QZZAwQDDHpByfMkM9prDbd2V67Wm5Sbi3oin6 vqDVwLynZ8l0elyMI2OSRvqtLqj3IgQFTZPXM08mEBDYmVfgH+8qEhHRqZhSXOQYLalo Kj+L6EI9FKO4xUC9o9XLAUyUmZFLf7wH3e9gwKTK565Wuf9EZwqXEBuA8VyN2vER1R6a AnbPNCzvYHT+3DMtiwHm4Zaq9/mj9Zp3iNEdjZ94V+xxCprlhqTjov3I0k8qTyQ0E32N +WoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=NRvgvssN6KVSq9rYZ03PlMu3BaOgDfLGQsqd5RQuPrM=; fh=3mpu6Yyr5hMzDKtkQvzcApl7ZSQGU4G8QyIY2BAU7VY=; b=ZEfuuVzHjNwkS80U8WUvU+O5Btk8gYuepoGwsIQQvoyysHx8SNfjJAaQdSdpql6CCR D0CzWovXiL2VNzhKXxDY0TYOGT04Ui76YsQPfuj9Db/sAOxHhdNsxpAWfF1w6jCux21R x4TNPQkMk3T2swgDuSnjGIRdmfquzmudjg2T5kB6fO3TQd4uc/2FVAOkarO/OwzSOdMX XCYTKLqJHi94vn/ly3pj9J9gBVPTg2wWvjXsdLzJkUU3hiaK6LIJozIywFEYUYfUlFmG O515KU3ntnCaMmPk5eY8P79sxcBfGSB8S9IdROkjaVEWe/zqXNTMklkmyOPMHbQAUwWY X1yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KTl2MQc1; spf=pass (google.com: domain of linux-kernel+bounces-4834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x9-20020a170906710900b00a234812fb7fsi2008927ejj.300.2023.12.19.00.07.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 00:07:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KTl2MQc1; spf=pass (google.com: domain of linux-kernel+bounces-4834-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4834-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 182F01F25294 for ; Tue, 19 Dec 2023 07:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6484A12B7D; Tue, 19 Dec 2023 07:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KTl2MQc1" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21A9B12B60 for ; Tue, 19 Dec 2023 07:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702972570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NRvgvssN6KVSq9rYZ03PlMu3BaOgDfLGQsqd5RQuPrM=; b=KTl2MQc1qjJSDnZ+ZNXtzsi8B2d2fzd/vgol6a3tXXDBnugvGpmgFArhd90xNSXoIIpDla Xa7615j8a7XEUY+WVcK8hFx9KnVjgVhoLAV9AISiMw75yBjQZ3yDzIbuZHh2TnJMwR4vVe biMb1DGFi9jor0dpqrp6Aj+Gs+/xi0g= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-672-dipUc7OWPBCmQTMSma-p8A-1; Tue, 19 Dec 2023 02:56:06 -0500 X-MC-Unique: dipUc7OWPBCmQTMSma-p8A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E23A729AA38D; Tue, 19 Dec 2023 07:56:04 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4B6D2026D66; Tue, 19 Dec 2023 07:55:52 +0000 (UTC) From: peterx@redhat.com To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Matthew Wilcox , Christophe Leroy , Lorenzo Stoakes , David Hildenbrand , Vlastimil Babka , Mike Kravetz , Mike Rapoport , Christoph Hellwig , John Hubbard , Andrew Jones , linux-arm-kernel@lists.infradead.org, Michael Ellerman , "Kirill A . Shutemov" , linuxppc-dev@lists.ozlabs.org, Rik van Riel , linux-riscv@lists.infradead.org, Yang Shi , James Houghton , "Aneesh Kumar K . V" , Andrew Morton , Jason Gunthorpe , Andrea Arcangeli , peterx@redhat.com, Axel Rasmussen Subject: [PATCH 01/13] mm/Kconfig: CONFIG_PGTABLE_HAS_HUGE_LEAVES Date: Tue, 19 Dec 2023 15:55:26 +0800 Message-ID: <20231219075538.414708-2-peterx@redhat.com> In-Reply-To: <20231219075538.414708-1-peterx@redhat.com> References: <20231219075538.414708-1-peterx@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 From: Peter Xu Introduce a config option that will be selected as long as huge leaves are involved in pgtable (thp or hugetlbfs). It would be useful to mark any code with this new config that can process either hugetlb or thp pages in any level that is higher than pte level. Signed-off-by: Peter Xu --- mm/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/Kconfig b/mm/Kconfig index 8f8b02e9c136..4ca97d959323 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -904,6 +904,9 @@ config READ_ONLY_THP_FOR_FS endif # TRANSPARENT_HUGEPAGE +config PGTABLE_HAS_HUGE_LEAVES + def_bool TRANSPARENT_HUGEPAGE || HUGETLB_PAGE + # # UP and nommu archs use km based percpu allocator # -- 2.41.0