Skip to contentSkip to conversation

Can't setup io_uring for buffered IO

DISCUSSION Ming Lei 2 participants 3 messages Aug 16, 2021 – Aug 17, 2021

lore
Share & tools
lore

Ming Lei

author
#0 lore raw

Hello Guys,

I tried to use the following script to run buffered io with io_uring, but looks it always complains with 'Operation not supported', and any idea to make it working?

++ /root/git/fio/fio --readonly --name=onessd --filename=/dev/nvme0n1 --filesize=16m --rw=randread --bs=4k --direct=0 --overwrite=0 --numjobs=1 --iodepth=1 --time_based=1 --runtime=1 --ioengine=io_uring --registerfiles --fixedbufs --hipri=1 --gtod_reduce=1 --group_reporting
onessd: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=1
fio-3.25-229-gdf9e8
Starting 1 process
fio: io_u error on file /dev/nvme0n1: Operation not supported: read offset=1011712, buflen=4096
fio: pid=3278, err=95/file:io_u.c:1841, func=io_u error, error=Operation not supported

onessd: (groupid=0, jobs=1): err=95 (file:io_u.c:1841, func=io_u error, error=Operation not supported): pid=3278: Mon Aug 16 12:01:17 2021

Thanks,
Ming

author
#1 lore raw
Quoted 6 lines · Ming Lei

Hello Guys,

I tried to use the following script to run buffered io with io_uring, but looks it always complains with 'Operation not supported', and any idea to make it working?

Quoted 8 lines

++ /root/git/fio/fio --readonly --name=onessd --filename=/dev/nvme0n1 --filesize=16m --rw=randread --bs=4k --direct=0 --overwrite=0 --numjobs=1 --iodepth=1 --time_based=1 --runtime=1 --ioengine=io_uring --registerfiles --fixedbufs --hipri=1 --gtod_reduce=1 --group_reporting
onessd: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=1
fio-3.25-229-gdf9e8
Starting 1 process
fio: io_u error on file /dev/nvme0n1: Operation not supported: read offset=1011712, buflen=4096
fio: pid=3278, err=95/file:io_u.c:1841, func=io_u error, error=Operation not supported

onessd: (groupid=0, jobs=1): err=95 (file:io_u.c:1841, func=io_u error, error=Operation not supported): pid=3278: Mon Aug 16 12:01:17 2021

Just figured out that --hipri can't be applied for buffered IO.

Signature · 1 line
Ming
#2 lore raw
Quoted 14 lines · Ming Lei
Quoted 13 lines · Ming Lei

Hello Guys,

I tried to use the following script to run buffered io with io_uring, but looks it always complains with 'Operation not supported', and any idea to make it working?

++ /root/git/fio/fio --readonly --name=onessd --filename=/dev/nvme0n1 --filesize=16m --rw=randread --bs=4k --direct=0 --overwrite=0 --numjobs=1 --iodepth=1 --time_based=1 --runtime=1 --ioengine=io_uring --registerfiles --fixedbufs --hipri=1 --gtod_reduce=1 --group_reporting
onessd: (g=0): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=io_uring, iodepth=1
fio-3.25-229-gdf9e8
Starting 1 process
fio: io_u error on file /dev/nvme0n1: Operation not supported: read offset=1011712, buflen=4096
fio: pid=3278, err=95/file:io_u.c:1841, func=io_u error, error=Operation not supported

Quoted 3 lines
Quoted 1 line

onessd: (groupid=0, jobs=1): err=95 (file:io_u.c:1841, func=io_u error, error=Operation not supported): pid=3278: Mon Aug 16 12:01:17 2021

Just figured out that --hipri can't be applied for buffered IO.

Yes, and we may want to catch that in fio setup. But hipri (polled IO) is only available with O_DIRECT.

Signature · 1 line
Jens Axboe