-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand user_data #1258
Comments
We can't change the CQE, it's fixed. Use cases that need it can use the CQE32 feature and get twice as much space. But:
Not sure what this means, "rather than fd"? Cancel can work on a number of criteria, eg combined fd + op or something like that. In general, however, optimizing for cancelations seems odd, as it should be a rarer occurence. |
My idea is: could it be possible to have a configurable flag/parameter to setup a ring instance with bigger sqe/cqe user_data? just like SQE128/CQE32.
The pointer of the struct was assigned to the sqe->user_data, so when the cqe returned, the userspace can retrive the pointer to deal with the operaion ID and the send buffer address. Assumed thousands of send buffer were allocated, there would be thousands of different user_data, even if they probably all share the same operation ID member. Now if we can have a 128bit user_data, 64bits of which stores an operation ID, the other 64bits stores a pointer, then cancel_userdata can match only the operation ID with a mask. |
My view is 64bit user_data is not enough.
In order to use send_zc more flexibly, a circle linked list is introduced to maintain buffers. Then each send cqe must contain a buffer address, so some memory could be released later. However, there must be an ID to distinguish operations as usual, then I wrap up the ID and the buffer pointer to a new struct, and assign the struct pointer to user_data.
Apparently all looks good, but if the application has to cancel some operations rather than fd, it would be very daunting to walk through the long list of such structs and submit plenty of cancel operations.
Overall a longer user_data is needed, meanwhile cancel_userdata can be assigned a mask.
The text was updated successfully, but these errors were encountered: