Skip to content

Commit

Permalink
UCP/RMA/FLUSH: Move fence_seq from the union
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-shalev committed Feb 20, 2025
1 parent 3cd2b08 commit 1c0d9f0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/ucp/core/ucp_ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ void ucp_ep_flush_state_reset(ucp_ep_h ep)

flush_state->send_sn = 0;
flush_state->cmpl_sn = 0;
flush_state->fence_seq = 0;
ucs_hlist_head_init(&flush_state->reqs);
ucp_ep_update_flags(ep, UCP_EP_FLAG_FLUSH_STATE_VALID, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ucp/core/ucp_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,6 @@ typedef struct {
are waiting for remote completion */
uint32_t send_sn; /* Sequence number of sent operations */
uint32_t cmpl_sn; /* Sequence number of completions */
uint32_t fence_seq; /* Sequence number for fence detection */
} ucp_ep_flush_state_t;


Expand Down Expand Up @@ -548,6 +547,7 @@ typedef struct ucp_ep_ext {

ucp_lane_map_t unflushed_lanes; /* Bitmap of lanes which have unflushed
operations */
uint32_t fence_seq; /* Sequence number for fence detection */

/**
* UCT endpoints for every slow-path lane that has no room in the base endpoint
Expand Down
4 changes: 2 additions & 2 deletions src/ucp/core/ucp_ep.inl
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,14 @@ ucp_ep_is_strong_fence(ucp_ep_h ep)
static UCS_F_ALWAYS_INLINE int
ucp_ep_is_fence_required(ucp_ep_h ep)
{
return (ep->ext->flush_state.fence_seq < ep->worker->fence_seq) &&
return (ep->ext->fence_seq < ep->worker->fence_seq) &&
(ep->worker->context->config.ext.fence_mode == UCP_FENCE_MODE_EP_BASED);
}

static UCS_F_ALWAYS_INLINE void
ucp_ep_update_fence_seq(ucp_ep_h ep)
{
ep->ext->flush_state.fence_seq = ep->worker->fence_seq;
ep->ext->fence_seq = ep->worker->fence_seq;
}

#endif
2 changes: 1 addition & 1 deletion test/gtest/common/test_obj_size.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ UCS_TEST_F(test_obj_size, size) {
UCS_TEST_SKIP_R("Assert enabled");
#else
EXPECTED_SIZE(ucp_ep_t, 64);
EXPECTED_SIZE(ucp_ep_ext_t, 192);
EXPECTED_SIZE(ucp_ep_ext_t, 200);
#if ENABLE_PARAMS_CHECK
EXPECTED_SIZE(ucp_rkey_t, 32 + sizeof(ucp_ep_h));
#else
Expand Down

0 comments on commit 1c0d9f0

Please sign in to comment.