Re: Sending CQE to a different ring

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

 



Yes, passing positive result value would make more sense than PID of
submitter, which is rarely, if ever, needed. IIUC we would not be able
to use linking with such approach, since sqe->len has to be set in
user code based on a received CQE, but I guess it should be fine in
practice.

Right, and using sqe->len and passing it through makes a lot more sense
in general as you can pass whatever you want there. If you want to use
the pid, you can use it like that. Or for whatever else you'd want. That
gives you both 'len' and 'user_data' as information you can pass between
the rings.

It could also be used as `len` holding a message type, and `user_data`
holding a pointer to a struct. For example.

I like IORING_OP_WAKEUP_RING with sqe->len being copied to cqe->result. The only question I have is how should "negative" (i.e. bigger or equal to 2^31) lengths be handled. They either should be copied similarly to positive values or we should get an error.

Also what do you think about registering ring fds? Could it be beneficial?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux