From patchwork Fri Feb 16 21:13:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13560699 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 CF2C2C48260 for ; Fri, 16 Feb 2024 21:13:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E55096B00A1; Fri, 16 Feb 2024 16:13:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB1F86B00A2; Fri, 16 Feb 2024 16:13:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B698C6B00A5; Fri, 16 Feb 2024 16:13:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A18A36B00A1 for ; Fri, 16 Feb 2024 16:13:46 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 71C2840196 for ; Fri, 16 Feb 2024 21:13:46 +0000 (UTC) X-FDA: 81798918852.07.5312382 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf17.hostedemail.com (Postfix) with ESMTP id 5D75C4000F for ; Fri, 16 Feb 2024 21:13:43 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=kdPOxaJR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ib9k5B9A; spf=pass (imf17.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708118023; 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=PULTjpQ4CgKFl7QQYFQWEw7UCRXWWaoj/fracxY/qoc=; b=f6voXlfW5xLhFFK+89FcZTkPVIgZzh01Krn01f6Xg2TNSD9lv0tcjTihskJiAkWw7rNQyO ifgL42zQ2a0fzVAtRXnMIZ5yW/Gw7K37EuZ/fGhRnOTRzOPUFIvzi9LTWWaritoYqjAO4d 70kJNAZmiioWCrvof6EFcgh3NEPKej8= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1708118023; a=rsa-sha256; cv=pass; b=cYwHg/W9RBjm18Zz/kngEjYyU4uoAA+AxgvF78HkVDe1UsPbN9HFw05J2kAsEP0zcS3v1Y R2zwv9VaXgd2HmW2l2KZsJxS6ibAgyJi4JQP19o8IIPlGGbn19PskkYCY+LJMSq3HMidXi jjytQ0H19uVrBmFs2jWEkhsPn6MuEKg= ARC-Authentication-Results: i=2; imf17.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=kdPOxaJR; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=ib9k5B9A; spf=pass (imf17.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41GKDkCW012190; Fri, 16 Feb 2024 21:13:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=PULTjpQ4CgKFl7QQYFQWEw7UCRXWWaoj/fracxY/qoc=; b=kdPOxaJR6iY5Io3AphNBbwNdkmtb8bA0BCvvmMXa8jKEufwPunQDWkIwfAwYpKUnmMCE s+YqH8d9mhxfMz8a2pi6NIT6betGgsJXLTiIRAwpdww7h+KZ8DNtH81jX7bh2+/Lcs3j 5Io75iiq2qkMq9VVgyzCn+DXzYy78C+WvfyKnebPUopPqLW9DXYy7oke6jWAlozZdzIM 7qYs0Rmf2GpRCPo1SsqrmjeAzt1W10vOKD8HFkVmzZu6IwHU+Ev2z870WwS2gFP+OiDg OCyJzGYMxDaEZeqfsTjoJTk7sm88AT+Bj1aso8+cNBjDOwMiW8EVNKEYXPBHsC10I1s9 Fw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3w9301p5vm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Feb 2024 21:13:39 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 41GL4CMP024548; Fri, 16 Feb 2024 21:13:38 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3w5ykk0v8y-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Feb 2024 21:13:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mZlhbG+P9lCtFZIaZVMBZZBvmGG8/3MhyjQ0HVNfkyXz8bGZ7PvIZFu7V+5lnEyqGmtGV1T5pXKgB41GbiELHX9tB0n3jFIEv7y5R+7kZ/qxJzPdzVNl7+7nj54/OO3cCA7NAe1ZVoCDtjooGYxEGP63A+FJH0HvoEOWmf4hxN6ku4odgfFzye9ECcsfBugKgQ8gmPJlOO2FUcfSiO/TfRvLNgqnT5ciU8s3E53sxzauxlyfTudRDTtcLRWve13u+Fm7gQB5qkT/Hxi0oUYdZGFuHMV92f9X3amaUaYJLjReBWYOOJ5IxtjVm4Eeg3naVhYvrXVl8qzWvgH74v5FYw== 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=PULTjpQ4CgKFl7QQYFQWEw7UCRXWWaoj/fracxY/qoc=; b=YsrEOdhT+2HdNiR1eut8BWH/VI5s4YWA81IGHAK5EQgbx6phVUoeKNORLkdfT8T48VBfCBHSauwF2gJ1EKZeXEY0QO80cLQmusQ1Ah+JeN7RFGphJs/z69e66jGHTRxH5nGT6pX5kFSDutGeoUWyqEv3B/XD46Uep3oCHLuFJeIFzWzexjsmyJeoE/uVgdFO9itLSgD/Npo96I4l95MA5N7C3Gk+EQO2p7inOA2ZfJ2SL4DY4OZk4Uo6DrKOgfMJm5ZVqOqW2FSZC/PCvomhMWPKxRiWCOSJPaPhDOdZJPvcGTGWNm1juvD+uyfA2lASR4V3CH06JWgMpsnPVc0WUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PULTjpQ4CgKFl7QQYFQWEw7UCRXWWaoj/fracxY/qoc=; b=ib9k5B9AeozOi3TZnfeXrneZA7qWBYviOiwAlFjFGiuKN9hguSfQPj1PffIyIQUIV0S/Lfx9NxIgxqSFSwFKo7VJd881Aw2hVxkZ6mBAk089NyfMBJiyBvILPYh2F3YoE6qO7FhiVHc1lWxNq5vTeSzUlYgghXqa4AwQk/uauvE= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by DS7PR10MB4909.namprd10.prod.outlook.com (2603:10b6:5:3b0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.31; Fri, 16 Feb 2024 21:13:36 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::7eeb:3b3e:601:2e14]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::7eeb:3b3e:601:2e14%3]) with mapi id 15.20.7292.029; Fri, 16 Feb 2024 21:13:36 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, apopple@nvidia.com, Sidhartha Kumar Subject: [PATCH v2 5/6] mm/migrate_device: convert migrate_device_coherent_page() to migrate_device_coherent_folio() Date: Fri, 16 Feb 2024 13:13:19 -0800 Message-ID: <20240216211320.222431-5-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240216211320.222431-1-sidhartha.kumar@oracle.com> References: <20240216211320.222431-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: MN2PR14CA0001.namprd14.prod.outlook.com (2603:10b6:208:23e::6) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|DS7PR10MB4909:EE_ X-MS-Office365-Filtering-Correlation-Id: e722a654-4602-4d40-9609-08dc2f342375 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iec0L2bRHgZCzPu9w+VpfjpzRX/Fauc+0J6dRijpPKZIrZv/aqIVvKHksJDFA/jvTSOYEJIxwyYOtRQOzcuZQUm6kT7ds7pflcS2Qplb0QW+EDzdeE4qvJEuEjSy/V73+DvI15bbONxbOmqKOAe5GX2DGxRnh484yeJq/70Rvb7M64qVDJTeLhw4poid+Ps+isdUDiwb15woGwGtaR5mywr8KtpTxMMMNJ5kbSdjO+3jB2FVeAhDorMEUoBjXLgdXczK/0//5iIwuL4I6uvNZ+woHtnL+4MN7wyxNREd1NRO3lxv4opr2Li2vMyGylLSzqZJodOELScHpV0cdOEkwLwPZxEido9/MPirbszQXvL7NzSRUraIrs4dp9h4rz9qpdxx35hlIQIh4dTC6y2XSUv/G3AkNYt9kd7b2scQicleKYYHrPP6I5xXOsfxhaQlf4P+8l0WLou9ZKNxgR8uAsgqkqrijXBBUI9T+DVz6XXXRn5Jzc9I8o6IH2xjsvI1Y2nhijsjIBKi8rT9+Hk8h7+ZBqvSkE3BYbrGO6JQtAaCTLF2+fOWNaM33J3f/Bjw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39860400002)(136003)(396003)(376002)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(86362001)(36756003)(38100700002)(6486002)(41300700001)(6506007)(316002)(6666004)(478600001)(6512007)(83380400001)(2616005)(107886003)(1076003)(4326008)(5660300002)(8676002)(8936002)(2906002)(66476007)(66946007)(44832011)(66556008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B5UNEt8oihlLKyhWFx2Yu8QhgtIpV2p6VxAz4jsfDa05/oKxrG9leXlVDsh8Uz+0vqKnymEsQ0+XoQFv4p13qvRRaZ2WGLge1NLE0PYU29rZX3icO2V+PawCouAMwgKQmC02+K5303p4ODEdoWf9NopmsR7oSPPHY5JaRoq5kuaE5YFVeCiF/qQnr7dTskMlrOT6+KZN49OUHgAly5r71AsamjTqo/YdYpchcC8BCigf8q5jr1Htkm536/034kyD/E1wnFIvYC8NctDVri2zokofv2S+lj2ET3P6/FCX+VClqU860N5jQ0k5loOQEiPv75ezLOCkikLKfnYb1vMqbw//tABX//DfoctODvzkkOn7VFhMjT5ilNLYsqtE5tmXRCLd97CvSbdYzuO5gFNd49/6qgR1hFJoNdf7FpkwkgquVyM8A1woh2iORRZLAnrBSBW6Sa/exe97Pvc1sI6En9XKisr/ld0EbNy6Fsr/p78K4DGIdpbMkxTTVk4TjhhVVcWoij4YpWUqeS4he8YgOkmIc9fNZsz9LNtGjGykzOiVmIwncmn04oqSUoOEkr+BCRH90NSf0BWhu4PLKh+0lCpE9ue1NZm8GNTCX2qRCKqB0esrxDrdIljTnBbRPa2cWm23fo= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: PiW5gTH0Qs7hETzQfjgMBRnAGpe3GjAbDbKARFXhA5eg4hXj/kW1UkW2+z4WADzIxhyqTaDLXPQaD+yuFq7HO6Ew+73V6VFwgKDsnW3hQFMS9Wuwb0GPzbndcOD1/AH5kpMvL04kPEiSPR9uQe8JScE8NVRL9chreoWaqelAyats2Sq7CwjWdO2+nBXlYzE4kCupGdot/ySiHNK70GaVyeA5ZtfTZokKIlrTLB0FhUcu17jVQwvv/bEtX/KbUGEaNvbjb4ngzzSqALw3ZpEJT2H5vAQbkbxAhrgLnZz/8iFcpgsjO9H3L7DrgVQVjNq3hQpzVU00rP6WgN+l5lVrc7Hfj4j4hluab0+xxdHINW79EmD4MTQApx6PiTO3WNUQZ+k3+NgWzYsVLsZMhzVDR+qPZ0OP4pif7gTeFhb0EF8WYuYr75lf6fHkdHEK51AmA0DKkvnItTKX73JzHMlP51x5pUwHAbk6QM+g/81MIdqQ90Ci28zXG5pgYtJzA5hXduYvrelgepv52e0rtbeaXsBP8rivNsvVd9uFpi+/7ju6UHFIhk3vBLYqUfnl5l/LJ/yOILjawFqtfZLCBa/ZSbMdi61JDrHpys9T5MJlkU4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: e722a654-4602-4d40-9609-08dc2f342375 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2024 21:13:36.0882 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o+hmmwcIVBIxSP65GQbBJk7L2qw8jae56N5HYTPFblDWxS1y6WEQNCY71y10vcVhcZbcco7yTBt0l3YO93hSVEB6Ax+bWXB77Ju1Ixy3oC8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB4909 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-16_20,2024-02-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402160167 X-Proofpoint-GUID: 9X9YI9CLK4D13iF2kKjebom5kvh4zd00 X-Proofpoint-ORIG-GUID: 9X9YI9CLK4D13iF2kK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pwh0kMaenRttR91uomJu1wtFSk//seHTai4zkH h8zbO5rT h/kVGdntYKaKfmeA1ftPjChIWCGGJThELMjEc+koXzc8owhKWn1Ry7LlKcPQrsZFOc748r7frAgTENLtomAdf/dpHN5NVOho9eovLJhXzaa+pLFF0wON1VryBKSoZ4P5XgW2DUfr6gpRBCqaN92WQ6oG4oX9HY1t/DyF7oAJfaSX7M3PFOwl8xdglO7By/N6qkxEYPFW9UobdaVrOPJ56m/7c/xjL9Uul1GoR X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Rename migrate_device_coherent_page() to migrate_device_coherent_folio() as it now takes in a folio. Signed-off-by: Sidhartha Kumar --- mm/gup.c | 2 +- mm/internal.h | 2 +- mm/migrate_device.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index df83182ec72d5..2c8b183b94485 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2109,7 +2109,7 @@ static int migrate_longterm_unpinnable_pages( folio_get(folio); gup_put_folio(folio, 1, FOLL_PIN); - if (migrate_device_coherent_page(&folio->page)) { + if (migrate_device_coherent_folio(folio)) { ret = -EBUSY; goto err; } diff --git a/mm/internal.h b/mm/internal.h index c6ea449c5353c..32304bec79f3f 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -1003,7 +1003,7 @@ int numa_migrate_prep(struct folio *folio, struct vm_area_struct *vma, unsigned long addr, int page_nid, int *flags); void free_zone_device_page(struct page *page); -int migrate_device_coherent_page(struct page *page); +int migrate_device_coherent_folio(struct folio *folio); /* * mm/gup.c diff --git a/mm/migrate_device.c b/mm/migrate_device.c index d9633c7b1d21b..5c239de0f08b2 100644 --- a/mm/migrate_device.c +++ b/mm/migrate_device.c @@ -705,7 +705,7 @@ static void __migrate_device_pages(unsigned long *src_pfns, /* * The only time there is no vma is when called from - * migrate_device_coherent_page(). However this isn't + * migrate_device_coherent_folio(). However this isn't * called if the page could not be unmapped. */ VM_BUG_ON(!migrate); @@ -915,15 +915,15 @@ EXPORT_SYMBOL(migrate_device_range); * a reference on page which will be copied to the new page if migration is * successful or dropped on failure. */ -int migrate_device_coherent_page(struct page *page) +int migrate_device_coherent_folio(struct folio *folio) { unsigned long src_pfn, dst_pfn = 0; struct page *dpage; - WARN_ON_ONCE(PageCompound(page)); + WARN_ON_ONCE(folio_test_large(folio)); - lock_page(page); - src_pfn = migrate_pfn(page_to_pfn(page)) | MIGRATE_PFN_MIGRATE; + folio_lock(folio); + src_pfn = migrate_pfn(folio_pfn(folio)) | MIGRATE_PFN_MIGRATE; /* * We don't have a VMA and don't need to walk the page tables to find @@ -942,7 +942,7 @@ int migrate_device_coherent_page(struct page *page) migrate_device_pages(&src_pfn, &dst_pfn, 1); if (src_pfn & MIGRATE_PFN_MIGRATE) - copy_highpage(dpage, page); + copy_highpage(dpage, &folio->page); migrate_device_finalize(&src_pfn, &dst_pfn, 1); if (src_pfn & MIGRATE_PFN_MIGRATE)