From patchwork Wed May 31 12:59:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 101458 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2872467vqr; Wed, 31 May 2023 06:16:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5H5XScgnCeMzt+43H+3aN8o/ZCZ6K9l0dexwieoLkSknL6IhJ1fb58nYp2TncLfclU1rg4 X-Received: by 2002:a17:903:24e:b0:1ad:f138:b2f6 with SMTP id j14-20020a170903024e00b001adf138b2f6mr6123581plh.16.1685539012857; Wed, 31 May 2023 06:16:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685539012; cv=pass; d=google.com; s=arc-20160816; b=PtgeTo/PDCtVNi30VUEFBiGqmjI0uA14ZzhSsdQ4ksoBi9i/dAjXubk+4yOhxuNmS9 YxdQw0YEp83TgBQwL7mXlR9vk+B9RnM3uPoaGeTK2xNKpT0FVtCJG7sadmoZ+WhUjWWa KPq1OPGgbO9mlnUCElj7OIb2rO+3tqZUcuVCqOj6UQh6WO4GYQvf8oi8AIlV1GN4mA1Z GqbAfNe4lqwOts/aORo18FxHZmc8U2udhcfd7J7ZhM2/xFS+vTu5tRHbfrqNQEi0UG01 Qfci/ECu8bHC2Tm9dScRgKpbok9AiYD4yJXbgjDTA0Yau62UCPrj17+u3B164H9wWKk2 +mHQ== 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=j7q57klvHFJRDrzTnNGmdwk7vQue9EwP2A/Vk/4n4dA=; b=PZGyu6TnXsw6/8YcJE6OXDWBS25E0XA56CwkWjBBcc8gQHPDnAqi+5VYk6zvdJ68P/ aLFvOTkiXl7ZMuQbNe6whwhUdMmY2a5NiiBJPgtNTxWWwKw3U915MRQ020TnkO4OX4nm Zd3qIJWFTrWNiyNX5Wu9PGQKE0ZYug0L+IoHfCdLBN38icaT67mCG71ESrPsYb1xW1sP OMQlOgzkkTgPPL1NlMNW09EY8zqEPQaq5qTy1pPplBu+Z4yVMFFcIt/nNzPUhvf4GDca nXuqjVU6yvtz2sLvQuiOfQkGkVEbR/sV7UUMC1pvm93b4Av9Uxq7GlKHmJhcCR2hIZIU SHmg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=YMYoW4n7; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb7-20020a170903258700b001a9f42553ddsi853139plb.296.2023.05.31.06.16.40; Wed, 31 May 2023 06:16:52 -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=@vivo.com header.s=selector2 header.b=YMYoW4n7; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbjEaNBx (ORCPT + 99 others); Wed, 31 May 2023 09:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236058AbjEaNBt (ORCPT ); Wed, 31 May 2023 09:01:49 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on20725.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::725]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68BD1E6F for ; Wed, 31 May 2023 06:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q60DqQZjlb1yGOEoDvbmlEWpkE+fvpw0KytrO4heqLSCcGe7ynGhs2cUttyOyJ+27ZTcpdBecWIksRRmM+xu0fCEheHev4riNB1VQwrWTSVxeyVmi/VqEzB0mAjq7TLo9AKOuPmfHemsfwS+dTxTr+breP3UBXzPz2nJO+PNY6auUa12Q+Vvj2m+NIGhDqLkYFd4TFnG0zWQ9dzw3V7Gc1wWnVSLt8oGTzeHJWtkTPOsRKGKOW1OYTe4Ku6471//VVYOEyCq28gam8MiwMB4UsZg8Oogp1MNDrKXmiTJZnCm85wRhB2OAm5lrVyJrB68eyGiqUxKz6VsaC63jPriTQ== 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=j7q57klvHFJRDrzTnNGmdwk7vQue9EwP2A/Vk/4n4dA=; b=kKPuGr1OD8sPjGHap9CV5uj07v6SZtWb3UkjQ5YJoT64W0t5J4OLZNAx2KIpyKUZnV14Us+xM0JeFl7zxBXBRoA1pvxEmdRpYRrZp657MYYVbq2vRkCxdXtUTboaUyLGYn3UpbVi6lIwx4Wf5SvFS2szuh4PgbXwUFE96kuI+upD2u/f5OybgniLqvuEp6+utvMfDvS6Yk0hY/U3t16lpcaLFEhAr7nvEvCS2UajrJEQLNSDcEWfAWT2LUyOyoYLXmg7aCQB7jvez/NXGeERGaXxFy6q5JFDzT6RhinLcQzJLxbIV4u7qxHbTikvX7CWFaPALtD+2lpMSTgHkOoQZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j7q57klvHFJRDrzTnNGmdwk7vQue9EwP2A/Vk/4n4dA=; b=YMYoW4n7ZDX+ad6HPJcmOmY+4wt8oiXQNgKHxLpHjMiymZ0LRZe1+ijghGGT/Ftzfg65Z8Jtvy+FBUPJUh+ya3TsKarjvqCyKVwfv2CG1r7ohGoq+pQ/Qo3F7y6/Xwp4LEKOi3UwwwSSmaPcbZ9lPCPPhnEJYr1gMEql4le/LtVVLVFATDw+tZcsxK+e48YL7abZa8eoUnsx7WbqLVG/4doNUR2qNpanQP+S881B83ydQ5Wd81hOmRHBNb+PpM4OJUZzAPnx3ORh5vF8rYchaj2TizFUIBDdpy435mZ35tgOg7GVApDzhnolOMfwoSKm5cgj5g/nHIunR5bajwvySw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by PSAPR06MB4344.apcprd06.prod.outlook.com (2603:1096:301:79::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Wed, 31 May 2023 12:59:37 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::76d6:4828:7e80:2965%3]) with mapi id 15.20.6455.020; Wed, 31 May 2023 12:59:36 +0000 From: Yangtao Li To: Jaegeuk Kim , Chao Yu Cc: Yangtao Li , Lu Hongfei , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] f2fs: flag as supporting buffered async reads Date: Wed, 31 May 2023 20:59:18 +0800 Message-Id: <20230531125918.55609-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SGBP274CA0008.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB4344:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c4e5929-f951-4cff-473e-08db61d6e2d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G7mCZ/VWH0REZh9DMT4xLkYOEEQBNmQDEeBYb3sXqADIQil3wSpuLiF/2iWVxZDy9SPRBBgU0zr4442SfYk+FQzyxXidATd3ofVfqHeZlHB2Gg/Llr/8feY47tjGcETPiGc1Y/N7xLOhzQZHP/4d62TLOeik7zcsJ9Z+hkUtwei+8aNhdS6lmV6Jgpuebw1JFS8JIEjsPk89a41KhHbAIm4vnG2keNKfoAL+bTqOazvI9o+KJa6m/+bTDl7oWSSTsu5FMsaxATAhFcc6Ba+WXVOgGycKpU4mczlLRxufjN5+EPW/HkxglKMSAzscQvwtX9gt/HnlFDJHagejphpobIqcFwt7vMO3iX2XL/1jzUxkB1XuXnNxdjTxDpG1Pdy0i0pgyo8lMxYjN3XKafSmQ/yR2BQxi7ltAwBw+xp/6sV4f/+ZhFxaBIuuNvpV46+UfnQooRQpjLHCCgiJbHPsq4ZYPe7wPdCZRebzD4rBl7LvMWIuWayL/D3w9zvmOn2g47Nzh/3KXXuGiO+qlxjcS8J3dsgeQZ0cbff28v1qJ9YJHX/7Z5s4vzK3ddvPJsG4MEercZD8Z9LPlKdoWPnLuMMrI3303lH9WFooXjVen75u4r9hIfSAEx2/2sfHot6x X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(39860400002)(346002)(366004)(136003)(396003)(451199021)(66946007)(38100700002)(316002)(5660300002)(6512007)(1076003)(26005)(6506007)(41300700001)(8676002)(8936002)(186003)(6666004)(38350700002)(478600001)(36756003)(4326008)(66476007)(52116002)(54906003)(110136005)(2906002)(4744005)(83380400001)(6486002)(86362001)(66556008)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8ylf+aBw1Qeko2LC8Dz2AbJh9dKZ2QpWxgvOXdm6vaVa97o9uX8nRzVEfX2vBQpC8N9JwX2Qgs3+58F5B6sLRZRMA4jVKUX+AI7vcu015lguQGseJBaK7S19ZAdjL4G6fqIi6QBLBR3lgf2n+1gzIOLobQXAMEqisIILHZCQyf5iUINRHOBjmc/dDvk6fbInxVceAQ50+ZYMAM+i7bdV+AJ5z2q39jCAN51vVewAEpWjmmHTZMcWHBA8+EABsLv8kxNS3R5q1T8ej3V5mMSz/ZFTnds/DY3l+uN1FCLghq6RU57wFwkZ9tyTe+2NSTv9OCniHVHIqXjdogdd26tySU4Imw5kR0+URQEZFfat6LPv9dP7cUdLRkbiFoKmrGYx7kZZ7TZZ+09JcX+521CqpYL135E1lX9lWLCqn8nfJv+7r5Zgoyt72VZiwR2c/gQoVqIbGwjD+FW6HUqw4f+VZp9Pb5x9sgVzLR9yWDK+luIstFCLR+4+2YtcpODDAcERWo7njqvkuqGz87I/XOdW0tXbEkSjqnLA98DiCYSMTD1v/XvfTyqp99hTt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cff-473e-08db61d6e2d2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2023 12:59:36.2129 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: laIUUAUxyzepBxhQgCElptKy62w4T7L6okzbpZUkdxDQ6SVVHeNXji0rZbk+FgHZkkQKH0HlZSco2pEn0q92KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4344 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767415755823793850?= X-GMAIL-MSGID: =?utf-8?q?1767415755823793850?= After enabling this feature, the read performance has been greatly improved: 167M/s -> 234M/s, Increase ratio by 40% Test w/: ./fio --name=onessd --filename=/data/test/local/io_uring_test --size=256M --rw=randread --bs=4k --direct=0 --overwrite=0 --numjobs=1 --iodepth=1 --time_based=0 --runtime=10 --ioengine=io_uring --registerfiles --fixedbufs --gtod_reduce=1 --group_reporting --sqthread_poll=1 Signed-off-by: Lu Hongfei Signed-off-by: Yangtao Li Reviewed-by: Chao Yu --- 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 015ed274dc31..23c68ee946e5 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -546,7 +546,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp) if (err) return err; - filp->f_mode |= FMODE_NOWAIT; + filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; return dquot_file_open(inode, filp); }