public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH -next] bcachefs: support iopoll method
  2024-08-15 14:20 [PATCH -next] bcachefs: support iopoll method Li Zetao
@ 2024-08-15 14:16 ` Kent Overstreet
  2024-08-16  3:35   ` Li Zetao
  0 siblings, 1 reply; 3+ messages in thread
From: Kent Overstreet @ 2024-08-15 14:16 UTC (permalink / raw)
  To: Li Zetao; +Cc: linux-bcachefs, linux-kernel

On Thu, Aug 15, 2024 at 10:20:34PM GMT, Li Zetao wrote:
> When bcachefs uses io_uring, implement the iopoll method to support
> IORING_SETUP_IOPOLL.
> 
> Signed-off-by: Li Zetao <lizetao1@huawei.com>

tested?

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

* [PATCH -next] bcachefs: support iopoll method
@ 2024-08-15 14:20 Li Zetao
  2024-08-15 14:16 ` Kent Overstreet
  0 siblings, 1 reply; 3+ messages in thread
From: Li Zetao @ 2024-08-15 14:20 UTC (permalink / raw)
  To: kent.overstreet; +Cc: lizetao1, linux-bcachefs, linux-kernel

When bcachefs uses io_uring, implement the iopoll method to support
IORING_SETUP_IOPOLL.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
---
 fs/bcachefs/fs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c
index c50457ba808d..c97bc94fcb83 100644
--- a/fs/bcachefs/fs.c
+++ b/fs/bcachefs/fs.c
@@ -1213,6 +1213,7 @@ static const struct file_operations bch_file_operations = {
 	.llseek		= bch2_llseek,
 	.read_iter	= bch2_read_iter,
 	.write_iter	= bch2_write_iter,
+	.iopoll		= iocb_bio_iopoll,
 	.mmap		= bch2_mmap,
 	.get_unmapped_area = thp_get_unmapped_area,
 	.fsync		= bch2_fsync,
-- 
2.34.1


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

* Re: [PATCH -next] bcachefs: support iopoll method
  2024-08-15 14:16 ` Kent Overstreet
@ 2024-08-16  3:35   ` Li Zetao
  0 siblings, 0 replies; 3+ messages in thread
From: Li Zetao @ 2024-08-16  3:35 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcachefs, linux-kernel

Hi,

在 2024/8/15 22:16, Kent Overstreet 写道:
> On Thu, Aug 15, 2024 at 10:20:34PM GMT, Li Zetao wrote:
>> When bcachefs uses io_uring, implement the iopoll method to support
>> IORING_SETUP_IOPOLL.
>>
>> Signed-off-by: Li Zetao <lizetao1@huawei.com>
> 
> tested?
I have tested with fio:

[root]# vi bcachefs.fio
[global]
direct=1
thread=1
norandommap=1
group_reporting=1
time_based=1
ioengine=io_uring

rw=randwrite
bs=4096
runtime=20
numjobs=1
fixedbufs=1
hipri=1
registerfiles=1
sqthread_poll=1

[filename0]
size=1G
iodepth=1
cpus_allowed=20
filename=/mnt/bcachefs/test

The option "hipri=1" need to support IORING_SETUP_IOPOLL for io_uring 
engine.

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

end of thread, other threads:[~2024-08-16  3:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 14:20 [PATCH -next] bcachefs: support iopoll method Li Zetao
2024-08-15 14:16 ` Kent Overstreet
2024-08-16  3:35   ` Li Zetao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox