Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6548965rwd; Mon, 19 Jun 2023 08:45:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jfhir5Q/cCB55GOj76xfVEo23dshxbXl4Hb4teDWoulM9uJmdunKn4rWA/XbPtDzIUoCA X-Received: by 2002:a05:6a20:54aa:b0:10b:aeff:aa00 with SMTP id i42-20020a056a2054aa00b0010baeffaa00mr12350500pzk.28.1687189546531; Mon, 19 Jun 2023 08:45:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687189546; cv=pass; d=google.com; s=arc-20160816; b=qdW7o4ZpBtHWUu5N8U4PEilwMeF8JWUyNLLDBLGPv1p81e/f+GzkZcNHEheU4ZOe8o gF8hZqYVs+prgP5aRYJ8+GnuXhphd97HHs2uW64qb8NBdjKCCY40XbkHRpEkeBxaokJU 1PQOUy4DkxzjIsskmWfmZ/98Bk7AZV4i3z8SbfE2SMGuns0gtAl2z0R+SUGv3HIa3EGD vIFqZXJP68Yo+RNZU+HuTU/XXr+h38IG3fBs+F0u63y3RFjmylzlqYwSh2/C30Wj9TVR TnG1KaEOikB8ZOEz2H14NRpOAJLpjJVungSprqfX9w3VaFB7joeKHx3N5nPT+Kcn9tXH k3MA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=k0CsHNtfxLTQodyJkBTcfGjINEaKjznyfUJgi+yWUpQ=; b=M2lP0NL1QoTMmkf9ZnOC/xoq+4YImmlpvWAjbUESUJtfwVvIO4NPed1eJ89svJXc7Z TjUqdAXDOD5aT5y8pIghDvMAYfk9FXVoDbJ9yoPs292Mfki0d7Pc3YbHgvY2WQiTV2z6 XPRzagxNsXQQIIJ9egtoMz5cLVFlaOPPlfJbbVC7A+BsaiXtW6f6jxPq+u1C7Ca6pV1T Hn7PIajhy1k/C7yd/mE4eGC3IWwLuzo+awZ6qnWQvplXSizREDMFqr8j1twsRtdnKfSj 43+gTytppEyMXB2MgR/6IXaNyoHy8k64a96aui5H7mFFOYx+EoUic0MI5Vi7f4Mw+J7x JE0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oppo.com header.s=selector1 header.b=TblfEGjY; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a63920f000000b00534e68cc8f5si21229279pgd.270.2023.06.19.08.45.30; Mon, 19 Jun 2023 08:45:46 -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=@oppo.com header.s=selector1 header.b=TblfEGjY; arc=pass (i=1 spf=pass spfdomain=oppo.com dkim=pass dkdomain=oppo.com dmarc=pass fromdomain=oppo.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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=oppo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231368AbjFSPOj (ORCPT + 99 others); Mon, 19 Jun 2023 11:14:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231225AbjFSPOe (ORCPT ); Mon, 19 Jun 2023 11:14:34 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2072.outbound.protection.outlook.com [40.107.255.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC4709B for ; Mon, 19 Jun 2023 08:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F+4LxN+zliuEKylx9g7A7l0RoF0dfe0mREeNIrmVI5W70NBVL34zXXZQYVuWeojUesEcmRRO9JhLy2IKyrBuqQ3CgnVR+krtlJToqwsyUY1WxmxEmvG9QNRBBRwEn3Lo9WZnQ8JAZnBGt80QQuY7mNRhQyDIqjMCZsNXURbA9qwlRJvKl7zwdg8mdOKz7NxfipVPZpJCvA7Fnk1BL+0g2fz7NbfHz+i1wbQVdrExCkMecqLpJENqKVnAlxB53CaodHTVsh/UmueHq+JJX8KTT3a4s8dAVYp0fVF3slESeHps56NzqCckJmJ4z+tRyhYhPfNy9/B/j0IQwbYZboM2Uw== 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=k0CsHNtfxLTQodyJkBTcfGjINEaKjznyfUJgi+yWUpQ=; b=gcA2EOkShRCQNyYvsAGsKndjCu96GQZbEaApr4NDcjr2l/xGF6zs2YjWbyxFrhhIiDVBFsroerVQxJH0waJdvfgYvJ1/eGltP8okhaV649n8NHiG9FOS802QdKtcZbRKE2bO3AXUHMEHqq27dAQo9Z645UZYlyhFUme0XyWoxK4NTZOUndthZMUflMzXGbXlLqvnf4PfXN6qSJHLckWosai7TNAQy29XRWhi6DtNvVG6aRpMcYgB4Mh7tmGRQ6IAXaskKE6l2Gow0bxU3x1TYl8pOl/pn0K/HBfswVcT6XJyBbAE2WNBqkq5s9NgndRJTDvxonPJnrU83c0Nw8mUXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=k0CsHNtfxLTQodyJkBTcfGjINEaKjznyfUJgi+yWUpQ=; b=TblfEGjYLfoBfoWVrYx5Hla6Cy3omF3CdJrEkMofnPa8ysDqIImbO4Pk2AQ3ndew5C1HRL1oSAdQjrL+jetb3xVtxShjCFqq4O5YHKrhzOJ68uikF6vh6rl5O8QQYHl7PdhUv/N4C88defTiXVo+AEFeM0N2+7l/8e4S1WrjB/M= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from TY2PR02MB4479.apcprd02.prod.outlook.com (2603:1096:404:800e::7) by PUZPR02MB6211.apcprd02.prod.outlook.com (2603:1096:301:f8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.19; Mon, 19 Jun 2023 15:14:29 +0000 Received: from TY2PR02MB4479.apcprd02.prod.outlook.com ([fe80::bc4a:4d7a:4c73:76eb]) by TY2PR02MB4479.apcprd02.prod.outlook.com ([fe80::bc4a:4d7a:4c73:76eb%4]) with mapi id 15.20.6521.020; Mon, 19 Jun 2023 15:14:29 +0000 From: Yunlei He To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yunlei He Subject: [f2fs-dev][PATCH] f2fs: count mmap write io more accurately Date: Mon, 19 Jun 2023 23:14:16 +0800 Message-Id: <20230619151416.2168499-1-heyunlei@oppo.com> X-Mailer: git-send-email 2.40.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0052.apcprd02.prod.outlook.com (2603:1096:4:1f5::20) To TY2PR02MB4479.apcprd02.prod.outlook.com (2603:1096:404:800e::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TY2PR02MB4479:EE_|PUZPR02MB6211:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f992703-b743-4f7e-392e-08db70d7e0dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Wp96vUwAx8bmp9/X1JYnQgh1qoc1o438krUcPGjAmFZUzN9v8AeoJ8SPbOciQZaiCgvcjFDrTV5lYLst7Az08WphNVGm6CHZytHygCVGibBC/HY/aQ/FVjS5Enb9krrMxLZM7raDGCMYIZTzN1oz2UXlZCFbbgX9VnN9103Jb3+RC7oOKKvXDCXQTkpF32kEiTn85L3O/jq9dzG9NyEdDabxmDBkcFZ6FkUtLXyJMoHjmtN6vwZUGaGoLIqqhTefaHmbf207HTzZOw+oKVU0DBUpBy2gYQdHIRISpTXoHWp4Ejx7Vf8GNoffLM8CCfqGhsP+PCnUoUUtfLId8Piu0sEaVtkjW82ZBIq42LJ/I0J053F/U5wju3rU6zthb8zZLRrPVvO6qoj9lTE0poN/ewHh6bzIPf1kmBYbIvOqc0kcObsxoiazS6bHgfk+wgjGu4E8ZPCs5fPAEBWVm3xP00vrEDs06ZxFpiN3Jp6Z8JM65bYhi1YQm4jQ/GrVjKDOufLCrerV1C5qXxYhj7VhSiEgLDi1IVJxES2RMMff/MXX8cbqAZpylTkeNSHUjQM/JW073g4wxlkbcT+NoNPbYdB4qlaPFMTJhwPhmcwFi6kRtfAmMD61AXEOTu3qPKL7 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY2PR02MB4479.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(346002)(396003)(39860400002)(376002)(451199021)(107886003)(2616005)(86362001)(4744005)(2906002)(83380400001)(5660300002)(66476007)(8936002)(186003)(66946007)(8676002)(66556008)(36756003)(26005)(478600001)(38100700002)(41300700001)(4326008)(6512007)(1076003)(6506007)(52116002)(6486002)(38350700002)(6666004)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hMMTFB7dLkYek2PdYwVOE4uz72l8/9U8LFSMhkBk1uXwoEoO5D0AWnWFY3sq?= =?us-ascii?Q?+8GOQf5z2NTP4SkRS50cFOsc07dRXntjo1EGMT3WoWwi0X1pP5IP/brwqoMs?= =?us-ascii?Q?RkOFs4FvpSaSihGXU0u5SXo1YuCY6y35oqtgtvOUGSlc0FPrmR7xvfGFhDCP?= =?us-ascii?Q?PpstTBsVKuLBHguJyKKGu9HgfC9J6ICEl597X8S2Xm9HVrimhKHlcxP8nj0s?= =?us-ascii?Q?7FK/Bkb2giCVmOyBDv+ndfd9k35AC4Wv3zQYtVjbuTQQCWRxiDi6XNERlrT1?= =?us-ascii?Q?o3MTqCPZJc1KN+fm64C6syjUM8LnV0XI1xdMiRiNmB3k8HFVONqgrQOPcz1A?= =?us-ascii?Q?K38vm2B2s/7NVFSiBJa8/7R3/Rkpj52TdOpdS+olpalyw7l6LzYUp+4ChPg2?= =?us-ascii?Q?EB1OZpd7kux8bIdZECS4duyLSzwUEj3LTWAMl8CEXslJfPamsfmZQYdUrd4Y?= =?us-ascii?Q?ykFKXAf0b4rPFAvlAB9RX4r7lktyCEkOZ+851PsE/Bfq6sX7yePJsHNnVJ1J?= =?us-ascii?Q?srbK7QBIITrYuBUuRrzMogHYw8EjzDQvmPlQ+aQwzbi0ktV60j8Pv3NSwgO6?= =?us-ascii?Q?wT/Lbi/Nr2wfj66sv3JkfLAcMWJOr+wOAZgfv2lmEd337B0mfP9lEmffKlSg?= =?us-ascii?Q?n9xBVyZVr5tzTlxETDKkl8KDGRqwgQTL6lI3CdCehEihPJU1R/yAz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xl5Ph69?= X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3f992703-b743-4f7e-392e-08db70d7e0dc X-MS-Exchange-CrossTenant-AuthSource: TY2PR02MB4479.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2023 15:14:29.7645 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: AHpADtPM64H8UmGCyvkjbVKDGy/FSMKwA+W8fV+Xzwmq4owtijalaZr474nYn6FTl2wS0eaZOH/dHD6O/mzPVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR02MB6211 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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 This patch count mmap write io more accurately. Signed-off-by: Yunlei He --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 41e7c2b80f31..147ab24ae579 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -152,11 +152,11 @@ static vm_fault_t f2fs_vm_page_mkwrite(struct vm_fault *vmf) if (!PageUptodate(page)) SetPageUptodate(page); +out_sem: f2fs_update_iostat(sbi, inode, APP_MAPPED_IO, F2FS_BLKSIZE); f2fs_update_time(sbi, REQ_TIME); trace_f2fs_vm_page_mkwrite(page, DATA); -out_sem: filemap_invalidate_unlock_shared(inode->i_mapping); sb_end_pagefault(inode->i_sb); -- 2.40.1