Message ID | 20230703055850.227169-4-sidhartha.kumar@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp309994vqx; Sun, 2 Jul 2023 23:04:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlE8/YHsAXZJACzb5XDyxoNWWZBhJOpjoCAqBVVEJEj7p4MfKjC4AliLkMr19d+wpbPZtYPk X-Received: by 2002:a17:90b:3706:b0:263:6297:9f73 with SMTP id mg6-20020a17090b370600b0026362979f73mr11030542pjb.1.1688364244330; Sun, 02 Jul 2023 23:04:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688364244; cv=pass; d=google.com; s=arc-20160816; b=Tjh7nh14LRB0joWg3t9RPcrtyUFCrJyeHGV+9z2NtWW5oqK9GbPX45urIGOIae8nN/ tELetivNp5t7ypQM3nGz2NhXKA/fYz3IJ1A6PD4UCE6V0OrVpqNuAcsOCZ3O8fNEs6qu 8lKG7Bvp3G5vyCHokFI0xkjYQNdciKHlaMesBOJWncVzsnEDo+sbFdbxowlxX5orCLlR u5WYW6A4zk9vLLfIwrMDgg5zE6/NQnYXMQV1NQS0oA+eDq9Ab+a+g7TNQj2yLXJEFAn/ ZATKXZo6dzU5zQ5Z5D6QoAWttuvfvJDkAzcKfb76CCmJb/bOUSEswbjYAwX4mFFE10tr 2/Sg== 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=mWjQpZo2a6ZCry9xshQ+oF9KkRkC5CiVlfyKFHFCjOo=; fh=/9bfJsMG+/3rgG7nJ9LKdUdSJTmdx8OfkQbVdkOHqG4=; b=tetvO+OyVZkcWVi4mQNIiOe7lGmVmVJghfyqY76XuWO248iBvCCiZBhTc+O0BmmbwT HZJCgRYpeRu695yIJsCq3chICctMalyQhAcocTvYx2Cid8phliRaIXL2ne6boRgPMqHD ENbotqGo3AATboy+GsPZqsZWCxmQTqtyoony2qAn4sxxyN0pMkVhd0tnoiKObS6MWFN2 cZaGx6qYcqAo9JO0+RwGxvTKSO9N86mRkQzisG9Nj3enLy7aeSbyQ4GLnRydLwYYoDUt M1ZyFlNikxVkViWR6PCcwpOpkKPXlt9GUYdvN1RtuwlcuYwccvvNLjGNX0Mqupe4h6+8 LD4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=jliCc39L; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nrGe8yxg; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a63d043000000b0055b635f28b6si6445699pgi.881.2023.07.02.23.03.48; Sun, 02 Jul 2023 23:04:04 -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=jliCc39L; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=nrGe8yxg; 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 S229922AbjGCF7t (ORCPT <rfc822;ivan.orlov0322@gmail.com> + 99 others); Mon, 3 Jul 2023 01:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbjGCF7T (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jul 2023 01:59:19 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E83BC for <linux-kernel@vger.kernel.org>; Sun, 2 Jul 2023 22:59:18 -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 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 <sidhartha.kumar@oracle.com> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, Sidhartha Kumar <sidhartha.kumar@oracle.com> 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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-AntiSpam-MessageData-0: tNDugnlBGdz8PLbf3FF7c8UTx0EK7uotQcSoT6RgZNbH25zd6EtMhyDBGE32uH7chw5Z7MYTZUbe6Yu2Pn0lLs/0EtNx8yJyegXw4nJTOenmgYCAYwGU74mjtA6Bb/DvJCdx5o1xa7UGWiuhCGHnw4OpWrroVU0z/L4E3VmnCPDRaT0RoqRa1nzSPsRBRpnn3Uu7r1NG3/7Merg9hLdHILh1CPcaz2ZWT42csPyfP47KBlagcwx3pYj0ISh17hqnPsWuf/SjCRg1DKW9Wwa75hTp8/49Um6nZGZzeAQU2ov2GtedrdkYkICReZieHmx8tpN3B1qA7ExKGzO1v5o6oRgBkdf1tUkmm8iUxamGgEl6gIM0uDoBjCr40Br+UfSuLTkRqfixQyTS64uPkotl1GQWmvzV4Kl/o2a1LxRa6XmC2aNXbQ1QCf//UM6XdgACpQSCcT7wzJnphnIHdeO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XMDXyCAY 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-Spam-Status: No, score=-3.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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770378225800932387?= X-GMAIL-MSGID: =?utf-8?q?1770378225800932387?= |
Series |
[1/4] mm/memory: convert do_page_mkwrite() to use folios
|
|
Commit Message
Sidhartha Kumar
July 3, 2023, 5:58 a.m. UTC
Saves one implicit call to compound_head()
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
---
mm/memory.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
On 2023/7/3 13:58, Sidhartha Kumar wrote: > Saves one implicit call to compound_head() > > Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Reviewed-by: ZhangPeng <zhangpeng362@huawei.com> > --- > 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; > } >
On Sun, Jul 02, 2023 at 10:58:50PM -0700, Sidhartha Kumar wrote: > +++ 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); Similarly, vmf->page is not initialised until after __do_fault().
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; }