zbjornson / node-io-uring

Prototype using io_uring for true async fs I/O in libuv/Node.js
42 stars 4 forks source link

Question on io_uring_prep_readv on timerfd #2

Closed CarterLi closed 5 years ago

CarterLi commented 5 years ago

I don't know where to ask, but this is my question:

Instead of combining with poll_add and a plain read, I was trying to read a timerfd directly using io_uring_prep_readv.

My expectation is that the operation will be finished ( got by io_uring_peek_cqe ) after the timer expired, but it ended up with -EINVAL ( cqe->res ).

The same setup works as expected with a plain readv and io_uring_prep_poll_add.

Is it intended behavior? Does eventfd work as timerfd too?

Thanks in advance.

zbjornson commented 5 years ago

Unfortunately I'm not the person to ask, and this repo is just for Node.js bindings for io_uring. @axboe would be the one. He's been helpful on twitter if you want to ask there maybe. https://twitter.com/axboe

CarterLi commented 5 years ago

Ok, thanks for your information