Skip to content
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

RC/KEEPALIVE: move KA progress into iface progress #184

Conversation

hoopoepg
Copy link

  • performance optimization: move KEEPALIVE progress call
    into iface progress

Comment on lines 170 to 172
if ((iface->keepalive.iter_count++ % UCP_WORKER_KEEPALIVE_ITER_SKIP) != 0) {
return 0;
}
Copy link
Owner

Choose a reason for hiding this comment

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

maybe do this check in uct_rc_mlx5_iface_progress?

Copy link
Author

Choose a reason for hiding this comment

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

maybe do this check in uct_rc_mlx5_iface_progress?

moved into face progress

Comment on lines +174 to +183
if (ucs_unlikely(ucs_get_time() < iface->keepalive.time)) {
return 0;
}

ucs_spin_lock(&iface->super.ep_list_lock);
ucs_list_for_each(ep, &iface->super.ep_list, super.list) {
ucs_trace("send keepalive grant on ep %p", ep);
uct_rc_ep_fc_send_grant(&ep->super);
}
ucs_spin_unlock(&iface->super.ep_list_lock);

uct_rc_mlx5_iface_print(iface, "keepalive");

iface->keepalive.time = ucs_get_time() + iface->config.ka_interval;
Copy link
Owner

Choose a reason for hiding this comment

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

put this in a noninline func

Copy link
Author

Choose a reason for hiding this comment

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

put this in a noninline func

marked as non-inline

@hoopoepg
Copy link
Author

@yosefe ok to squash?

Comment on lines 192 to 194
if ((iface->config.ka_interval != 0) &&
((iface->keepalive.iter_count++ %
UCP_WORKER_KEEPALIVE_ITER_SKIP) != 0)) {
Copy link
Owner

Choose a reason for hiding this comment

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

minor: can invert condition order. since we always enable keepalive, probably the condition with % will be false most of the times

Copy link
Author

Choose a reason for hiding this comment

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

minor: can invert condition order. since we always enable keepalive, probably the condition with % will be false most of the times

I set such condition sequence to not update iter_count in case if KA is not enabled...
updated

- performance optimization: move KEEPALIVE progress call
  into iface progress
@hoopoepg hoopoepg force-pushed the topic/merge-ka-progress-into-iface-progress branch from 527b7df to 8481059 Compare August 24, 2021 08:45
@hoopoepg
Copy link
Author

squashed

@yosefe yosefe merged commit bee3f76 into yosefe:integration3 Aug 24, 2021
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