On Wed, 2007-12-12 at 13:10 -0500, Chuck Lever wrote:
quoted text > Hi Tom-
>
> On Dec 11, 2007, at 6:32 PM, Tom Tucker wrote:
> > In order to avoid blocking a service thread, the receive side checks
[...snip...]
quoted text > > +static int svc_tcp_has_wspace(struct svc_xprt *xprt)
> > +{
> > + struct svc_sock *svsk = container_of(xprt, struct svc_sock,
> > sk_xprt);
> > + struct svc_serv *serv = svsk->sk_server;
> > + int required;
> > + int wspace;
> > +
> > + /*
> > + * Set the SOCK_NOSPACE flag before checking the available
> > + * sock space.
> > + */
> > + set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags);
> > + required = atomic_read(&svsk->sk_reserved) + serv->sv_max_mesg;
> > + wspace = sk_stream_wspace(svsk->sk_sk);
> > +
> > + if (wspace < sk_stream_min_wspace(svsk->sk_sk))
> > + return 0;
> > + if (required * 2 > wspace)
> > + return 0;
>
> Since "required" is an int, this test can behave differently than the
> one it replaces.
>
> What's the test plan to ensure the new test works reasonably?
> (Actually that's a question for the Maintainers too).
>
Here's my matrix:
Connectathon iozone Kernel build
V2 udp,tcp
V3 tcp,rdma tcp,rdma tcp,rdma
V4 tcp,rdma tcp,rdma tcp,rdma
I also kill tests to test the signal race paths, and I run multiple
tests concurrently (e.g. a couple iozones plus a kernel build).
I guess none of these tests explicitly test the path in question
though.
quoted text > > +
> > + clear_bit(SOCK_NOSPACE, &svsk->sk_sock->flags);
> > + return 1;
> > +}
> > +
> > static struct svc_xprt_ops svc_tcp_ops = {
> > .xpo_recvfrom = svc_tcp_recvfrom,
> > .xpo_sendto = svc_tcp_sendto,
> > @@ -1373,6 +1402,7 @@ static struct svc_xprt_ops svc_tcp_ops = {
> > .xpo_detach = svc_sock_detach,
> > .xpo_free = svc_sock_free,
> > .xpo_prep_reply_hdr = svc_tcp_prep_reply_hdr,
> > + .xpo_has_wspace = svc_tcp_has_wspace,
> > };
> >
> > static struct svc_xprt_class svc_tcp_class = {
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
> -
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to
majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html