-
Notifications
You must be signed in to change notification settings - Fork 5
[Feature] support zero copy #28
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
base: dev
Are you sure you want to change the base?
Conversation
c1c9404 to
c976b9d
Compare
server/transport/ucx.c
Outdated
| resp->request_id = request_id; /* be64 */ | ||
| resp->status = htobe16(status); | ||
| resp->length = htobe32(length); | ||
| resp->addr_offset = htobe32(addr_offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
htobe64
| "addr_offset: 0x%lx, length %d\n", | ||
| request_id, priskv_resp_status_str(status), status, addr_offset, value_length); | ||
| req_sync->status = status; | ||
| req_sync->value_length = value_length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addr_offset is missing
| case UCS_INPROGRESS: \ | ||
| break; \ | ||
| default: \ | ||
| default:; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary, could be removed
| cp server/priskv-server output/ | ||
| cp client/priskv-benchmark output/ | ||
| cp client/priskv-client output/ | ||
| cp cluster/client/priskv-cluster-benchmark output/ No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let keep the extra newline as the last line of the file
include/priskv-protocol.h
Outdated
| PRISKV_COMMAND_ALLOC = 0x08, /* alloc memory region if support zero copy */ | ||
| PRISKV_COMMAND_SEAL = 0x09, /* seal memory region*/ | ||
| PRISKV_COMMAND_ACQUIRE = 0x0a, /* acquire memory region if support zero copy */ | ||
| PRISKV_COMMAND_RELEASE = 0x0b, /* release memory region */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's refine the comment as "release memory region acquired for read" to eliminate confusion, since typically "release" could be also paired with "alloc"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for priskv_release_async
Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
- add dl to cflags Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
c976b9d to
7fc999b
Compare
Pull Request Description
[Please provide a clear and concise description of your changes here]
feat: Initial support for zero-copy commands (all server commands are empty implementations for now)
alloc/seal/acquire/release
to support alloc command, we add a member alloc_length in priskv_request, and add a member addr_offset in priskv_response
to support acquire command, we also use the new member addr_offset in priskv_response
Related Issues
Resolves: #[Insert issue number(s)]
Important: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to PrisKV! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]: Corrections to existing functionality[CI]: Changes to build process or CI pipeline[Docs]: Updates or additions to documentation[API]: Modifications to PrisKV's API or interface[CLI]: Changes or additions to the Command Line Interface[Misc]: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.