Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6116137rwd; Mon, 5 Jun 2023 13:18:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Sg043LortzlqK3OwOaPUdXpTwaA5tAxsCmfsWmTD33vmjfKB87M7mI1zxYRVwWd+qWWLN X-Received: by 2002:a05:620a:2b4d:b0:75b:23a0:e7cb with SMTP id dp13-20020a05620a2b4d00b0075b23a0e7cbmr842973qkb.44.1685996299394; Mon, 05 Jun 2023 13:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685996299; cv=none; d=google.com; s=arc-20160816; b=SXSssVjIjBWsF62v8895nPlOXYHKZyCJwYDS06x/EvablKrWPb3jOdEmnk07AOIugE 7e/MhcalRkByojVGru4fCF//50xD15X5vPTnLGwI6ZahKto2OdBQaHqEURBaC76ORK9i yxmgnVa/3E1iiJBuXY6zolVS4jvDIVHmB1kCAJxJfjH1YBJgIlPuz7hjvVQNJ54kfz/p 4EubhRcoTzoUm6a63v3GbuFeRq4Gij9ynPUupYyfocW5ofSJjWjy9HPN56MM6CfPoJR+ 0yFSvICTQOoFkAxuPGdbIm6NGTItpIDqZBIyIN08Ff6v/gB1ad4v9BEv5j1Imt+2GWba uz4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=AbTP/icYhaKI9eVEM9foTsbyTtAKszftp42FiFRjApE=; b=ofQLD0Uj0Di90oGTbeOK2EzsKlvQVnKzfKvT/Nx1MFf5evUFsXUk2EqvB+0aLFbOQ4 U0AX4HjD9hlne7bYqlvK0Fg/r0DtPZX7NuTSTzz6YwDq5OE/YRsug3hb8QgYckyjMlWQ SdTRh2mMGc6oOebDoGxLOqdJEvBWdRVIpKzsfTKkEpN5OzIaEEDpIIHMd2THzb1gYGwV eGHlIn9mkFAQptkmKnU3HZgkYv9IlSG5iwbnEIlqgCVrADULfxXWoOU+BSjsRRi5LKIq /q9cjJzmXSiz+KUiN6M9nvL9/8Ad/Fnop9u+zQWhR5qqjTRg7CEfcrRG4ufa0tx3BdMS SnkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iiyaU3Lo; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a05620a01e600b0075cec657d33si5024264qkn.96.2023.06.05.13.18.04; Mon, 05 Jun 2023 13:18:19 -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=@kernel.org header.s=k20201202 header.b=iiyaU3Lo; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235913AbjFETt7 (ORCPT + 99 others); Mon, 5 Jun 2023 15:49:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235959AbjFETt2 (ORCPT ); Mon, 5 Jun 2023 15:49:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B88B196 for ; Mon, 5 Jun 2023 12:49:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58964629F6 for ; Mon, 5 Jun 2023 19:48:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E147C433A1; Mon, 5 Jun 2023 19:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685994517; bh=Sueiie1DUsoUmYO3JzWY/sOCc4aMVdtU32UPjgG9EkU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iiyaU3LoSTaZ0MQNp9WFck95P9tfxtA90k6+FX03l0u443qjgA/YZ/9MbPfwz9bsr gwf2OLNgFnTLNr4p7w/QN7UDLBjOzDCZ3ePfEwy5DpF54rhgvKf1IAkdTXq4R/eIZs oAAynFlWRlRmoT9qGW3JI+B0qsiCvL4or9laTtey+6ODdW5opbE2NI1++tRRGr64v1 VuriNXXkrvBxp27bSEMMULbM3DPBeEt8ppxQT2d4ZDoE7llv55MPC8Sej58nYPI2W+ omTAKgV5fOBck+NjNT9/V+qqWioIkQga/A29tpuxJMnzULtzGKDg0XkyO+Q1wZi9iS GJX5BKVpY60ow== Date: Mon, 5 Jun 2023 12:48:35 -0700 From: Jaegeuk Kim To: Juhyung Park Cc: Yangtao Li , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Lu Hongfei Subject: Re: [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads Message-ID: References: <20230531125918.55609-1-frank.li@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 On 05/31, Juhyung Park wrote: > Hi Yangtao, > > I remember hearing that f2fs can perform relatively poorly under io_uring, > nice find. > > I suggest rewriting the commit message though. From the looks of it, it > might suggest that FMODE_BUF_RASYNC is a magic flag that automatically > improves performance that can be enabled willy nilly. > > How about something like: > > f2fs uses generic_file_buffered_read(), which supports buffered async > reads since commit 1a0a7853b901 ("mm: support async buffered reads in > generic_file_buffered_read()"). Thanks Juhyung, Applied with a minor motification based on yours. :) > > Match other file-systems and enable it. The read performance has been > greatly improved under io_uring: > > 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 > > On Wed, May 31, 2023 at 10:01 PM Yangtao Li via Linux-f2fs-devel > wrote: > > > > 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 > > > > > > > > _______________________________________________ > > Linux-f2fs-devel mailing list > > Linux-f2fs-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel