Conversation
Contributor
|
@samlurye has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116806594. |
samlurye
force-pushed
the
export-D116806594
branch
from
August 20, 2026 18:52
b5fa586 to
bf9f007
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 20, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
2 times, most recently
from
August 24, 2026 19:11
65abb87 to
ad38e89
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 24, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
2 times, most recently
from
August 24, 2026 22:45
13ad43e to
a54bca2
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 25, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 25, 2026 00:40
a54bca2 to
674f73e
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 25, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 25, 2026 00:44
674f73e to
5ea8f94
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 25, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 25, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 26, 2026 20:46
5ea8f94 to
142342e
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 26, 2026 20:46
142342e to
cbbaf22
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Pull Request resolved: meta-pytorch#4714 Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
Summary: Introduce the `IbvCompletionQueue` trait, which will wrap real hardware-backed completion queue. The upcoming `CompletionQueueActor` will be generic over `IbvCompletionQueue`, allowing the batched polling logic to be tested without real hardware. Reviewed By: zdevito Differential Revision: D116689368
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 26, 2026 22:49
cbbaf22 to
eb765bc
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
force-pushed
the
export-D116806594
branch
from
August 26, 2026 22:49
eb765bc to
3659093
Compare
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Reviewed By: zdevito Differential Revision: D116806594
samlurye
added a commit
to samlurye/monarch-1
that referenced
this pull request
Aug 26, 2026
Summary: Pull Request resolved: meta-pytorch#4714 Add `CompletionQueueActor`: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair. Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC). When the QP is ready to start posting, it sends an `Attach` message to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP. The CQ actor does not poll unless there is work to be done. QPs wake it by sending `Posted` notifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller. QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet. Differential Revision: D116806594
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add
CompletionQueueActor: one poller for many CQs, holding a route from each queue pair's completions back to that queue pair.Each CQ actor starts empty. When a new QP starts up, the manager actor will (eventually, not yet implemented) assign a CQ and, independently, a CQ actor to that QP according to some user configured policy. This design allows us to try different concurrency models (e.g., one CQ actor polls every CQ in the process vs. one CQ actor for every NIC polls every CQ for that specific NIC).
When the QP is ready to start posting, it sends an
Attachmessage to the assigned CQ actor with: the CQ to poll; an atomic counter indicating how many WRs that QP has posted so far; and a port for sending batches of completions back to the QP.The CQ actor does not poll unless there is work to be done. QPs wake it by sending
Postednotifications when they have posted new WRs. Between yields, the CQ actor loop polls every CQ that it tracks, requesting 64 CQEs at a time from each CQ. When it consumes CQEs, it routes them back to the relevant QP so that it can update its credit tracking and send replies to the original caller.QP detaching logic and other failure handling is left for future commits. Nothing uses this code yet.
Reviewed By: zdevito
Differential Revision: D116806594