[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e41a3230807081707rcdb7ed6o91ff6e7d00aaa70b@mail.gmail.com>
Date: Tue, 8 Jul 2008 17:07:45 -0700
From: "John Heffner" <johnwheffner@...il.com>
To: "Jim Rees" <rees@...ch.edu>
Cc: netdev@...r.kernel.org, aglo@...i.umich.edu, shemminger@...tta.com,
bfields@...ldses.org
Subject: Re: setsockopt()
On Tue, Jul 8, 2008 at 4:51 PM, Jim Rees <rees@...ch.edu> wrote:
> John Heffner wrote:
>
> I actually like your idea for a "soft"
> SO_SNDBUF -- ask the kernel for at least that much, but let it
> autotune higher if needed. This is almost trivial to implement --
> it's the same as SO_SNDBUF but don't set the sock sndbuf lock.
>
> Which brings me to another issue. The nfs server doesn't call
> sock_setsockopt(), it diddles sk_sndbuf and sk_rcvbuf directly, so as to get
> around the max socket buf limit. I don't like this. If this is a legit
> thing to do, there should be an api.
>
> I'm thinking we need a sock_set_min_bufsize(), where the values passed in
> are minimums, subject to autotuning, and maybe are not limited by the max.
> It would, as you say, just set sk_sndbuf and sk_rcvbuf without setting the
> corresponding flags SOCK_SNDBUF_LOCK and SOCK_RCVBUF_LOCK.
>
> Would this do the trick, or is there a danger that autotuning would reduce
> the buffer sizes below the given minimum? If so, we might need
> sk_min_rcvbuf or something like that.
TCP buffer sizes will only be pulled back if the system runs into the
global tcp memory limits (sysctl_tcp_mem). I think this is correct
behavior regardless of the requested value.
-John
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists