From patchwork Mon Jul 3 05:58:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13299596 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 64B59EB64DC for ; Mon, 3 Jul 2023 05:59:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E64B78E0093; Mon, 3 Jul 2023 01:59:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E14E18E007C; Mon, 3 Jul 2023 01:59:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C40758E0093; Mon, 3 Jul 2023 01:59:17 -0400 (EDT) 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 B5D208E007C for ; Mon, 3 Jul 2023 01:59:17 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 7A09D140735 for ; Mon, 3 Jul 2023 05:59:17 +0000 (UTC) X-FDA: 80969247954.15.5246EA6 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf11.hostedemail.com (Postfix) with ESMTP id 22AEC40005 for ; Mon, 3 Jul 2023 05:59:13 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=jliCc39L; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nrGe8yxg; spf=pass (imf11.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=1688363954; 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=mWjQpZo2a6ZCry9xshQ+oF9KkRkC5CiVlfyKFHFCjOo=; b=DHrmkeEzdqWW5R3oVEZZzEJSFSqXCUPJibMeE/Vn6xl76utTEn5Au7+ztogRWZeL1aWH87 WZeTwQJNSjzlbdfC0np7IWdAnlnOG9I9ModPfT02clXZoG8L4mITFf1fv5VI5nsl3Fj8Is CCjPtuZiEbb92nhgdwp9dFrsFrS4GY8= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1688363954; a=rsa-sha256; cv=pass; b=L2spJh96GJCT6kks/ia5mm/nJW/7ReHxLVTok2HTtkcvrFtvSdjrntv/y9HmzqcJJEcqTy 4F4V259y+6c9Qca3zQZ7BESJbUHy59BjyCkorX1j/MGo1WSRpPavVOPkQklpndRaIOxkox fl6UcXw5bNUpQ1UVCWGvSrlNOybBWVk= ARC-Authentication-Results: i=2; imf11.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=jliCc39L; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nrGe8yxg; spf=pass (imf11.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 (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 362Kmxhr017325; Mon, 3 Jul 2023 05:59:10 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=mWjQpZo2a6ZCry9xshQ+oF9KkRkC5CiVlfyKFHFCjOo=; b=jliCc39LISMvdZaP8bIYwVGCPZCXISSwiwHGfHRhSbCb2+fZo+I7F/yq82ZPrJvMBLJG l1U26Q9NmAv+KvT0jKMZw6cEhUIM031Jv4iwXFrqfuXKRHVZRPsGfpUGUzKtiCjGV7lq cIqzpOE5f2WvjLhuxjU3Htif5O77136PrHImnN5fM6Syft+FwXozjjhUEKZkpFhTTMuN GTeXH1KK+yU0mrNK7RAqEdpPeug9qg3+Tq8GcWNFPaLI0aXrHSE8Ii351TvRFpoX9tCc Fe7vRcDc2CCUFj0XMB9cuxRdArhCyUfEjwqZGX0NzPudZ58zxGSa2Mje7onUW0H2h1jC 1w== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rjbrt9tqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jul 2023 05:59:10 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36341NvC038627; Mon, 3 Jul 2023 05:59:09 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2173.outbound.protection.outlook.com [104.47.55.173]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3rjak2kv9g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 03 Jul 2023 05:59:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MH3FlEQ67bWA18PMv1MRGSwxAcnaijJ4iafaTpRZm7gAmTXAf0rLFMhOJV3U8RhOkGGn6tAlIr3UdR0hvBbNgG8N5JrZcv8rVOJm+Xx842mOwqnhYWAjMSB0J6YbMgJ2+vNo1k5YYI6tlw+bAhpQPFFgNIVxQylIJArPBvLEzdYqeeWPssEHwHTGfGvUDpf2pxSrRVAPny9MfM0DDcq6PsCs8M1/67NkRPU7AQLxajuRTEg4KkUrI0VrDs66yOtHNUCkL/+Rg4dreL/PTKvxz9FmdXFUM1arhiIfS2uGhglbZ8qQVU9LrhBhHzspBg/NyUyjfY9PxJLMIwKZDr+YMQ== 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=mWjQpZo2a6ZCry9xshQ+oF9KkRkC5CiVlfyKFHFCjOo=; b=D1CIIZldfpm7nXyr02FbZYL8BmDaT+nODbqHxZmlozGAZCDClm/zMm3ML20BOfjX08eAjQImHN0p1XkQ+A2oaLocbVYUpQoXMRupG0oN8MkyUzDq8JBO3aZtdO4tU4uEVbQ5P60u4s7wumvIUKfk39ojkbu4/gEOT558SzfSsVuIsbf3fMu6eos9s5MlbjXwXAhr7kOSNllXXY6FOSZq0v4oK/NT7803xkgooiAoyMWF/c08fTP2CeU5JMW9IPAkUUX8WlmE/IvYsspQFAWyi/XyH2BpbqzX3mxRYVmhXyiJ017++Eak6EdFR6Pp1ZLORplodGtbUu3pkk7adtbNVw== 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=mWjQpZo2a6ZCry9xshQ+oF9KkRkC5CiVlfyKFHFCjOo=; b=nrGe8yxgYcjS6jdyXaA3OwdxZ68eRvBX2f/IwD+E/df420KqgJjrWAS10ZXWoQwcdZkx83VfP7/wby3GHsoc12FQbXx+nfYh4+xz2BLd66tLz01EaTJaidFV2+GEdBPq7+J8zn5OohmBs0RGTfaOJSJp6wq3F6HFnAd1+hppIgc= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by PH0PR10MB5548.namprd10.prod.outlook.com (2603:10b6:510:db::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 05:59:07 +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.6544.024; Mon, 3 Jul 2023 05:59:06 +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 4/4] mm/memory: convert do_read_fault() to use folios Date: Sun, 2 Jul 2023 22:58:50 -0700 Message-ID: <20230703055850.227169-4-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230703055850.227169-1-sidhartha.kumar@oracle.com> References: <20230703055850.227169-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: BY3PR03CA0002.namprd03.prod.outlook.com (2603:10b6:a03:39a::7) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|PH0PR10MB5548:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ba42725-885e-48b6-3d09-08db7b8a9cb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DQUoLkhhr5DsQDs5vLzMaGRONzdcH2qgy7q8gqoP05rg3r6Bb15RvXd1G45fqlBz2gKQ3SWCFd+JER9KpIlXjmkFJiYDvevBA7xWKaRbmOdRIf9HXIDj24Y5lMeeJ6Bv/e5md0zVH9dSsmdCcosGYjN9iYdui2PjZnlAybYYKW1nQyZMyiVxu1xGhdoXUEoZGAKPRXiO0Gir2PD4aV96KbT4Gdk9Z++P4sGXWQWDX4N+7N38hlEtrpcjk4S/HkUGMbdijmsTQNEtJgnvszRHPmFdikCRNayITy3cLddOXvtchSWV02vq4nQlh8gsCsdCtg8oZaRB39Zao6bOvIR4Z5TIZOY1BcRyOUlhecuXmm4HDGWdaFSJNiZsSW+2QkZ0//xCceH0hpdwkDpp0NApF2WC9hQOMgVFUlbNunbqengvcDc29j+k9AlockHFHKh91TOZLgb3oukkgdYKMRpEWNoljBVfNTzmCDqE6s5CV7Sd8Ov+cnwZg7bkAoNIOhawHuZqMABDhyomy+QzgV+FgAP+ql1tgZtnMgTq97ik10UerzeqKQnSxat/w9CETKLL 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)(366004)(39860400002)(346002)(396003)(376002)(136003)(451199021)(2906002)(41300700001)(5660300002)(44832011)(8936002)(8676002)(4744005)(36756003)(86362001)(6486002)(478600001)(6666004)(107886003)(83380400001)(186003)(1076003)(6506007)(6512007)(2616005)(38100700002)(4326008)(66946007)(66476007)(66556008)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSp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g+ZSNUTgb+1IxvKwp9uXItFPFgg/tB2Qa7CkTAMI1uK0jvr1bQHDwEMHhFZjRvn0VzF8aghIote3+LeRDZk/0HCUyZ5XLn9c6GcugBD9/FlgR1Srrxfp1zBbqTEr+AqYL2aOTJVeYiWSXuPRPo2P/mqc/f4uKtTkH5SRXNuAGA/GFvsZGQ1t5BkIOpfLDDfX6v0+svG2I4MjFCuJCs3dKPXXLRsCT4spSDXTMqeiUN3PE9cWPVi1uEFPQsSkH4IaTGI91fEF2hxL6QeV/jjzU3WjKSkASCa9r3JJ6VJyssgtltEd+yL71oODhorWAgGbq+j0bFPgJoCHeCNLaF/ugO7TOXaea9GBsXEKfyj4AH3TtAVDNgF4CvAjF49kn1SSVn3INmfAFccYOSVAHeWtnBGEK2+Fat36lVa+ib4jZ+G4I2ttomeRfLfN44qjZ6e0AIm5BFZoPm6GT+lNY4hJsXMDXyCAY X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba42725-885e-48b6-3d09-08db7b8a9cb8 X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2023 05:59:06.9136 (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: 2Zf4r5vNmlvAiM9r5sTB8vGAot5HuNAjQPxQu6Q/lTKpApx0V4qa4ApOYNxY7ZGrGZ489XbjDCdpeXx4hUwWgJ8ub4Wy8rm7xV03FTYU0hY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5548 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-03_04,2023-06-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 spamscore=0 mlxscore=0 adultscore=0 phishscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307030056 X-Proofpoint-GUID: BNAt60cMlimAfNfcHa035vsMOJJClT3M X-Proofpoint-ORIG-GUID: BNAt60cMlimAfNfcHa035vsMOJJClT3M X-Rspamd-Queue-Id: 22AEC40005 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: x6imcomf9pgrbxy5x876677otgjgexhh X-HE-Tag: 1688363953-275634 X-HE-Meta: U2FsdGVkX18M3Jcl742PU/NI7LutARBZoTx/UJ/6Gnf7QySuBw4CrfLOpYOfI8RkqZJxfM9cGLJlvslOSpj7dTUafkq5bsLXYHjI2+5EbZIv8Uptcf7dAXB+ER9H9a+28JCHYi719518HXrqpalpP+1v8V26B0r3ZxYnReNZ7iADEt0dgZUrRJse5RTKfJCmB6BOxNNXFKV7DVDesrvEM5NW77wH60sdssbLRznq/Q1ZaSWn4ZOW47Ac4+9NeJLnhpV3f3bBmxJ2UugISMT/LvVtGTWTK5qxGall8kip9A+rsNymqnns7PFzk8gVTfzJb6CVDqr7G0Buw0cEvu2WeiN6m3EbJnJJ0OIOczmQ3P6e8hZXaiDScFx5z2GrCWi11LPismjh7igm9T2SjYN3Y75kHj2l/SvCdESw75enJCm/LoVYrgsj1tPU6xLGzEfthkqWyggtD3/Cns2zH+KWehcjsmPvM4BIZmm0mgKGNyMNDcedMUVw4NxmfKLBCgwFgPlkTsYlyOL1wmVLsE3dDoOWL1ztAxsi9zksOWynie54dPMu9wFLIszZoYAZE8DOOFrXpaP5P/X3In/2v6kXs6Eb///N2IEP358Gp7pSqrA6kMciC0MgsugBV2vbRr0mecgCCAeZ/+a2sPFn0ln/aq+Yl0HX12JKSPwLbwzO0n39OBRP9LHe/tOrT9YqCP+sEOT751qLMZS2lWggg9+qkhrtg4dYOpDJrb/uLFOAMTdPukvMjGZNKyLacihaDF+OJUuII2OfHuJVPFTlOZGuyZ1r3Qn4hfyKNi/mXPFVflZhYMRqOxsDyk+kNmMiDj4RizaFFNHwTw+p1xRob6fBO0IQUN6WjESrf2rqk/55XVh/WCW8/B/wuHqhGAooXT7I4wlqS8tCHhTHTmRbkA4OFt832SkB1UYIXgkYMx7kWMDUEfJ/yFURdSlrgX95z/MUMlnlrNQiwIdDuY9mGpr 88k6iUEH unyR2KX4tMrRxAFpFw48AvD44Kdgfi+SSDt0PRuZ0x1iJwJRpYXLaMJgwp3x2sqRkY/hfmNr6XTC5TE01AxyHyxoizw9HPlL1v9TrNcTdftEDWWbe9/lll2rEmCC9/pcpVp4PoijT9PotmM680zuMX9yBog+Btgc12z0pJqZslHcT9UQ1BMmGDR1naH0qDsbol/9yLzOX8Y0o4J8JtnRwxkuYsllSzg7eKMUpIzklLJ7YlM2fII+o7qJhRZ9sTMyUPL5zr7Wzgh9K86HKwxlI8tfc7SUGgKQOqx8TisKHEvlosa7RyoeeP4LdxMF3AHzRYKR20VvNQNHsqkdYAJq6NjGml8LWCwt9FYzVtipOvbx2sDkArPEjop7ag19thGMaK675hqfYKVpvv45IrjK8I5fJ5oDd3KXRAyznaf9ULHQNBD/CNbzMe4n1s5C2mlMT+X/J X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Saves one implicit call to compound_head() Signed-off-by: Sidhartha Kumar Reviewed-by: ZhangPeng --- mm/memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 33bf13431974c..b97c66df4adac 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4528,6 +4528,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 = page_folio(vmf->page); /* * Let's call ->map_pages() first and use ->fault() as fallback @@ -4545,9 +4546,9 @@ static vm_fault_t do_read_fault(struct vm_fault *vmf) return ret; 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; }