Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1146309rdf; Wed, 22 Nov 2023 06:52:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGggKE4TJjL0e/1pdkVxD5UUbvokoc5wz2ttoaY/15IC/NzXYiZcFmhGmSUMiiNjIGoNZ8Z X-Received: by 2002:a17:902:e5c3:b0:1cf:55c7:94c2 with SMTP id u3-20020a170902e5c300b001cf55c794c2mr3092596plf.19.1700664746841; Wed, 22 Nov 2023 06:52:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700664746; cv=pass; d=google.com; s=arc-20160816; b=ryENWcfWZB+qMeleYi94CUO9/OGbsEbq+3nJkEdn0qh+hFYc6OLW42EfCQzqnfJ5KY WaVoMsg5JwlvKOj3IgxRf5NKJehPAoof/UXsJOrFKHWJISxTcNWyyDWLwfx9TaqnJSDu 1QdkxZ4PHLwz2t4oZiBAYQAoKkZLiU5WyE7j0dQ8BewSKKFUm2mTNB94WBtXn7sHoORJ fucpJLM9n8zNFu6AVmEaJbpEwAiXCNK+J5fbRoBq3srPpN8Apb5N7uLUty5JPUwEZFFj 6R11PWvG2OE6ga8c9mMhOpIRhOnGX90T6bn9NrKiEu+d/90axVOGbkvvAE//yDrGhgvI 0GNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=s25QxNYVtawiJ3VaNYfhl/cCyvp1Fu1181QznpXnxak=; fh=t/xp1wPkXYxIEst01Nd2NJkvtLVnklNgxYYGsClBALU=; b=czbyTbjg56ZgjJNmo12RER7NyEzW2uhLBTSv++m4Hkymr76WtGwkZgKXG6DVe6T/i4 l52/ejXImej2U+7kSdUprGxfLFGNGqvWQZjk39KMcAAzESysECC0MugLuGiYRwJhZzqw g3aP2Ko9Bf8ve6ivS7S3KwaV+DI/JqplwRDr8VZb3YMWibnAIz7D2ZS6/IkZEd2VUOiA Akn9lO8BAMD6HVlfznnAdhuCTIKL0dAqeG1CDNcQ2gC0LP8OT3ThA4/mDsB+7Rc9qE2i TEljG2TDbE2g1AYoCRFJ30sUKrCyYjXLr3kG+C+Dl4RLo4TRkSbSpbkHL8UFhW7MA8AX oqGg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=J0clCN2n; 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-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id c11-20020a170902aa4b00b001ce160421d4si12132556plr.179.2023.11.22.06.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=J0clCN2n; 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-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 08F4E81C5088; Wed, 22 Nov 2023 06:52:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344280AbjKVOwA (ORCPT + 99 others); Wed, 22 Nov 2023 09:52:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344255AbjKVOv5 (ORCPT ); Wed, 22 Nov 2023 09:51:57 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2045.outbound.protection.outlook.com [40.107.244.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9055F1B8 for ; Wed, 22 Nov 2023 06:51:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ceoLE+r2xhpdXYQ2cE3ayxaK1BW2EWirUUffiKEfOoyOVQ24PFKVJ0iHV/gfemHAlaLxLp4akszDPkdqxqKkXR/an7rH883y5qe/md6cfmsQ03apx5WoF7t4YkKT9ziQLQ9xL/X69hQoY3GafObc0GnM+z4um8VhJzJ0IPpxbhZKOExix6m+my6PZupn5DmODWWJJ1I97EX4nrvD0L8vPHfpWbFsEyxZR0iK4oODLkkymdVZF461UG1RDn5y2Lt8OYrYEI6qEw4SN6GnDmKOgTWrr/H2L4wuCk9DOKOCth8cy41getmnIug52KhjC8q6qWZlhaxIhw5u4YFTDvjhTA== 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=s25QxNYVtawiJ3VaNYfhl/cCyvp1Fu1181QznpXnxak=; b=EOo0huaa1JsRXxYM9W3q8I3FqMzUQQ8fX/nLhBoTrFRzyJWr6A+nL8hrSgZ0+nHnH94FKxuEgoJbdBnBd1n3lbaGzbHCA2d8/Hua0/jAB7iQ3Or3F2DHVrABY796aiAfpIRfJMmNPYHK9WdUSQGSp29yQscLgf9JBVT4EuwOYzqqjPMi7poCKeTXvFwfjj3yyVqG6y8jQRmBBzF+DgZ38ABZm6iDqstViOKG0X1AVeKBwu1yyMhd+kI7e23bKY3QeWRFPGfwiyP3j5V5S0ko/qsH+lXoOVbUyN6mJrMQl4y5PD2XDLbI91p2RanjQideJnaNy1vJZkzkND7DnRg6IQ== 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=s25QxNYVtawiJ3VaNYfhl/cCyvp1Fu1181QznpXnxak=; b=J0clCN2n+3ZH6dibxy+3kka1HoqeIK/fuh29OEyNnRV71uQJRqKc36b7pn0bWa0b13ZFRUa++5KsS0CLEVJydp/sIuOioMr6rg9aoEHO4/EZCiIvgN/W5O3JYAFNvO8oZeGqrWX2kMwxRKVnxDGgyeRc1pIfnGAEV4O9+Ltb/4DN80CIaNKI+3fkr3C0ArgFpnTPBjFmE/rl3k/epnRzHhbs6otM6PCObnjWz8VsVlZvIqDQFOkCNdnJVY4FXezHXZhn0hxaEI1mTlbsqkX7zLDgQqsObYhclFqQQbCRByTJYJ0xT/8x+AGOQMC2Yrs6SgE+B+nJNq5gk+wLBx9Oag== 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 MN0PR12MB6174.namprd12.prod.outlook.com (2603:10b6:208:3c5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Wed, 22 Nov 2023 14:51:48 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::60d4:c1e3:e1aa:8f93%4]) with mapi id 15.20.7002.027; Wed, 22 Nov 2023 14:51:47 +0000 Date: Wed, 22 Nov 2023 10:51:46 -0400 From: Jason Gunthorpe To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Mike Kravetz , "Kirill A . Shutemov" , Lorenzo Stoakes , Axel Rasmussen , Matthew Wilcox , John Hubbard , Mike Rapoport , Hugh Dickins , David Hildenbrand , Andrea Arcangeli , Rik van Riel , James Houghton , Yang Shi , Vlastimil Babka , Andrew Morton Subject: Re: [PATCH RFC 00/12] mm/gup: Unify hugetlb, part 2 Message-ID: <20231122145146.GN6083@nvidia.com> References: <20231116012908.392077-1-peterx@redhat.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231116012908.392077-1-peterx@redhat.com> X-ClientProxiedBy: SN1PR12CA0108.namprd12.prod.outlook.com (2603:10b6:802:21::43) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|MN0PR12MB6174:EE_ X-MS-Office365-Filtering-Correlation-Id: 8738efca-cc10-4878-6f63-08dbeb6a8d88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: prVvL3PgEPXFTW76Uhq4nIsjrWM6g7T3JPYi1b0WE9IEEUfHEvXEJBE/3TvC2pDljHRkiKlrUvzj/QyexveWOraWMRuGfte4Dn6LJrBxDPGo7leecEBxatVATclUinJ6I+pRQhgFauB3r6KK8/bzHclXTehBoFC22A3QseX+FJZs82GUHcOpxm/1pzUU1/fwXEwKRFJ/ckJCvRMCJgZP/094F3PUUsOCYxXvtYzn6HxQmXkfpIDBdbJm2ikazpuABkOo0DcMV3k/Zxavs0mIoXn9vcvyXTnjDxWE5fHoatTL4WzsFgku06wqJhsbxbh/a8BIGV10roQNRdlOUDX5OhonrIhxmE/ALdBWY6kJuolfX/FyPYFoExr0JeNCAK6esfHdCsWLiSerGxpVfhLgSkWf8650dnAUiqzsVXH7gWMMjaNrcdECieS9A29BgkT4GwlhWOdxNw4QOBVAFWCVQfM8nSWvIMPHYto2NjT2TknzVZH1GaVoT4NvQa5DhVgg0GmhxDKoxdcADKw049WHOe5ag3LMy9rHTi46RyyGHRBgGk9P7DOcdPuMz52TBLppMcq9WU3jJ5rZKvWlQ7j3orEEkX8+LCnhv23/Omc5+1M= 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)(39860400002)(136003)(376002)(346002)(366004)(396003)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(7416002)(5660300002)(2906002)(8936002)(4326008)(316002)(41300700001)(66946007)(66476007)(8676002)(66556008)(54906003)(966005)(6486002)(6506007)(478600001)(26005)(2616005)(1076003)(6512007)(6916009)(83380400001)(38100700002)(86362001)(36756003)(33656002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SqHUqgTpfVCfwLKinqDEw0rzGUk+VT6TkklKF/YHSeUasqIJEHTHtI38o6FH?= =?us-ascii?Q?qEt1FuNsFS9lNmVdMhFqdJJSvSH1Q6JpgamLc1gVDfFveoyCl92gL0QQh5wL?= =?us-ascii?Q?a+RnGKW3cCHTHYOJ3+B4LrpLVepTdIcsQv6T2hdXST82mj7eveffTZiAjrOL?= =?us-ascii?Q?uUXvTKS7hRpSTGc6B+5eBJsaRrnVmb6tKktKZSQE8qQw+jBxmoyFkGNon2Xk?= =?us-ascii?Q?EuCKEv7QQ7+Lu877NY3H9sywsjJQ9+M76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1Uc/P8OW37hX4J5zgj3L2fsiqvrt0KqfBEGQtNk81hCnvxI?= =?us-ascii?Q?4Uctw+vtqedgDuv4d2Ua9JLI4frLvPVMcyouMNxiByw/MgGIgfMQcxtPBmC1?= =?us-ascii?Q?/LLXDYdocYh7NUIkupHWSvT7ACmcmr3mo07kqH3rUzMobP7dBSZj9WMh+/gA?= =?us-ascii?Q?+mWHu0TF1yMQi+g4WGtUQnPvpl8pCJBQiv/K0vLMw03E4AGUSoJ0wVThu+lf?= =?us-ascii?Q?rA+u/DyNWdeGVCknODRO6yHt2dztD1qZ1H59Fq/Kpv9i5jr/XMLSSBp1c55c?= =?us-ascii?Q?FL7js25ylaVYUXL1gC8t1FbfPasRSXEv+ysa6IJNNqVOOgqoiMsVXqqbEc0Z?= =?us-ascii?Q?vSGkeDYWdUhmEVd/AfOXSPkrarHV9rWINzZmOjKorJ7Adg3WSeQEGISqTobx?= =?us-ascii?Q?q21y33x3x5n3NiM0pKzpVmVgMT9azDzfgoU4Qrkv?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8738efca-cc10-4878-6f63-08dbeb6a8d88 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Nov 2023 14:51:47.8098 (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: dPbNH4co4CDqJojZtrmuOeuprJQNv9KR6Mir3f/VCfmVJ6t/IqhH9UchhPNhnGnc X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6174 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 06:52:23 -0800 (PST) On Wed, Nov 15, 2023 at 08:28:56PM -0500, Peter Xu wrote: > This patchset is in RFC stage. It's mostly because it is only yet tested on > x86_64 in a VM. Not even compile tested on PPC or any other archs, it > means at least the hugepd patch (patch 11) is mostly untested, or even not > compile tested. Before doing that, I'd like to collect any information > from high level. > > If anyone would like to provide any testing either over hugepd or CONT_PMD > / CONT_PTE on ARM (before I reach there..), or RISCV over 64K Svnapot, > that'll be very much appreciated. I'm copying PPC, ARM, RISCV list for > that. It can be as simple as "./run_vmtests.sh -t gup_test -a" for now, > making sure hugetlb pages can be allocated along the way; the non-hugetlb > gup tests will guaranteed to be covered more or less, I suppose. > > In summary, this is a continuous work for previous series: > > https://lore.kernel.org/all/20230628215310.73782-1-peterx@redhat.com > > And this more or less is my current take to move one more small step > towards merging hugetlb code into generic mm code, as much as we can. > > That part-1 series dropped follow_hugetlb_page(). The plan of this one is > to further drops hugetlb_follow_page_mask(). The hugetlb GUP will use the > same code path for generic mm after whole set applied. > > It means the generic code will need to at least understand hugepd, and > that's already done like so in fast-gup. Fortunately it seems that's the > only major thing I need to teach GUP to share the common path for now > besides normal huge PxD entries. Non-gup can be more challenging, but > that's a question for later. This is great, I looked through quickly and didn't have any profound remarks Thanks, Jason