linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads
@ 2023-05-31 12:59 Yangtao Li via Linux-f2fs-devel
  2023-05-31 13:53 ` Juhyung Park
  2023-06-07 17:30 ` patchwork-bot+f2fs
  0 siblings, 2 replies; 5+ messages in thread
From: Yangtao Li via Linux-f2fs-devel @ 2023-05-31 12:59 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu
  Cc: linux-f2fs-devel, linux-kernel, Lu Hongfei, Yangtao Li

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 <luhongfei@vivo.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads
  2023-05-31 12:59 [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads Yangtao Li via Linux-f2fs-devel
@ 2023-05-31 13:53 ` Juhyung Park
  2023-06-05 19:48   ` Jaegeuk Kim
  2023-06-07 17:30 ` patchwork-bot+f2fs
  1 sibling, 1 reply; 5+ messages in thread
From: Juhyung Park @ 2023-05-31 13:53 UTC (permalink / raw)
  To: Yangtao Li; +Cc: Jaegeuk Kim, linux-kernel, Lu Hongfei, linux-f2fs-devel

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()").

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
<linux-f2fs-devel@lists.sourceforge.net> 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 <luhongfei@vivo.com>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads
  2023-05-31 13:53 ` Juhyung Park
@ 2023-06-05 19:48   ` Jaegeuk Kim
  2023-06-06  6:40     ` Chao Yu
  0 siblings, 1 reply; 5+ messages in thread
From: Jaegeuk Kim @ 2023-06-05 19:48 UTC (permalink / raw)
  To: Juhyung Park; +Cc: linux-kernel, linux-f2fs-devel, Lu Hongfei, Yangtao Li

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
> <linux-f2fs-devel@lists.sourceforge.net> 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 <luhongfei@vivo.com>
> > Signed-off-by: Yangtao Li <frank.li@vivo.com>
> > ---
> >  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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads
  2023-06-05 19:48   ` Jaegeuk Kim
@ 2023-06-06  6:40     ` Chao Yu
  0 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2023-06-06  6:40 UTC (permalink / raw)
  To: Jaegeuk Kim, Juhyung Park
  Cc: linux-f2fs-devel, linux-kernel, Lu Hongfei, Yangtao Li

On 2023/6/6 3:48, Jaegeuk Kim wrote:
> 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. :)

The version in dev-test branch looks good to me.

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

> 
>>
>> 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
>> <linux-f2fs-devel@lists.sourceforge.net> 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 <luhongfei@vivo.com>
>>> Signed-off-by: Yangtao Li <frank.li@vivo.com>
>>> ---
>>>   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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads
  2023-05-31 12:59 [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads Yangtao Li via Linux-f2fs-devel
  2023-05-31 13:53 ` Juhyung Park
@ 2023-06-07 17:30 ` patchwork-bot+f2fs
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+f2fs @ 2023-06-07 17:30 UTC (permalink / raw)
  To: Yangtao Li; +Cc: jaegeuk, linux-kernel, luhongfei, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed, 31 May 2023 20:59:18 +0800 you 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
> 
> [...]

Here is the summary with links:
  - [f2fs-dev] f2fs: flag as supporting buffered async reads
    https://git.kernel.org/jaegeuk/f2fs/c/fdb43e12e0c1

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-07 17:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-31 12:59 [f2fs-dev] [PATCH] f2fs: flag as supporting buffered async reads Yangtao Li via Linux-f2fs-devel
2023-05-31 13:53 ` Juhyung Park
2023-06-05 19:48   ` Jaegeuk Kim
2023-06-06  6:40     ` Chao Yu
2023-06-07 17:30 ` patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).