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

Optimization for connection establishment. #16006

Merged
merged 1 commit into from Aug 10, 2017

Conversation

shangfufei
Copy link

Under the mode of RDMA communication, this modification can improve the efficiency of establishing connections and improve the success rate of connection establishment.

Signed-off-by: shangfufei shangfufei@inspur.com

Signed-off-by: shangfufei <shangfufei@inspur.com>
} else { // ack from client
connected = 1;
cleanup();
ldout(cct, 10) << __func__ << " handshake of rdma is done. server connected: " << connected << dendl;
//cleanup();
Copy link
Member

Choose a reason for hiding this comment

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

why comment cleanup

Copy link
Author

Choose a reason for hiding this comment

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

this modification is to slove the problem that there will be a lot of CLOSE_WAIT when CEPH is running. @yuyuyu101

Copy link
Member

Choose a reason for hiding this comment

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

if not cleanup, it will leak socket... CLOSE_WAIT is just ok

Copy link
Author

Choose a reason for hiding this comment

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

hi, after comment cleanup, we add a way to disconnect the connection in handle_connection() to avoid socket leakage, as follows:
if (1 == connected) {
ldout(cct, 1) << func << " warnning: logic failed: read len: " << r << dendl;
fault();
return;
}
@yuyuyu101

Copy link
Member

Choose a reason for hiding this comment

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

what's the difference?

Copy link
Member

Choose a reason for hiding this comment

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

we detect rdma connection closed via 0 length rdma msg

Copy link
Author

Choose a reason for hiding this comment

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

what about the physical disconnection?

Copy link
Member

Choose a reason for hiding this comment

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

it will handle by async connection timeout

Copy link

Choose a reason for hiding this comment

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

connnection may not be built successfully after making tcp_fd closed in cleanup().

Copy link
Author

Choose a reason for hiding this comment

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

@yuyuyu101
hi~
Commenting cleanup() will avoid CLOSE_WAIT of server, after comment cleanup, we add a way to disconnect the connection in handle_connection() to avoid socket leakage, as follows:
if (1 == connected) {
ldout(cct, 1) << func << " warnning: logic failed: read len: " << r << dendl;
fault();
return;
}
Thanks

@yuyuyu101
Copy link
Member

yuyuyu101 commented Jul 13, 2017 via email

@yuyuyu101
Copy link
Member

looks ok, need test

@shangfufei
Copy link
Author

shangfufei commented Aug 4, 2017

I am confused that how can I add labels to the pull request. Do I have the permission ? Please help @tchaikov

@yuyuyu101 yuyuyu101 merged commit 946c59b into ceph:master Aug 10, 2017
@yuyuyu101
Copy link
Member

tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants