On 4/29/22 12:40 PM, Hao Xu wrote: > > > On 4/30/22 02:31, Hao Xu wrote: >> On 4/27/22 09:54, Jens Axboe wrote: >>> Hi, >>> >>> I had a re-think on the flags2 addition [1] that was posted earlier >>> today, and I don't really like the fact that flags2 then can't work >>> with ioprio for read/write etc. We might also want to extend the >>> ioprio field for other types of IO in the future. >>> >>> So rather than do that, do a simpler approach and just add an io_uring >>> specific flag set for send/recv and friends. This then allow setting >>> IORING_RECVSEND_POLL_FIRST in sqe->addr2 for those, and if set, io_uring >>> will arm poll first rather than attempt a send/recv operation. >>> >>> [1] https://lore.kernel.org/io-uring/20220426183343.150273-1-axboe@xxxxxxxxx/ >>> >> >> Hi Jens, >> Could we use something like the high bits of sqe->fd to store general flags2 >> since I saw the number of open FDs can be about (1<<20) at most. > > oops, sorry my bad, (1<<20) is just a default value.. Indeed, you can certainly go higher and people do. -- Jens Axboe