Skip to content

RDMA FLUSH and ATOMIC WRITE with ODP #1580

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

Merged
merged 5 commits into from
Apr 27, 2025
Merged

Conversation

ddmatsu
Copy link
Contributor

@ddmatsu ddmatsu commented Mar 14, 2025

RDMA FLUSH[1] and ATOMIC WRITE[2] were added to rxe, but they cannot run
in the ODP mode as of now. This series is for the userspace enablement.

The former three patches correspond to an uapi change in the kernel.
(v1/merged) https://lore.kernel.org/linux-rdma/[email protected]/T/#t

The latter four add definitions of ODP capabilities and rdma-core testcases for the new features.
For kernel-side enablement in rxe, please see:
(Updated v3/merged) https://lore.kernel.org/linux-rdma/[email protected]/T/#t

[1] [for-next PATCH 00/10] RDMA/rxe: Add RDMA FLUSH operation
https://lore.kernel.org/lkml/[email protected]/

[2] [PATCH v7 0/8] RDMA/rxe: Add atomic write operation
https://lore.kernel.org/linux-rdma/[email protected]/

@ddmatsu ddmatsu marked this pull request as ready for review March 14, 2025 08:18
@ddmatsu
Copy link
Contributor Author

ddmatsu commented Apr 9, 2025

The kernel-side enablement was merged to for-next.
I have confirmed that tests added in this PR run successfully with the latest for-next kernel.

@@ -235,6 +235,8 @@ enum ibv_odp_transport_cap_bits {
IBV_ODP_SUPPORT_READ = 1 << 3,
IBV_ODP_SUPPORT_ATOMIC = 1 << 4,
IBV_ODP_SUPPORT_SRQ_RECV = 1 << 5,
IBV_ODP_SUPPORT_FLUSH = 1 << 6,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't these bits coming from UAPI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I will send a kernel patch to add IB_UVERBS_ODP_* flags in include/uapi/rdma/ib_user_verbs.h and update this PR accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rleon
I've submitted the kernel patch and updated this PR.

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revised the kernel-headers commit after all the kernel-side patches were merged.

@rleon
Copy link
Member

rleon commented Apr 10, 2025

General comment to all patches. Please write commit messages for all commits.

Thanks

@ddmatsu ddmatsu marked this pull request as draft April 16, 2025 04:28
@ddmatsu ddmatsu marked this pull request as ready for review April 18, 2025 05:21
@ddmatsu ddmatsu marked this pull request as draft April 21, 2025 12:18
To commit: 685f9537a728 ("RDMA/core: Move ODP capability definitions to
uapi").

Signed-off-by: Daisuke Matsuda <[email protected]>
@ddmatsu ddmatsu marked this pull request as ready for review April 22, 2025 05:23
@ddmatsu ddmatsu force-pushed the odp-extended branch 3 times, most recently from 60bb335 to 765c81e Compare April 22, 2025 07:33
@rleon
Copy link
Member

rleon commented Apr 22, 2025

CI must pass for this PR

@ddmatsu ddmatsu force-pushed the odp-extended branch 2 times, most recently from 2033412 to bbd0dc9 Compare April 23, 2025 00:06
ddmatsu added 4 commits April 25, 2025 01:18
Add ODP capabilities for RDMA FLUSH and ATOMIC WRITE so that the flags can
be queried via ibv_query_device_ex().

Signed-off-by: Daisuke Matsuda <[email protected]>
Let pyverbs use the new bits for ODP capabilities.

Signed-off-by: Daisuke Matsuda <[email protected]>
Add a test of ATOMIC WRITE sequences with ODP. MR is invalidated at the
beginning of this workload so that page fault is triggered at least once.

The test was implemented in reference to test_qp_ex_rc_atomic_write() in
test_qpex.py. create_qp_ex() is moved to utils.py so that it can be used
from other tests.

Signed-off-by: Daisuke Matsuda <[email protected]>
Add a test of RDMA FLUSH sequences with ODP. MR is invalidated at the
beginning of this workload so that page fault is triggered at least once.
The test was implemented in reference to test_qp_ex_rc_flush() in
test_qpex.py

Signed-off-by: Daisuke Matsuda <[email protected]>
@ddmatsu
Copy link
Contributor Author

ddmatsu commented Apr 25, 2025

I think it is now okay.

@rleon rleon merged commit 4603f83 into linux-rdma:master Apr 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants