Sean Hefty [Mon, 4 Jun 2012 21:51:41 +0000 (14:51 -0700)]
rsocket: Spin before blocking on an rsocket
The latency cost of blocking is significant compared to round
trip ping-pong time. Spin briefly on rsockets before calling
into the kernel and blocking.
We calculate the time to delay blocking by timing the round
trip ping-pong time on a QP configured for loopback traffic. The
delay time is a multiple of this time to include wire transfer
time, plus minimal response time on the remote side.
As a completely unintentional side effect, this just happens to
improve application performance in benchmarks, like netpipe.
Sean Hefty [Mon, 4 Jun 2012 21:51:41 +0000 (14:51 -0700)]
rsocket: Spin before blocking on an rsocket
The latency cost of blocking is significant compared to round
trip ping-pong time. Spin briefly on rsockets before calling
into the kernel and blocking.
We calculate the time to delay blocking by timing the round
trip ping-pong time on a QP configured for loopback traffic. The
delay time is a multiple of this time to include wire transfer
time, plus minimal response time on the remote side.
Sean Hefty [Mon, 4 Jun 2012 20:14:42 +0000 (13:14 -0700)]
rsocket: Handle SHUT_RD/WR shutdown flags
Sridhar Samudrala <sri@us.ibm.com> reported an error (EOPNOTSUPP)
after calling select().
The issue is that rshutdown(SHUT_WR) was called before select().
As part of shutdown, rsockets switches the underlying fd from
nonblocking to blocking to ensure that previously sent data has
completed. shutdown(SHUT_WR) indicates that the socket should be
kept open for receiving data.
Delay handling the actual shutdown unless SHUT_RDWR is specified,
or the socket is closed.
Sean Hefty [Mon, 4 Jun 2012 20:14:42 +0000 (13:14 -0700)]
rsocket: Handle SHUT_RD/WR shutdown flags
Sridhar Samudrala <sri@us.ibm.com> reported an error (EOPNOTSUPP)
after calling select().
The issue is that rshutdown(SHUT_WR) was called before select().
As part of shutdown, rsockets switches the underlying fd from
nonblocking to blocking to ensure that previously sent data has
completed. shutdown(SHUT_WR) indicates that the socket should be
kept open for receiving data.
Delay handling the actual shutdown until both the read and write
streams have been disconnected.
Sean Hefty [Mon, 4 Jun 2012 20:14:42 +0000 (13:14 -0700)]
rsocket: Handle SHUT_RD/WR shutdown flags
Sridhar Samudrala <sri@us.ibm.com> reported an error (EOPNOTSUPP)
after calling select().
The issue is that rshutdown(SHUT_WR) was called before select().
As part of shutdown, rsockets switches the underlying fd from
nonblocking to blocking to ensure that previously sent data has
completed. shutdown(SHUT_WR) indicates that the socket should be
kept open for receiving data.
Delay handling the actual shutdown until both the read and write
streams have been disconnected.
Sean Hefty [Mon, 4 Jun 2012 19:30:15 +0000 (12:30 -0700)]
rsocket: Return success for IPV6_V6ONLY option
Jave Netpipe calls setsockopt for IPV6_V6ONLY. Return success
to work-around the lack of support. Problem was reported by
Chet Murthy <chet@watson.ibm.com>.
Note that real support for V6ONLY requires changes to the
kernel rdma_cm.
Sean Hefty [Mon, 4 Jun 2012 19:30:15 +0000 (12:30 -0700)]
rsocket: Return success for IPV6_V6ONLY option
Jave Netpipe calls setsockopt for IPV6_V6ONLY. Return success
to work-around the lack of support. The actual implementation
is deferred. Problem was reported by Chet Murthy
<chet@watson.ibm.com>