Re: polled IO and 5.x kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 18 Dec 2019 at 19:02, Ober, Frank <frank.ober@xxxxxxxxx> wrote:
>
> Hi fio community,
> On 4.x kernels we used to be able to do:
> # echo 1 > /sys/block/nvme0n1/queue/io_poll
>
> And then run a polled_io job in fio with pvsync2 as our ioengine, with the hipri flag set.
>
> On 5.x kernels we see the following error trying to write the device settings>>>
> -bash: echo: write error: Invalid argument

Wouldn't this be better asked on the linux-block mailing list
(http://vger.kernel.org/vger-lists.html#linux-block )?

If you're saying "This worked in 4.20 but not in 5.0" (after all since
you can see this clearly bisection is always an option for you) then a
quick search (https://github.com/torvalds/linux/search?o=desc&p=2&q=%22io_poll%22&s=committer-date&type=Commits
) finds this commit -
https://github.com/torvalds/linux/commit/cd19181bf9ad4b7f40f2a4e0355d052109c76529
which might have something to do with the change of behaviour...

> This is verifiable on 5.3, 5.4 kernels with fio 3.16 builds.
>
> What is the background on what has changed because Jens wrote this note back in 2015, which did work once upon a time.
> But now things have changed, but none of us here in the Intel SSD group and OSS Driver team really know why.
>
> https://lwn.net/Articles/663543/

Note: this is just an excerpt from a mailing list post that LWN
happened to highlight. See
https://lore.kernel.org/lkml/1446830423-25027-1-git-send-email-axboe@xxxxxx/
for the post and its thread...

> More documentation can be found here: https://stackoverflow.com/questions/55223883/echo-write-error-invalid-argument-while-setting-io-poll-for-nvme-ssd/

Isn't stackoverflow for programming questions rather than "where's a
kernel option gone?" style question? Maybe
https://unix.stackexchange.com/ would have been a better home?

> Here is a good sample A / B test:
> [global]
> direct=1
> filename=/dev/nvme1n1
> log_avg_msec=500
> time_based
> percentile_list=1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99:99.999:99.9999
>
>
> [rand-read-4k-qd1]
> runtime=120
> bs=4K
> iodepth=1
> numjobs=1
> cpus_allowed=0
> ioengine=io_uring
> hipri
> rw=randread
> Works!
>
> [global]
> direct=1
> filename=/dev/nvme1n1
> log_avg_msec=500
> time_based
> percentile_list=1:5:10:20:30:40:50:60:70:80:90:95:99:99.5:99.9:99.95:99.99:99.999:99.9999
>
>
> [rand-read-4k-qd1]
> runtime=120
> bs=4K
> iodepth=1
> numjobs=1
> cpus_allowed=0
> ioengine=pvsync2
> hipri
> rw=randread
> Does not work... you do not see the CPU spin up to 100% (kernel/sys usage) on hipri with pvsync2 on a 5.x kernel.
>
> Why not?

Glancing at https://fio.readthedocs.io/en/latest/fio_doc.html#i-o-engine-specific-parameters
, hipri on the pvsync2 ioengine means something different to hipri on
io_uring ioengine...

> And what changed here?

Just to check, do you get the same "full CPU" utilisation when you
remove hipri from your pvsync job on a 4.x kernel?

> Is it possible to get a new LWN article?

That sounds like one for Jon Corbet (LWN.net editor) and the block
maintainers but as mentioned above what you linked to was just a
mailing list excerpt...

> Thank you!
> Frank Ober

Good luck!

-- 
Sitsofe | http://sucs.org/~sits/



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux