Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29499611rwd; Wed, 5 Jul 2023 12:48:19 -0700 (PDT) X-Google-Smtp-Source: APBJJlHp9K8r5ktBK0oxR/OCKaKHHiPq5cAxA+9OtLbZqtv3+/CtBQEPCOFBLij6Nr1xA6pRqsIe X-Received: by 2002:a17:90a:1d6:b0:263:d249:9b7 with SMTP id 22-20020a17090a01d600b00263d24909b7mr8038550pjd.25.1688586498927; Wed, 05 Jul 2023 12:48:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688586498; cv=pass; d=google.com; s=arc-20160816; b=YTgh/O82k4fJCLkgKj7OqTUYivVKBhNQzp2mfmVSDAy+X/+SlyihaJGQQgDD+l70U2 dUmdIQA3XaFQ0EXEBV6P2C+dSbt3fGb1HUdobWFJfzmt00B7rZq3ZYMy50NZyEwqs/87 +8sxpCrQy8ednQbnoKKuKzrVekoYqX86w2a9KI5GORstYKs2vkly9oQj7bh+ADFsC+J1 ZlHyAPWS6NJWIhKLbnkSLrV45Kk4Jx2O8PGMfdYTTPXj3yyPLew4skqkA/J/KE9+aPuA YtVnSmMWXNfCq52tSrpl6OYMK4CAedEkASwathq4ftAf2FNynLzzSypOXBh6GeHIyog6 FhSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=WQEnffaP+1i+leegzaQJ8pj5MOjXtFFS0B58kv4ef+I=; fh=c0M7RJXbqDdq2wsqTmHMZZmYKZjz+LDeQ7U9FdnRvfI=; b=P5GokIwvLyA3zZGqTe+i4PC1QJVkXHi3PZvS6qNUI+olReNqbcWwbdaH4o6dBlGLP/ 7lzbTPDZg+uV/joNDG/6HLMPP6Eb5QWpccBKXq20O0ELfMZzfUxt2tF4HKmt7UZQS0Ox ey+UzFehhyZkCAh8j/5XBoLIPScvzZs+xpTvkmwmzqA2/MGXKlnL6HTenSu6m0CBchof H8vXH328P5nmzTGVINMGmxmRhDT21SwmHLvz4eCjXJg+cJ0yctzs3SU/H7HpR/JKoWXe v1ohNuhLPLyzUwVzGZrNl2bfRr/lz03G0gWmWHGbDQI4pO22k0wmx8ywWRUVOmFp7uPk 6OGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="sJiU/kNo"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=MYp475Qv; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx19-20020a17090af49300b00263cee680ecsi2290430pjb.89.2023.07.05.12.48.03; Wed, 05 Jul 2023 12:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="sJiU/kNo"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=MYp475Qv; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233675AbjGETom (ORCPT + 99 others); Wed, 5 Jul 2023 15:44:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233593AbjGETol (ORCPT ); Wed, 5 Jul 2023 15:44:41 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF0511725 for ; Wed, 5 Jul 2023 12:44:29 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 365IdPXf005170; Wed, 5 Jul 2023 19:44:22 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-03-30; bh=WQEnffaP+1i+leegzaQJ8pj5MOjXtFFS0B58kv4ef+I=; b=sJiU/kNohchCAn66vJ4oux139locQsDQPTmm+rJVX9Sb5vmQM9OMTljJL5AgrujSYFCz VnO1ecY5dsUCGZtFxPmZ6cwpGBYeny9aKpizUN1A8iROhlcyTdE3vw588BOUfdRAUNsg EIiCgFmgCHRHnmdf1NOZ3jmL8gEECYTspphDq25JJl/JG+wGUAyrOPWWUCiRgF1qtW8p 90Wrb0fZ3RM3XQOfg4lFhoNMxgu6aYsjRMmHBOLjukxWlhTQtxAO9QNuZEYv8IkYolzb Bkjy6tN9gsNuSk2jDYWFdWLVWBl4tYaS+N2kKAHOncBHbk0341JMCOVswe6dFN1Vu1S6 1A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rnd8q86ns-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Jul 2023 19:44:22 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 365IlhY2025202; Wed, 5 Jul 2023 19:44:21 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3rjak6hbcj-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Jul 2023 19:44:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHQIqLqBP/JHz++MKOWoOFVMrGrIYajmC+3MKh4+Wq4jTuOIF5Jw+TINY8PTNVFoiwTNBUeF9tWDIsD/O30NnZUY3mfjEQIXiLzKUksNTCx/xv3bSZqNDkD7fMWfrg0hVNmLuyoRurBJbLVGkhQtCUv1PoxV9No0AfXemOXHON40wPQDZy3z4HDlOO1QGvdjGV2QXqwwx1ibaV0CX08Zkh5yr7DYDwje+gLy/9m5/fJHPRnBWk3+I89qeISnEv0bG8FezYI1qHJeCB0v5qoXzeBxpO6N9kchur9XwYXvmUqjZPKNHP+simf7tQISJqTO1rxh1/JOyciw0aKOPnNHZg== 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=WQEnffaP+1i+leegzaQJ8pj5MOjXtFFS0B58kv4ef+I=; b=j5wbAFhKgX1/r/JAH2qGPgioZCtWgSFilCgzv2q678nghWHFuucnUYimNBFCmEEVpKjYFMcjsI1qsq/rTA7AzMjTrKgcCpMjFB68fnZFNaf0kAGegbvREU4DUksOmYRyLdSP1M/B8wTai79IfJ+VEojCmlU6UZIC77e9QrQ45CE/IENejl2bB0zJ6ERfj9SNBMJWfwJzmmddVeinyL3rP7IdzSrVrVQE8rmYKyQ+IacAqXWZRJiSEYNi/jLxdrb1pL+1Q9+v7EOnQqibJVKaWEGeu3L/ZsOHHqp+cpXY2+V85ocdANFS3iHXFOPN46zeOs4KTRLknD2PDBdgJb1S9Q== 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=WQEnffaP+1i+leegzaQJ8pj5MOjXtFFS0B58kv4ef+I=; b=MYp475Qv6q5DtvYxZ2CRFdax/1Tt1I5fJsFx+h/AJ6ZIOS2U/jnsKFlB2VeeEpkqW0FS9V81PKH/ByXE4hWh8BXiWQyD2F6W7voVNF+wMeiJq1cUSqh6Kll0YBeIY7RPXIo2wBE3Z2vNknrSqbif2ovh+BTPXcNPjP4SQweg0t0= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH0PR10MB4533.namprd10.prod.outlook.com (2603:10b6:510:39::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 19:44:00 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::d9c0:689a:147b:ced5]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::d9c0:689a:147b:ced5%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 19:44:00 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, Sidhartha Kumar Subject: [PATCH v2 4/4] mm/memory: convert do_read_fault() to use folios Date: Wed, 5 Jul 2023 12:43:35 -0700 Message-ID: <20230705194335.273790-4-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705194335.273790-1-sidhartha.kumar@oracle.com> References: <20230705194335.273790-1-sidhartha.kumar@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0121.namprd13.prod.outlook.com (2603:10b6:a03:2c6::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_|PH0PR10MB4533:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a52448e-ee75-42c6-dbda-08db7d902df6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BEOD+dFO1BUxep43/2bfv+1XNuNQ0YZwk0oSLRgO2c4rzsxT5lwTOzvBU8O5ulZpNYpyfuj5m8oyTBx1MIoUoDNTzzfVJVV5EyaMd856iN2oUX29GM+sD+BGs+0y73uj7hS9nRmntRQCvg3AdC2cHvW8YYtgwTfOAuMD9sMkEu31qAOPLMqTRL0lyZ2zYIrojmd/2++PUUHboRimDdUMfMczesx5WTz51SqOlAPi6cqtIkByCsOA3xTW31+0cFeBkyWbmq/RXPGhU0bvDN4fa5iF6lkYUiHbIwDEwTOfoU7tQMQQVoxfvE7NKNb5zez5i8MKB8zN07N9sgo/JF6sgPy3Y26zUOCfbkcmLPI/A04nYRvJ3xvYFWEkvIGQjZmC3TST/TaH2Msj/iHlgbpXlLHtD4f7GHIla3U6GSbgoD0G/GnKqAmbrJCS1KnxAFe19jHU/RW/NvSeMcjUmiQcE7r5gC48t/rbZn2PWf89x7F46W1rjRsj6tZDgVamuIRQkGi7CoRq6NxT9I6RkWqSFyb5rYQIDdIuyDwuFGLdhNSeqyj1CO6f/FFLs3dNvdWz 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:(13230028)(346002)(39860400002)(376002)(366004)(396003)(136003)(451199021)(41300700001)(2906002)(5660300002)(44832011)(8676002)(8936002)(36756003)(86362001)(2616005)(6666004)(478600001)(107886003)(6506007)(1076003)(6512007)(186003)(6486002)(66476007)(4326008)(66946007)(66556008)(316002)(38100700002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?79kM962sxqC3+DhR2JXf6iWBttD0BMv2oop6jdT12a2tqZF/5hi0XT+Llr9q?= =?us-ascii?Q?Rw3mWgMfhcdqq9Zc8R/3bloIowXp0ltguQGPmS4UWSPPBHKjYH6iclsI4zXa?= =?us-ascii?Q?l8R6DRMGfP4vJplNewndQfvu1JPcyum4HBS9221s0DdEHCsS5p3X2Xu8rbNb?= =?us-ascii?Q?I8ytELISkHBv0LjcGhiRtiONJZJgNQju9fIVZptw2VpG3rglBugQzeHxCpP+?= =?us-ascii?Q?3kUJEWLWLd/vRyCK3nC7MraG2AqFTdDcmsoESxXXrKZs5Z9PZcNG9sl6dNWP?= =?us-ascii?Q?C/6RRHR11wV3+vm7V2aXh4PFok3qryrRTS86YwancuEGcQvFKQ1bGeCt1n5Y?= =?us-ascii?Q?nxv++p9r7SizdyJsMrb448ctGOUjH1KLoyYdoVZaWjnt/zTLSfNF5FXRe588?= =?us-ascii?Q?vSLZyEC1aON7WDbSZ6/SsNSdpy/HIzSSeSQQws27oZjzHL3oGu5Av7iJwW8B?= =?us-ascii?Q?c2lEo5BKIVM1GoeGdefGFtN/fQ3OdKxaTtRy0xlZ1L3LH6Ixk/wqgv1iq5eJ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oVNnig6XdohEazSJ/sm8LCDF4Sz4tVBmycDA0yzRJLVsBor3KnmyANa8GsSThdfhaSJeXaGSOJuAjGtq5ibt1PtTDuN+jRjApBccvxFna051pO737b81o3l+B3l0VT4hAdM24ikTv+BHHKVyrX6iGISdukAbIx9wXy2sTcROY7glQ1skJJGEtbTiUgUaR9GT X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a52448e-ee75-42c6-dbda-08db7d902df6 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 19:44:00.4558 (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: JU0PtL9WgMh1oRGPn4dGDPKFseA+nSRdp8jX4M1WLywGHjehbqr71/+PLiKn3NElXmyo0VJRYdW793LhRMuh6L3I7QZY7Ddt3HAOTzgQaNk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4533 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-05_11,2023-07-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307050180 X-Proofpoint-ORIG-GUID: zACk8YPwMVg6eNxpn9tX93_ogJ2CbmAt X-Proofpoint-GUID: zACk8YPwMVg6eNxpn9tX93_ogJ2CbmAt X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Saves one implicit call to compound_head() Signed-off-by: Sidhartha Kumar --- v2 - move folio initialization after __do_fault() mm/memory.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index ce7826d3f6200..e40a03e488ca2 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4527,6 +4527,7 @@ static inline bool should_fault_around(struct vm_fault *vmf) static vm_fault_t do_read_fault(struct vm_fault *vmf) { vm_fault_t ret = 0; + struct folio *folio; /* * Let's call ->map_pages() first and use ->fault() as fallback @@ -4543,10 +4544,12 @@ static vm_fault_t do_read_fault(struct vm_fault *vmf) if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))) return ret; + folio = page_folio(vmf->page); + ret |= finish_fault(vmf); - unlock_page(vmf->page); + folio_unlock(folio); if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))) - put_page(vmf->page); + folio_put(folio); return ret; } -- 2.41.0