Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp675006rdb; Mon, 15 Jan 2024 09:45:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IE53q2jeivU73Je0cdV+QmP65K8Z+1qvi3VJ2FzXj7eE7dwBPd6o+HFHooNACLTFx5qarX7 X-Received: by 2002:a17:903:8d0:b0:1d4:e084:571e with SMTP id lk16-20020a17090308d000b001d4e084571emr3430435plb.129.1705340733269; Mon, 15 Jan 2024 09:45:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705340733; cv=pass; d=google.com; s=arc-20160816; b=Z+3gzsqayEbM4BR5H+4FOYow7QSP7IJQWZkbullXJfrTXMfZSWKSiBWnAwceprqReV 1lI0962WhtYrpzA/CAf8ZmYPhmqRhGpuv1SpcXCuQOYmgJHws04fnEIyOjJDX4dQczBx gQDYmTlwyejlDt8GwlMOP8TrHJQaB3MEcrEk49ZR2vzy83PbRaAHreArArUL4MFMNgp8 wIWn65rKoxNzbZ8EiGLASmzUE3lo5zukz+lGquB0r9Sx0+lBw0L7uh+vXDkDo86i2ztV cu3bDAsaIqYpLJsfQzIEaprHWx39LJMuskXO+clVSKICajqFn8C1/IcYUiHfmNSdCdAF uEEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:content-disposition:references:message-id:subject:cc:to :from:date:dkim-signature; bh=vD2ieV+QhIAdP4Nxoh7wp6iOLdhI7YZTqHvxT13czYo=; fh=WF0vKtkhjpNFiqWiksO5OqVIH4oI4WQuuw40pJ3Csu4=; b=sCOv9HAZo0bSuo2yRYXN0sQPpmYQhlnv0dtTQ/yyea6IFbDSO89ih40PgjyabNSSuD cqHyDn7hLXW8aBRPiko/bFI5A1lDcXz/dfMuhJjK4snihb3cmvDwftY314lOaG1o6hVF NQp0stVjEV2u7yzRjKAGXg1X5Wwsp/8XVNXdFeEJmZWNWbG+t66ycIQPNOPvfqPIZPsc maqve/rcXXs/7A5yL3RYdaqMIeiIhJR7i5SNvmfpsf6WwHd13Im+OW1QyNCr9fIQZpOG aenTau0TjO9nmNBYUl03H3uI2N2CDXbZwk0WjaKjcU701WFUiiBHhVScxF99nyiWeq/E Pl5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=SNf+iQrQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel+bounces-26325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id je20-20020a170903265400b001d4e7ad3840si9214051plb.588.2024.01.15.09.45.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 09:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=SNf+iQrQ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel+bounces-26325-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26325-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.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 78540281C59 for ; Mon, 15 Jan 2024 17:37:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF2511862E; Mon, 15 Jan 2024 17:37:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="SNf+iQrQ" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) (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 1C7AF18622 for ; Mon, 15 Jan 2024 17:37:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h5MMHCk7xO/UIIn5O27hNF/DQmdUYPdbnme72mtgCWT4HrOYFFmSvOAky5LsBhG+4ogC+g/kICk2zuwvMmywY9lS1v4NdhxjfMZ/KME5zSLgEsFL1wbcq0x0cS1M9G00h8dkovb+8Cqsz+Ln9MQcBm+sWkvogyqFfhJl7jvknRuW58TkwWYmIGEGlgpsZzuS8wrwII+yFLeZyEjjKNRfQtqgS6gxy3QnJcRgnCSSAUhIF1lXmVgZZOfpYXWS3dcenubwMmyqxBqOxj5l7PRy4h1wO+WA9KtmmHIwbqDiffu0idjydFCXJXiWbJKtEK1naXjCwC7WFHZIMya0WxLz8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vD2ieV+QhIAdP4Nxoh7wp6iOLdhI7YZTqHvxT13czYo=; b=Cj/75vZGRQLUHamStBND8J2+Ncr5eM+KScAxhN/zZIIh3lBG5I4dzKDZdkQ+EfHXM4aqa3Vgrmc/Wy5KmdFchQtcPZD0hv55V1Cr6U//2CvMaG5YzTlRwYWLMFL3w9c4oU8P8nbJSOCXSgRTiGx8DzwjmdIkc6e1bXQr51JyQupigv+g3XsIP+Gr0jrD07VvDf9mstRWz3uIJpuiavU41p3zhW784rbwRFEYhh432AhXJm50UAa5uP110pSb4NhaGWj2KntnKVMzBknMDwLdNBWIHap6FBGCs2LqAHXPnmcVNRjbvc20/UO7ykkqo176luZvjeSnrwv+I/97dXfJfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vD2ieV+QhIAdP4Nxoh7wp6iOLdhI7YZTqHvxT13czYo=; b=SNf+iQrQ3JzJVk//UZiufNM2+xWgstykTUwPJMbVO5GXAMSfszRJY9yblY5gjPHKW4E6pCPkSqDiS8yraHiRdgiOvODCZyWcPy80+iwViQpFv1zB/quFnlZUTHDwRLFVdDe3Pw612IGy4FKCEmnkF+Q8A45VK+b8XLxvp5xF+HARAPIh96uraMV4NwvBNHd/0ynWS8M2RUvH3PL/MoK+krx/d6WBr0U3CcKZUVhjsBxocDXCvqJGN9WXwSh3diCcw3jGhfAeLBUUeDEl5vMoBA+AutSLDmg0MeQfbDv3CwTPN5YJEFZhZOfzmuc1fyAghZBinC6ACRbswOV9bcKMOA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by SN7PR12MB6838.namprd12.prod.outlook.com (2603:10b6:806:266::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7181.18; Mon, 15 Jan 2024 17:37:38 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::96dd:1160:6472:9873%6]) with mapi id 15.20.7181.020; Mon, 15 Jan 2024 17:37:38 +0000 Date: Mon, 15 Jan 2024 13:37:37 -0400 From: Jason Gunthorpe To: peterx@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton , David Hildenbrand , "Kirill A . Shutemov" , Yang Shi , 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, Christoph Hellwig , Lorenzo Stoakes , Matthew Wilcox Subject: Re: [PATCH v2 01/13] mm/Kconfig: CONFIG_PGTABLE_HAS_HUGE_LEAVES Message-ID: <20240115173737.GO734935@nvidia.com> References: <20240103091423.400294-1-peterx@redhat.com> <20240103091423.400294-2-peterx@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240103091423.400294-2-peterx@redhat.com> X-ClientProxiedBy: MN2PR22CA0006.namprd22.prod.outlook.com (2603:10b6:208:238::11) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|SN7PR12MB6838:EE_ X-MS-Office365-Filtering-Correlation-Id: 506a0b26-9973-4664-00ea-08dc15f0aad1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: E0Mp8Ifl8s3RGKOfXk6HncoWfW5pM7ZLwQV4Ep+jIRomnvmb8PgzaKP39fheVDLRF6xKNRG54Kiwr3eqWSjptnikut4DBYFq0WB77KYjTUjFnK/hVAIgYMvUHYrTQZPVJeJMkJJqVaOQ2VBwBma5DcFbLaqsawgnBdfewVrc4fkYUa91D6l3A93yxWeLGdKPxadpiXvX3Av+eRsnne/ZSyYfY+bavOBl9v4EpbtNwBI0rtFVjvkfJbwG8OnkJfpIgOuQamUbZc2NOkiXjHIo6S0LKDKXoJE64PWaM0xSObwpYWCjeZ4Xh727S+qse4oCTU/XrXTk+6VgrtCMWFshaj7kdyppE/WCWijmNw4GA/pdGag+sEWHDO868yaESKR3Rc+6iTEQH6xNdChMEGii6mzx2AsVnVronsR8jQZZYMeNrbCtPd67SWUOprBJeAUxHxgUbS/ZbopDN/D89lnTqw+l37lFMWQ5VBJ30fj3VvS3PAp0Xqfxs9/UWZvwTVPnpEHVEALVI2Y7cxxlO+wqJ/633k+IymlD+kDgUq6p+alzk/JGXvPmqkVaBBerTX99j7zfdULxi+8z6i4Tj/pUO76y3J64KxFHa56N4YVkcwBeXPF/ZkRbCHi2ie/lbCkJlzy46s3axp06mpTp0EebpA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(136003)(39860400002)(376002)(366004)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(36756003)(6512007)(26005)(8936002)(1076003)(2616005)(54906003)(6506007)(4326008)(4744005)(5660300002)(7416002)(66556008)(8676002)(66476007)(6486002)(2906002)(6916009)(478600001)(316002)(41300700001)(66946007)(33656002)(38100700002)(86362001)(27376004)(14583001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?tPDUEEhNZVRzHujRjD3wiyAdvax6IZnEbGYy+LcDkc0ANGdFRiWX2iS+NQUW?= =?us-ascii?Q?6TLIIdo/Dh8h6ZjMVfjzdg/I+55MmDrmJdZTntbVikAAx+Sqyq3o/Aqs19XC?= =?us-ascii?Q?VGYgdUGjxxE+oS6uW74QUG6NWs5Vr5NTC04/Apkvq8jj7IXLXYCsccQyDWr0?= =?us-ascii?Q?bH+uh0OZHYxt5Mml++qbU9+ihoJAuqkHD2ZUFRldLTfJc+T33ZfgOeEbfbQ0?= =?us-ascii?Q?T4qW5potE2Vfqa/g9hhc5u4wwZLCWll0lBE/x1AdwNTYzrNNGzI4ic1T2OUn?= =?us-ascii?Q?s/69eW7InGiF4XMFiP/rhBS9u83yr0jdrIWiI/+UcdgX9zdMsKTNVXOVl24v?= =?us-ascii?Q?fILrhiYCinvdiIW0H+nPuHfHydMF8pifgcERTs4rsXK/lhKKKhYZPlly1dsW?= =?us-ascii?Q?5syZrPELUPXPt+7TRnuvzfXFGdXijUNIUXlc+cwBC1BNXW6kIpAUc0vngN3o?= =?us-ascii?Q?7KSjRQ0RYLv6osOgdjknEt5hwlfWtha4S4oAE+FZwTiU2SN8WyL0zOW2y5Wx?= =?us-ascii?Q?k6Q52OYGkT9hlOd56OEAX5fmdd0psqliEzOWgjx9R4bVENnze6EPP9F2Vsa9?= =?us-ascii?Q?qRRmbSOmYA/ve/cOq5rcN3+aB1UlKM5YMs7euxEeGw29zFet/mEt1P7U+U2w?= =?us-ascii?Q?h2ZVak0Rq9v2UojzZiN0KH1aP4E0P0uSMKxZqpwUrcfN+4JqoI36162QCeMy?= =?us-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rPa?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 506a0b26-9973-4664-00ea-08dc15f0aad1 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2024 17:37:38.3346 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: a8FptbCfmjA7Pa1W61v9F7jgM35U+hPrqyPaOLhDoCF4h4IKRCL8RI2ReCsPN5MV X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6838 On Wed, Jan 03, 2024 at 05:14:11PM +0800, peterx@redhat.com wrote: > 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(+) So you mean anything that supports page table entires > PAGE_SIZE ? Makes sense to me, though maybe add a comment in the kconfig? Reviewed-by: Jason Gunthorpe Jason