From patchwork Tue Jan 24 20:34:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13114786 Return-Path: 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 A8FE3C61D97 for ; Tue, 24 Jan 2023 20:34:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E763E6B0081; Tue, 24 Jan 2023 15:34:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB2AA6B0083; Tue, 24 Jan 2023 15:34:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB5636B0087; Tue, 24 Jan 2023 15:34:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A12116B0081 for ; Tue, 24 Jan 2023 15:34:54 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7D699C0516 for ; Tue, 24 Jan 2023 20:34:54 +0000 (UTC) X-FDA: 80390846508.12.6C0451A Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by imf12.hostedemail.com (Postfix) with ESMTP id C4B2940005 for ; Tue, 24 Jan 2023 20:34:51 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=BnIa0pW4; spf=pass (imf12.hostedemail.com: domain of jgg@nvidia.com designates 40.107.236.41 as permitted sender) smtp.mailfrom=jgg@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674592491; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LD6pgx3+mCBOiRvZl8kvDgLnMNfUxttkl+1KJn4Jg8g=; b=24A3fzGEE5BFqsCMnEBoEB1dwDtCRsSM3TWGXimBL/7M9ZGNrq6LfSMmMu5xuf5ni3Q15Y j6/zoL/44il+tpIBb9XhxMQwjS4hP8SKK64uBeT6KVvkIxyMV7HK1I2E6zdi/N4kUAYQVz q7v674pxrpU61dRm6A0WmWQvWJmKrw8= ARC-Authentication-Results: i=2; imf12.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=BnIa0pW4; spf=pass (imf12.hostedemail.com: domain of jgg@nvidia.com designates 40.107.236.41 as permitted sender) smtp.mailfrom=jgg@nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=reject) header.from=nvidia.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1674592491; a=rsa-sha256; cv=pass; b=IDCZjdO/QzNpiYYckyaJoeuB2aox+Lz1pq8qm9RZSdccY1Xhrp0o7LnZsZ9i15XPluEMS+ 4ckJzOTEuFayyctfm5ZnUaQWYb0/+7JaKSrHBZANVmUNs/FV2uoPihn4s+8ljFLPT3Rtgs NdwhbFxSKJphNxuI3CEDOUUw9fZ6818= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1m8PX05PHFC05jRQvLjsNydDFgToFUkSbbjPnU1ok4qLw1JqhIf7m2ZAvoeTSohvY1F1mrR8g9FEse8H/HX8LXDj+3KdD3HQfdMxmrg71XbgUuKdI+Vuo/BUfkG8SuxlrTHRXwZmbQ5+0Va/cA4eRBkJ4yUzI/vyKI13vfuLcd5Kn6ETw9axl3yW1vH5f2JVFKLYfzKEFJ4SzG8ORV/NOcmxhy6/XEqDiaCMywEV5DO6xURFiJVG1iDQS1tvlfM5N3RWThAz8R091Ot+wMvPGArgejFqjraLMxCrquxwjkrRK0dpANyiKHenIWGXQq/V3ubeHyBxKv4pnz7YjIN9w== 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=LD6pgx3+mCBOiRvZl8kvDgLnMNfUxttkl+1KJn4Jg8g=; b=MH0+20eb5uImArPOmSCK0DD18i52ma8GqhKNogJIAUxyIo/0v1U7uWzQ09RZtCS2nP5IzrhvPF8P8Ic8qkxqCYRj0BBYCCEUk5sTCejX4SsEZwxujp0c/V/TmqPJISDKXSJddeG4awGZmv9D+pcwq9P5ISw/s6Um+SFEb0HZ+jnJ+JLf/aFGZ728HybJpCH/0+iifzAP+lnY+RICF/RcWafCmlJ/qCvPFHteLBokzt2qOxmxQrlS2YEhocdkvqjL3b7z0DfqeFMa1X4YUUhDbxcuqhmxDE4W4zGcMjBF6QHDzhMwrkTedkmeI4zaYlH3ddSe/IcmChxY/wy5KTWbMQ== 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=LD6pgx3+mCBOiRvZl8kvDgLnMNfUxttkl+1KJn4Jg8g=; b=BnIa0pW45Mw80MKVQSPA+I1lqp1Nj+1TA9+2jdCc2cwAVzScnAFjsP5+ZCh7jRTyr4wsmkJ+odm1eBqzAD7KhQ6NDPRjHTo4VW+/lr434oCsyp9/03OBmSKfyuq+gmtw63qdo3K5mPZ2Oyv6GyDhqOFIbjlfQMjm9JctuWe/hwEIMxmSGve9SkQJTDWvgbCkPicLF5kQrqiw/WeQVm67d4J5ArjphMaH5f7xJjoE/Z3Q9k3JY+CJ2JzdByjubbjYMxprqaTTNCuLEyZ+aK3d7ce8q8SaUauhkl1UZF3Myjp+tgvjTpyGl8o4L1N2uWZI1AnM0bLoCg4oXTZtl9kyFw== Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by MN2PR12MB4095.namprd12.prod.outlook.com (2603:10b6:208:1d1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 20:34:39 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3cb3:2fce:5c8f:82ee]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3cb3:2fce:5c8f:82ee%4]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 20:34:39 +0000 From: Jason Gunthorpe To: Cc: Alistair Popple , David Hildenbrand , David Howells , Christoph Hellwig , John Hubbard , linux-mm@kvack.org, "Mike Rapoport (IBM)" Subject: [PATCH v2 02/13] mm/gup: remove obsolete FOLL_LONGTERM comment Date: Tue, 24 Jan 2023 16:34:23 -0400 Message-Id: <2-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com> In-Reply-To: <0-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com> References: X-ClientProxiedBy: BL1P221CA0008.NAMP221.PROD.OUTLOOK.COM (2603:10b6:208:2c5::28) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|MN2PR12MB4095:EE_ X-MS-Office365-Filtering-Correlation-Id: c3d70917-e8a7-4030-b412-08dafe4a68c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cLH3bA9IwuTbdiA3PlJcEw3ZMhpX4DwPJ4TmcpBjZiKv50GrwzYDAho4kHfrhO6dBti3m9hWXkAlpzkUz6isT37uVK5PlRm3XiynWZ3OSrtYcc/kgsRUPB9xmF8ewpdGn12wnW3FxuEgxJEJHcygAHWUVw9lQPPPCBZVDxPhsDsl7W9+qX2/j6nRdcXYwIJz0WPPS1KHXHwsTvvd8EOf4swMOH02zXubXI0wM+JyqNleyyNnfbXwMb6qL9M9CUwsOBymlZS2xfdSZ6Gv3TBowDNOTzh/nzPuiqBFzi0YODkaSFx3gi2RKlFJmq0J71HVAtbBaauKjAwHTB9HwyJhFubqs0PXFaYaHB0km0LEIdhxaDBSfLM2uEfJ2S0BYw2PYFWtr/0R5nWR90EPMmSv2WioDWBnoyYuqmVo12lJ8afAFss3tyeW3HF4K74SbjOoQp+JEP4Zi/AYUEL1GYOaQ4RNL1tYdXkbprQqPIJXSumIrwsmNybO2luuQy7X2lhhtzn6Ch1EwGHXwQqHWxDK5pLTihSfgM7/gr2MIK8nbpV9RpmyJEIUO1MkN+ZoCu049weJTvUvqOQeH7oEGgxGhCtaGaP+VpYBJ96TDasGXEbUyFyfWCoBK43/xD/0+/97cR0v3bUnhPjJhXmJeqsyxfbV5YMUwmx/Eng1oOPWxmM/JpElvRyzahHzDs3dFkzwFM7f3ELHgbpiQzkXuO6AxA== 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:(13230025)(4636009)(366004)(396003)(39860400002)(376002)(346002)(136003)(451199018)(109986016)(38100700002)(83380400001)(5660300002)(41300700001)(86362001)(2906002)(26005)(4326008)(8936002)(316002)(6666004)(6512007)(6506007)(8676002)(186003)(66476007)(66556008)(54906003)(2616005)(478600001)(6486002)(36756003)(66946007)(4216001)(266003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +D+RvpVlwuHlwXFvHIn3zczcJKUVlLFwDEpv5TZl5fKN3ekauWQAcb3wNMdXgAchMBOVtWKFI335G1woUhVvhHJ4M6ol3KGtZQZE6+MSVro1WvfykU/0I/NzLOIsl8qC40nw2ssy4Bu3+N9KEaaTIjnl/sITvAQ77IpAIFTUfXN5REcTQq8lU5thVDx3DRhTL+36FooyBl9D9WBv6DhFdx2GIXuS3p3G3QNN9gLmhlkt/wtvkIEorA51bEcC2e85ZMz4YVun4Wo14ddgNpznQrhK4PmVmIQNcX43VABcfDCLDSR+oz61owBDT378+cHzWhQkJfi0bEED6MVW/vU3fTpzpc3SGdZWcFCzWGeyxvgGo3+EhmScSLeAlQ4i3IsWyut9oRUpGkePWV+GohQcCVX84RSShl8uFTnAe7+5qBeEnWtHUJmtqbC0vsKb1a6NI12MB8Xh+DePzhr+z8H3HBH4RVjSdvIs+parLs1XcyvEN/NrkUi/gne7nfF+zbMOOsOHDjmx5lUuf0BDPFM/4RphIRQ5GU35iI8LMB8QXiDYY/nSbSOiEM12hetPoBNb3noRYVXkdL6geQECtJuRiKT44EwD6jz2LYor8Ig0dHsR0LE7pzurlLH92V9VNsnnmTnW5fxnGcK/237b71nxaycf0GYZD0OwiLXxIcuzrnmpt20z+INv/LxEFi6E3wA+WS+Dzy+q8Cghw+T5p0oHdBzr71clm/WCffglviPDfq47tGp9+K1j/WMsjVTRkb5GbpQTIV7Y8lIFJrv/3CzbW5BlgawZWDfAgBxcsu4n9Coq0N85qR5n592nkQdaCMlXQAGlkXwSUYqtwhx39gPGl2snh1bWJmMW0WFRDtKOLxFKcO90HbB8zuY9tgGEoPsAHa1cvVsfbxlzuDbrjowMe8fbl8IG68zu8KcEUA7XZWK5O2cS/0WEM1sV34fFW/o9dW+Ju02v+JkgHLVMiaVT/4rh2HRyYcTj1CrtPIq8rvHLR6QoLonMvY8uSLBQuK6t8c8vHRYuvmknec3rn5UyvGeGimdHrnNZjQ/DSLj14HdBoMqwYUlXuJNBsQ8xLmhtEGdQd6WB9u6Acnb//BDFev8WyXp55WhUVac+wJcwcAZletfylwj647yprIg52imPnvhdIPz0trahP9xJ9FsPp9YZTisuLK/HYGy0s50jZjRDmAEPX/aHJ+ZQB5YD17OQ5YnOLo4vHab0OK3PMNKZRbkyWBDq7g3fg51KNvG5ZJvY9gPy7Mj4FwV/e0xHj+J109fOZ4w1QlYeYIeupUDuiVDQo5N3hiohgbrtfOlL7/JZYcM8DbZwLCSOQiFFtsfkJvBUUYG1kVormKjlJU/lEifPaGn8YyvkmnrnqIUerqrrf5cKwTWE11nMGtmq9r91127kBsW4f3Bls8to6IcPed0pIx/RBqDkDnz3E4dUajU2Yb5wx2hoaPPIqApmcjYFMw4RcFpukPmDs7rXMH58LeaCts7dpQG4niLA2xAfXs507jicuwM4xk3If6v+CWXAWb966IPGiXgX7LJXmHRfaT6huUP0YVeI2raFJHVMJnklB5BkF5eJ+gV7Wzh8Sh+m X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3d70917-e8a7-4030-b412-08dafe4a68c5 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2023 20:34:36.6587 (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: thOBbpoXd8by5VM5/BtAqG4ag70pO+o7PpOGguMnGrCKp/NqyTM5Lf6/hMpwATxK X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4095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+Lf9F+uhxCqD+tCENTuAR3pKjtFzr7wgw 1fQ8WLQc tJUWfrAozYsW+fiPYzdZ8L9gz3n3Y+Fzo8qBo4d49gOeWUKZgGMqm5eSDLIw6m8OYfEAAmEPjWVxsY1iTb47migWyZV03EMr0DDe0zKIBY5GcFkEVUO6wfr3j3glk4VHNb08qsQK0E32zcfZF7saSFZjQmqp5rEkxAbQHozdyg8DZ/YOwjxM/We16NxJxBCEH7rZygt1k/GWu6pfNkzP7I36BR/TE8ISKKgFhl2YE0iRXt7sPD5KtO/dHWCuBOfL/hdmG0wSqPF1OTJerQ1Kn83Oda63TbFdeH81J X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: These days FOLL_LONGTERM is not allowed at all on any get_user_pages*() functions, it must be only be used with pin_user_pages*(), plus it now has universal support for all the pin_user_pages*() functions. Signed-off-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: David Hildenbrand --- include/linux/mm_types.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index a689198caf7408..8971a40c120e38 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1052,12 +1052,6 @@ typedef unsigned int __bitwise zap_flags_t; * specifically failed. Filesystem pages are still subject to bugs and use of * FOLL_LONGTERM should be avoided on those pages. * - * FIXME: Also NOTE that FOLL_LONGTERM is not supported in every GUP call. - * Currently only get_user_pages() and get_user_pages_fast() support this flag - * and calls to get_user_pages_[un]locked are specifically not allowed. This - * is due to an incompatibility with the FS DAX check and - * FAULT_FLAG_ALLOW_RETRY. - * * In the CMA case: long term pins in a CMA region would unnecessarily fragment * that region. And so, CMA attempts to migrate the page before pinning, when * FOLL_LONGTERM is specified.