From 0d42177e9072a468ec32c33cd2963e73057149b1 Mon Sep 17 00:00:00 2001 From: Benjamin LaHaise Date: Mon, 20 Mar 2006 21:29:05 -0800 Subject: [PATCH] --- yaml --- r: 22220 b: refs/heads/master c: e9df7d7f584666533b1bdfcf5c60a43d64689198 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/unix/af_unix.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9c8348c2af1b..f13b01ecb7f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 231d06ae826664b83369166449144304859a62fa +refs/heads/master: e9df7d7f584666533b1bdfcf5c60a43d64689198 diff --git a/trunk/net/unix/af_unix.c b/trunk/net/unix/af_unix.c index c323cc6a28b0..2b00460f2886 100644 --- a/trunk/net/unix/af_unix.c +++ b/trunk/net/unix/af_unix.c @@ -1427,15 +1427,15 @@ static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, while(sent < len) { /* - * Optimisation for the fact that under 0.01% of X messages typically - * need breaking up. + * Optimisation for the fact that under 0.01% of X + * messages typically need breaking up. */ - size=len-sent; + size = len-sent; /* Keep two messages in the pipe so it schedules better */ - if (size > sk->sk_sndbuf / 2 - 64) - size = sk->sk_sndbuf / 2 - 64; + if (size > ((sk->sk_sndbuf >> 1) - 64)) + size = (sk->sk_sndbuf >> 1) - 64; if (size > SKB_MAX_ALLOC) size = SKB_MAX_ALLOC;