Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7013334rdb; Wed, 3 Jan 2024 01:16:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2RTEzq9rv0f6tU8R5WwfEhMqFxGjJMDArbrYf54st/AAOWafH6yV7Gund25twezPcXAfN X-Received: by 2002:a05:6358:7255:b0:174:8ce1:11ad with SMTP id i21-20020a056358725500b001748ce111admr22364301rwa.9.1704273359720; Wed, 03 Jan 2024 01:15:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704273359; cv=none; d=google.com; s=arc-20160816; b=L3QMSnKfhwk95NmzwWyXnyqCMCpYxSBp04HzqanJjYtM2bFGIyCNa6nenX1ltPl2gg kEimgbeibCyA0aAl9Px7YAKGtVcnBb3HW2isT/I8bjYFwN28lrSRBj5mzkJQX8hELh7E t7MuDiXLoghYVRO4uFE1aCuUX+Uqg5hniBz7rZMDH2gUao+1L7lNmtf7MUfMmocko8yA o/kT/c4ieKq6DACojEeplsTG+jCJUjE/F+qtK0aiTeTnhnFbJepOhcUKNcAh5Q4q2hgB D0iItZv5NDH3//0L3vzb9S8KoPwzXUeBCC5X7YQnVaq+blrD0644GQVletciTEbuzAbZ xbCw== 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=YJJA5xKvoSxf1aIwLnbJbk4H1JjSjqj4D+JMLQtFT+4=; fh=JvQ3nGflNTIwPBfhSW2OJAIjHOHR+R1SiFkwzYoQoWY=; b=OAlavCwBl4RzjTNJInCUJ8hpEJG0XuSNVJxgyiMdeQRYXDKVUb22+x24qrn8vdc6cl Ayxda0zK5Kb8To7QzOuseft451L/zz0CD595FDE1njUYKJnSwtPvROdgFu5+YJ7NQvYb 7g4Z2Xy4tMPmAkU2MCyxwyd0Q09DqIkOdUeExeJxbaYOz5okLp8noC5a8JmmuUjsaVXO N3QhaIiDv17wl0sqb7Et34tNTkyQuukeV7mYCUEtH11pKBrD3NYG1lUw5dm9YToeNiGn YDxpf/dssWP3fxdmpGWX/Qp7Ds05ldMBdanOx/9uU8UihJ5rCfKpZi2sZm3hVNUHwALL qPSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CeYPuBwx; spf=pass (google.com: domain of linux-kernel+bounces-15316-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15316-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f5-20020a656285000000b005c1c489bfc6si19090360pgv.627.2024.01.03.01.15.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 01:15:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15316-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CeYPuBwx; spf=pass (google.com: domain of linux-kernel+bounces-15316-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15316-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C90392830AC for ; Wed, 3 Jan 2024 09:15:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA71918C28; Wed, 3 Jan 2024 09:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CeYPuBwx" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 7A09218C1A for ; Wed, 3 Jan 2024 09:15:01 +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=1704273300; 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=YJJA5xKvoSxf1aIwLnbJbk4H1JjSjqj4D+JMLQtFT+4=; b=CeYPuBwxAtl9j2+v6pIK0Wz0WCD14dkeoviaOo1ld+BPzhWCeRklgHiqIH/eOuRP9M+8IZ j9WU8CqvEu0/Fy+5oalpUNqUvEufofMyXPJlLTQNEjjKIPLaVWRxKHms1iJvwTw+LvvUEB aZmWCkRhFrbLNXgYqBXIw276znxG33U= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-O3owD6t5PRKmlxLnlxARAQ-1; Wed, 03 Jan 2024 04:14:53 -0500 X-MC-Unique: O3owD6t5PRKmlxLnlxARAQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 E7E9B87DC02; Wed, 3 Jan 2024 09:14:51 +0000 (UTC) Received: from x1n.redhat.com (unknown [10.72.116.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40971492BE6; Wed, 3 Jan 2024 09:14:39 +0000 (UTC) From: peterx@redhat.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: James Houghton , David Hildenbrand , "Kirill A . Shutemov" , Yang Shi , peterx@redhat.com, linux-riscv@lists.infradead.org, Andrew Morton , "Aneesh Kumar K . V" , Rik van Riel , Andrea Arcangeli , Axel Rasmussen , Mike Rapoport , John Hubbard , Vlastimil Babka , Michael Ellerman , Christophe Leroy , Andrew Jones , linuxppc-dev@lists.ozlabs.org, Mike Kravetz , Muchun Song , linux-arm-kernel@lists.infradead.org, Jason Gunthorpe , Christoph Hellwig , Lorenzo Stoakes , Matthew Wilcox Subject: [PATCH v2 01/13] mm/Kconfig: CONFIG_PGTABLE_HAS_HUGE_LEAVES Date: Wed, 3 Jan 2024 17:14:11 +0800 Message-ID: <20240103091423.400294-2-peterx@redhat.com> In-Reply-To: <20240103091423.400294-1-peterx@redhat.com> References: <20240103091423.400294-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.10 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 cb9d470f0bf7..9350ba180d52 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