Message ID | 20230613072912.52249-1-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp364573vqr; Tue, 13 Jun 2023 00:37:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4dSfLZ1+tEZFu+qoSVbs0d4P3bHcXdnQMWpghEuj1zbUG+bs9TRCF3ZfmGqvRh3b/MWXX8 X-Received: by 2002:a17:90b:3887:b0:256:9b5c:2aa2 with SMTP id mu7-20020a17090b388700b002569b5c2aa2mr13605807pjb.6.1686641824825; Tue, 13 Jun 2023 00:37:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686641824; cv=pass; d=google.com; s=arc-20160816; b=SX64b7/QyZj5WPbBcKDJON53kGFWC9u7Mg5G/HTx4KfPN8VyNwPupJJfExV4Bicb5r XbvPFFSBW52GRKG8bD/dMtj5wsGMI/4BGCTZFBkitQAWY2VelVpjsCOfPppU3gKaq4kH iZ9tU3jem98HlTQHMAsMeZn3o13b3Ld8B6GKBjLinudUUfrsPqWxnNN5REPaxMW74d08 F5v98nETTfHCN4agOqL24TX2v3AyOgkjrB7BoYbRIbFLEJkN+PpdUv/qKO/ks5+1Vopz 4iv0jXlY4Z5RQFa+xkqt2naZFFxbNdFwjh4IQPWo/WMb9Yz/eDOa1/loQct4fpP5SAxN jXUg== 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=wgfGUgMLPbn3yETy3LvqPKYO0xZz4w00oyVUCiwb0XM=; b=WbIVjI79IO1fhlkAg9YC2k9pwEaNgAJ2yLT3zWs7bc7ue5441RdD/3A+DKYw/1yqaY Sfe14LBCGs6/2kCKapdI7ZMys9HzU68hZsiyzejagawaOUD8RAQF2pXU+QeoxzrJ/lGV yNc/Bhso/0Vmft3MtkvoaIdIbm9aEQsiZl3WVFjqlQIwxImJ+rHb6aw8kIIW7e+WX/Jf zUFHZ/tPYP3VU1vfPE8E58nsvAUSKOBUTsKsG4UOeurmquExu55bP77ZDBy+hjD/bjnU ZLWKHWGBeQYJIyVbCBfgAMft/ZfCuRQ0MlOremTjnYIMY2SNpooR+wL00B75W8kwoyf/ XttQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WYVM3QGG; 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 k3-20020a17090a4c8300b00233e301c780si9976783pjh.31.2023.06.13.00.36.45; Tue, 13 Jun 2023 00:37: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=@vivo.com header.s=selector2 header.b=WYVM3QGG; 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 S239701AbjFMH3f (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 13 Jun 2023 03:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234924AbjFMH3b (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Jun 2023 03:29:31 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86122CC for <linux-kernel@vger.kernel.org>; Tue, 13 Jun 2023 00:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Csw9+B+DuFsYnKeOwK7eeef8pST37svNrqoIWbjpbQ/Wu2+5ogdD+VyRUpltrY7NBTJSATS2K7sJZn0E5Z2+ZejPtbY6tGj4F/nQpFhS8sairGKh324REXTL85xCFkxYIjTHrmF7y3wXBZTWjRbqJdhXXRpOA5TBddt45hRo+AEAcI9tSx1Wfefgc5ft3rtjzE3ntPBDAQEA4yl/HSSQVBbboZ5rpZSXm+mMMz56e5kknt+SvGbhZ2k6peIZN5HQ0NweYNeEr6SjD1A+YYEKT40fnZpX+wwGRwUMnf3WWCYi1Y+KVKDWtZPpHKGaSS/8lg1t8t4dtDPM1ZkVf3rylw== 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=wgfGUgMLPbn3yETy3LvqPKYO0xZz4w00oyVUCiwb0XM=; b=O808E58J5de5rByGdyuzw1ELDyKlYgo7TFsBS5D3crnrhoFRk/Q59hShSkGnoeHqJRq8gmar1YQ3YIwpJbnSb/x069eHWSALT5ZRnTe3jfrHUJKT4mW/fuUpsrNe+83s7THyCdT2zotkgC6MerHc+5Q9fHX9/yf4pcq6rMbhBFo6pfMT20lKDBwOJCwv8gRJZwA2mc1+RtnA4Jyx72arG0ydzmcy/CkYmWuynl1BCcrOqRnpkp9yMJbapegGUUzJv4qAQ+LJ9XqD9jHwY7Qf3UweOdTM+368ARnSeWbzujI8Hvwoq9lqXqPpiiqzRgZUHH0yjk4TmyP37oMGryfw4g== 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=wgfGUgMLPbn3yETy3LvqPKYO0xZz4w00oyVUCiwb0XM=; b=WYVM3QGGiiITKmQxfBJkheC38pEUBtV6R17HVOl9M2iZ+O2ULBzRhupslVtFTB27tChzljqGl/2ArRJWQivnKzT95DcFhmUfZ6J5qfs0REzETZCbeUquqlBwWh460M+d4gYZrzgItgfpukhf/kHZW+CfOhusFkINXfIbgyabuVec0R/v3wkoqzL2KXPObBORLpzS1iMVXufkcUdLL/qAAQuCE/2YmbfWmra9JZ37YKavX4Oi+lyejtff7bnf61G6ojO8+y7soLfuWfS2LNdkggrzl2OhkBkGLQkAiHrUdAu43y5EEHec841SbJg3TOK5F1LQdI8priNJxv63mrwngQ== 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 KL1PR0601MB3985.apcprd06.prod.outlook.com (2603:1096:820:27::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.29; Tue, 13 Jun 2023 07:29:25 +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.039; Tue, 13 Jun 2023 07:29:25 +0000 From: Yangtao Li <frank.li@vivo.com> To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, Lu Hongfei <luhongfei@vivo.com>, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH v2] f2fs: enable nowait async buffered writes Date: Tue, 13 Jun 2023 15:29:11 +0800 Message-Id: <20230613072912.52249-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR04CA0010.apcprd04.prod.outlook.com (2603:1096:4:197::11) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR0601MB3985:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ffdcffd-8dd5-45e7-7c1e-08db6bdfea08 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IAj2/DN59uG/rgBkNAf19INQ1qzZtOEOnhii9/+VeHmFAay4Db9TnCq6ff4LFUlLg179Ue64HAdzXtZ+dJyz8iV4iCepjEjxVyC/BRvxM+B9hS0FKp4zC0kwADQ5xEeDxDAMvJOyEZz56QB7Yv+sVHar//9mui1J44R87bCHdGXdaQfH+NPhv2hyNWCpEP33HajSd83NDIJbjFv/UdzxhMjGzkeB8RnsHgCldRND6eHWRm20ipzXmJf/W6H5zSMflpaJURhsdm7UTObxqgciod8MuciRlPgRE/pyIX9Ql6uRMpJYx+KMG0Xrq07P92W5V23oKBqbnJ5zGS5c1CA9QOs0/q115xANMX4XeVdWKs6fkJW0yb+pZiii5Wjezo+sO5O7uXBj21OVis9Mg1CuCwCax0BfWaj93kvEk94X9HOcln4gDj8fSFBf2+RMQUTPYmfhFmzu9qoATTyDlNdu5NznbSugj4bJLQkOXyjG1K4Nk4V72DsqoiQ8/ksw0SduC9J4yVkqMtFsLLEMRCJuDWZjN7KdUCxOh05RapdBo3ZN3m0mnzus1sxOIODdlUCR0KeFjpOyfqFuNPwsOqEArYok6jXA/WkVDjJoEGKjUnwa4oZ+rTtdIfge/XcpqU1C 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)(396003)(346002)(136003)(376002)(39860400002)(366004)(451199021)(5660300002)(8936002)(8676002)(2906002)(4326008)(66556008)(66946007)(66476007)(52116002)(110136005)(54906003)(6666004)(6486002)(1076003)(26005)(6512007)(6506007)(41300700001)(316002)(186003)(83380400001)(2616005)(478600001)(38100700002)(36756003)(86362001)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: U6DNsgTEJFgJnwgkGrVgga9FuiRZ6fdtEtW/uuQs5pYWtWNXkLJAbb2LwPLKaXjxsgau2c4I18b4XgpzRYj/FFBvIJi52jsn4QuFwcImIJbFu6mnwSniQ2HArPn0Iten/NEBroVrdlTLGsCjDEg3mBqq5yRrn7Mcq5o7Hv3X+AVH1+FKhbCi3nM84D+wiWU+IdK74YbFWZSB4GBATN/Md3KntWfqS3kq/in6WSHfV+NBLWnxLO5z7L8g5M32HknrJgK1Ura9HTOVYvwy8l0AIeLHH5938/hJFKIdeMXCYVvhbcqH4GiEQET3zRvVWAJMRJSos8f70950cZAL/AoQE7ndeRvUcuSife1i5fkiI3GHakTPAvDPsH5+hmNhtmjY0+XrIQQkV/cAAikvI4MYu5Klan0STcmM/hnZnKS3oWnC9tcHXQRe1Y5+XAbnKi1cQgiiioPIRZEcolgum9xB1mDOwSHkyFuHWGrRiV3M9lwqiU0oOMwZPF1qQ0zEfDHxsoPWcxoF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F+8WQCs2KErzS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ffdcffd-8dd5-45e7-7c1e-08db6bdfea08 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2023 07:29:25.3222 (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: EnBa1cRz4k7hfwNxxuCldEN8pyLjr9ego5PBV1Q0cTfEDRuV0ufex2QXG0XDrG4yPT9IB0AC5NWtuoDQri9tQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB3985 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, 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: <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?1768572138486799123?= X-GMAIL-MSGID: =?utf-8?q?1768572138486799123?= |
Series |
[v2] f2fs: enable nowait async buffered writes
|
|
Commit Message
李扬韬
June 13, 2023, 7:29 a.m. UTC
This adds the async buffered write support to f2fs, the following is the relevant test data. iodepth | 1 | 2 | 4 | 8 | 16 | before(M/s) | 1012 | 1133 | 894 | 981 | 866 | after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 | The following is the fio configuration: [global] ioengine=io_uring sqthread_poll=1 threads=1 iodepth=32 hipri=0 direct=0 fixedbufs=0 uncached=0 nowait=0 force_async=0 randrepeat=0 time_based=0 size=256M filename=/data/test/local/io_uring_test group_reporting [read256B-rand] bs=4096 rw=randwrite numjobs=1 Signed-off-by: Lu Hongfei <luhongfei@vivo.com> Signed-off-by: Yangtao Li <frank.li@vivo.com> --- fs/f2fs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Comments
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Tue, 13 Jun 2023 15:29:11 +0800 you wrote: > This adds the async buffered write support to f2fs, > the following is the relevant test data. > > iodepth | 1 | 2 | 4 | 8 | 16 | > before(M/s) | 1012 | 1133 | 894 | 981 | 866 | > after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 | > > [...] Here is the summary with links: - [f2fs-dev,v2] f2fs: enable nowait async buffered writes https://git.kernel.org/jaegeuk/f2fs/c/d61812691182 You are awesome, thank you!
On 2023/6/13 15:29, Yangtao Li wrote: > This adds the async buffered write support to f2fs, > the following is the relevant test data. > > iodepth | 1 | 2 | 4 | 8 | 16 | > before(M/s) | 1012 | 1133 | 894 | 981 | 866 | > after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 | > > The following is the fio configuration: > > [global] > ioengine=io_uring > sqthread_poll=1 > threads=1 > iodepth=32 > hipri=0 > direct=0 > fixedbufs=0 > uncached=0 > nowait=0 > force_async=0 > randrepeat=0 > time_based=0 > size=256M > filename=/data/test/local/io_uring_test > group_reporting > [read256B-rand] > bs=4096 > rw=randwrite > numjobs=1 > > Signed-off-by: Lu Hongfei <luhongfei@vivo.com> > Signed-off-by: Yangtao Li <frank.li@vivo.com> Jaegeuk, it may be late, feel free to add: Reviewed-by: Chao Yu <chao@kernel.org> Thanks,
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 4dd4e2bd000a..74ecc9e20619 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -554,7 +554,7 @@ static int f2fs_file_open(struct inode *inode, struct file *filp) if (err) return err; - filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC; + filp->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC | FMODE_BUF_WASYNC; return dquot_file_open(inode, filp); } @@ -4523,9 +4523,6 @@ static ssize_t f2fs_buffered_write_iter(struct kiocb *iocb, struct inode *inode = file_inode(file); ssize_t ret; - if (iocb->ki_flags & IOCB_NOWAIT) - return -EOPNOTSUPP; - current->backing_dev_info = inode_to_bdi(inode); ret = generic_perform_write(iocb, from); current->backing_dev_info = NULL;