Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp830063rwd; Wed, 31 May 2023 06:08:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xvlHuGKFxeDl/SGI97xi74QirN5JIIhVscUAYhlDg0BL8OguOncdctkpYzc18q+xVDqN0 X-Received: by 2002:a17:90a:7409:b0:250:2311:1535 with SMTP id a9-20020a17090a740900b0025023111535mr5349435pjg.24.1685538486873; Wed, 31 May 2023 06:08:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685538486; cv=pass; d=google.com; s=arc-20160816; b=j3OCOuTVuhEb9qY5XHSWXV4kQZsvbGwHzXa0gj9tEWmWB8BD4LVXvJ3UdPATs39U88 /6cfLywFM1wzokmWsMpbGvsZkVnERR32pteKftJgUCAc/gdtaTT6IlaHC3QJuBHGVgG0 omZXVt+0R/CE/ATyy2gBI1uFzG68lHOjznnMAp7iww9u+ZZ0+yjsv8ry/jYDpAv/ZYvF 6rbb1MudYLNc8TLYlAAdClCu1657AYCq0eirByZLa611wGiQ0OAD/k1l2ZEjk08tJRU8 VdEapnEjq7LzfDbjQcjBCj56q+4dOzOkJ/LYV8+ehA3UBNk4SUop2JXEfH26Vq8rHRmU rkQw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a17090a414600b00256d0b31164si940921pjg.75.2023.05.31.06.07.51; Wed, 31 May 2023 06:08:06 -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 S233109AbjEaNBx (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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?8ylf+aBw1Qeko2LC8Dz2AbJh9dKZ2QpWxgvOXdm6vaVa97o9uX8nRzVEfX2v?= =?us-ascii?Q?BQpC8N9JwX2Qgs3+58F5B6sLRZRMA4jVKUX+AI7vcu015lguQGseJBaK7S19?= =?us-ascii?Q?ZAdjL4G6fqIi6QBLBR3lgf2n+1gzIOLobQXAMEqisIILHZCQyf5iUINRHOBj?= =?us-ascii?Q?mc/dDvk6fbInxVceAQ50+ZYMAM+i7bdV+AJ5z2q39jCAN51vVewAEpWjmmHT?= =?us-ascii?Q?ZMcWHBA8+EABsLv8kxNS3R5q1T8ej3V5mMSz/ZFTnds/DY3l+uN1FCLghq6R?= =?us-ascii?Q?U57wFwkZ9tyTe+2NSTv9OCniHVHIqXjdogdd26tySU4Imw5kR0+URQEZFfat?= =?us-ascii?Q?6LPv9dP7cUdLRkbiFoKmrGYx7kZZ7TZZ+09JcX+521CqpYL135E1lX9lWLCq?= =?us-ascii?Q?n8nfJv+7r5Zgoyt72VZiwR2c/gQoVqIbGwjD+FW6HUqw4f+VZp9Pb5x9sgVz?= =?us-ascii?Q?LR9yWDK+luIstFCLR+4+2YtcpODDAcERWo7njqvkuqGz87I/XOdW0tXbEkSj?= =?us-ascii?Q?qnLA98DiCYSMTD1v/XvfTyqp99hTtnyit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Lk/kTnEYBP3YCfuvrgK9rWRKTgz+VH3DHTZtgbR6kzWYRFxe?= =?us-ascii?Q?VLYcP5DL88KlTmTW3KSXakdgyWLSuY38VuMSwnmwK3niOv2GyKfa1yNvpIzx?= =?us-ascii?Q?VhofB/KXjCj72rtF59libcGBb4LjeT2Up+zPGV7m?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c4e5929-f951-4cff-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 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 --- 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); } -- 2.39.0