public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
@ 2011-06-20  8:08 Max Matveev
  2011-07-04 14:54 ` Neil Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Max Matveev @ 2011-06-20  8:08 UTC (permalink / raw)
  To: linux-sctp; +Cc: netdev

sctp does not use second and third ("default" and "max") values
of sctp_(r|w)mem tunables. The format is the same and tcp_(r|w)mem
but the meaning is different so make the documentation explicit to
avoid confusion.

Signed-off-by: Max Matveev <makc@redhat.com>
---
 Documentation/networking/ip-sysctl.txt |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index d3d653a..f37d374 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -1465,10 +1465,17 @@ sctp_mem - vector of 3 INTEGERs: min, pressure, max
 	Default is calculated at boot time from amount of available memory.
 
 sctp_rmem - vector of 3 INTEGERs: min, default, max
-	See tcp_rmem for a description.
+	Only the first value ("min") is used, "default" and "max" are
+	ignored and may be removed in the future versions.
+
+	min: Minimal size of receive buffer used by SCTP socket.
+	It is guaranteed to each STCP socket (but not association) even 
+	under moderate memory pressure.
+
+	Default: 1 page
 
 sctp_wmem  - vector of 3 INTEGERs: min, default, max
-	See tcp_wmem for a description.
+	Currently this tunable has no effect.
 
 addr_scope_policy - INTEGER
 	Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00
-- 
1.7.3.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-06-20  8:08 [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables Max Matveev
@ 2011-07-04 14:54 ` Neil Horman
  2011-07-05  2:00   ` Max Matveev
  2011-07-04 16:11 ` Ben Hutchings
  2011-07-05  1:34 ` Shan Wei
  2 siblings, 1 reply; 7+ messages in thread
From: Neil Horman @ 2011-07-04 14:54 UTC (permalink / raw)
  To: Max Matveev; +Cc: linux-sctp, netdev

On Mon, Jun 20, 2011 at 06:08:10PM +1000, Max Matveev wrote:
> sctp does not use second and third ("default" and "max") values
> of sctp_(r|w)mem tunables. The format is the same and tcp_(r|w)mem
> but the meaning is different so make the documentation explicit to
> avoid confusion.
> 
> Signed-off-by: Max Matveev <makc@redhat.com>
> ---
>  Documentation/networking/ip-sysctl.txt |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> index d3d653a..f37d374 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1465,10 +1465,17 @@ sctp_mem - vector of 3 INTEGERs: min, pressure, max
>  	Default is calculated at boot time from amount of available memory.
>  
>  sctp_rmem - vector of 3 INTEGERs: min, default, max
> -	See tcp_rmem for a description.
> +	Only the first value ("min") is used, "default" and "max" are
> +	ignored and may be removed in the future versions.
> +
Its accurate to say that only the first value is usd currently, but because of
the way this sysctl is contructed (its used by the sysctl_rmem pointer in the
sctp_prot struct, which expects an array of three integers in the commong
__sk_mem_schedule function), we wont' be removing the other two values.  Drop
that bit and its an ack from me.
Neil

> +	min: Minimal size of receive buffer used by SCTP socket.
> +	It is guaranteed to each STCP socket (but not association) even 
> +	under moderate memory pressure.
> +
> +	Default: 1 page
>  
>  sctp_wmem  - vector of 3 INTEGERs: min, default, max
> -	See tcp_wmem for a description.
> +	Currently this tunable has no effect.
>  
>  addr_scope_policy - INTEGER
>  	Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00
> -- 
> 1.7.3.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-06-20  8:08 [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables Max Matveev
  2011-07-04 14:54 ` Neil Horman
@ 2011-07-04 16:11 ` Ben Hutchings
  2011-07-05  1:34 ` Shan Wei
  2 siblings, 0 replies; 7+ messages in thread
From: Ben Hutchings @ 2011-07-04 16:11 UTC (permalink / raw)
  To: Max Matveev; +Cc: linux-sctp, netdev

On Mon, 2011-06-20 at 18:08 +1000, Max Matveev wrote:
> sctp does not use second and third ("default" and "max") values
> of sctp_(r|w)mem tunables. The format is the same and tcp_(r|w)mem
> but the meaning is different so make the documentation explicit to
> avoid confusion.
> 
> Signed-off-by: Max Matveev <makc@redhat.com>
> ---
>  Documentation/networking/ip-sysctl.txt |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
> index d3d653a..f37d374 100644
> --- a/Documentation/networking/ip-sysctl.txt
> +++ b/Documentation/networking/ip-sysctl.txt
> @@ -1465,10 +1465,17 @@ sctp_mem - vector of 3 INTEGERs: min, pressure, max
>  	Default is calculated at boot time from amount of available memory.
>  
>  sctp_rmem - vector of 3 INTEGERs: min, default, max
> -	See tcp_rmem for a description.
> +	Only the first value ("min") is used, "default" and "max" are
> +	ignored and may be removed in the future versions.
> +
> +	min: Minimal size of receive buffer used by SCTP socket.
> +	It is guaranteed to each STCP socket (but not association) even 

Typo: 'STCP' should be 'SCTP'.

Ben.

> +	under moderate memory pressure.
> +
> +	Default: 1 page
>  
>  sctp_wmem  - vector of 3 INTEGERs: min, default, max
> -	See tcp_wmem for a description.
> +	Currently this tunable has no effect.
>  
>  addr_scope_policy - INTEGER
>  	Control IPv4 address scoping - draft-stewart-tsvwg-sctp-ipv4-00

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-06-20  8:08 [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables Max Matveev
  2011-07-04 14:54 ` Neil Horman
  2011-07-04 16:11 ` Ben Hutchings
@ 2011-07-05  1:34 ` Shan Wei
  2011-07-05  1:58   ` Max Matveev
  2 siblings, 1 reply; 7+ messages in thread
From: Shan Wei @ 2011-07-05  1:34 UTC (permalink / raw)
  To: Max Matveev; +Cc: linux-sctp, netdev

Max Matveev wrote, at 06/20/2011 04:08 PM:
> sctp does not use second and third ("default" and "max") values
> of sctp_(r|w)mem tunables. 

Avoid confusion, but you introduced new confusion.
Hope that you also can correct your changelog in next version. 


-- 
Best Regards
-----
Shan Wei

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-07-05  1:34 ` Shan Wei
@ 2011-07-05  1:58   ` Max Matveev
  0 siblings, 0 replies; 7+ messages in thread
From: Max Matveev @ 2011-07-05  1:58 UTC (permalink / raw)
  To: Shan Wei; +Cc: linux-sctp, netdev

On Tue, 05 Jul 2011 09:34:22 +0800, Shan Wei wrote:

 shanwei> Max Matveev wrote, at 06/20/2011 04:08 PM:
 >> sctp does not use second and third ("default" and "max") values
 >> of sctp_(r|w)mem tunables. 

 shanwei> Avoid confusion, but you introduced new confusion.
 shanwei> Hope that you also can correct your changelog in next version. 
Done - just send v2 of the patch.

max

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-07-04 14:54 ` Neil Horman
@ 2011-07-05  2:00   ` Max Matveev
  2011-07-05 11:34     ` Neil Horman
  0 siblings, 1 reply; 7+ messages in thread
From: Max Matveev @ 2011-07-05  2:00 UTC (permalink / raw)
  To: Neil Horman; +Cc: linux-sctp, netdev

On Mon, 4 Jul 2011 10:54:54 -0400, Neil Horman wrote:

 nhorman> On Mon, Jun 20, 2011 at 06:08:10PM +1000, Max Matveev wrote:

 >> sctp_rmem - vector of 3 INTEGERs: min, default, max
 >> -	See tcp_rmem for a description.
 >> +	Only the first value ("min") is used, "default" and "max" are
 >> +	ignored and may be removed in the future versions.
 >> +

 nhorman> Its accurate to say that only the first value is usd
 nhorman> currently, but because of the way this sysctl is contructed
 nhorman> (its used by the sysctl_rmem pointer in the sctp_prot
 nhorman> struct, which expects an array of three integers in the
 nhorman> commong __sk_mem_schedule function), we wont' be removing
 nhorman> the other two values.

Technically it can be just a single integer - UDP does use it 
that way but I'm not going to argue, v2 of the patch removed
that bit.

max

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables
  2011-07-05  2:00   ` Max Matveev
@ 2011-07-05 11:34     ` Neil Horman
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2011-07-05 11:34 UTC (permalink / raw)
  To: Max Matveev; +Cc: linux-sctp, netdev

On Tue, Jul 05, 2011 at 12:00:19PM +1000, Max Matveev wrote:
> On Mon, 4 Jul 2011 10:54:54 -0400, Neil Horman wrote:
> 
>  nhorman> On Mon, Jun 20, 2011 at 06:08:10PM +1000, Max Matveev wrote:
> 
>  >> sctp_rmem - vector of 3 INTEGERs: min, default, max
>  >> -	See tcp_rmem for a description.
>  >> +	Only the first value ("min") is used, "default" and "max" are
>  >> +	ignored and may be removed in the future versions.
>  >> +
> 
>  nhorman> Its accurate to say that only the first value is usd
>  nhorman> currently, but because of the way this sysctl is contructed
>  nhorman> (its used by the sysctl_rmem pointer in the sctp_prot
>  nhorman> struct, which expects an array of three integers in the
>  nhorman> commong __sk_mem_schedule function), we wont' be removing
>  nhorman> the other two values.
> 
> Technically it can be just a single integer - UDP does use it 
> that way but I'm not going to argue, v2 of the patch removed
> that bit.
> 
Yeah, but the only reason udp gets away with it is because the common code in
__sk_mem_schedule only happens to touch the first element in the array.  I
suppose we could just drop the array semantics in the common code and save the
sizeof(int) bytes per protocol, but then individual protocols may (or may not)
access other elements of the array.  Hmm, odd situation.  I'd just as soon leave
the sctp elements in place, they probably have use for ongoing work to fix up
sctp's buffer accounting.

Anywho, thanks!
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> max
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-05 11:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-20  8:08 [PATCH 1/2] Update description of net.sctp.sctp_rmem and net.sctp.sctp_wmem tunables Max Matveev
2011-07-04 14:54 ` Neil Horman
2011-07-05  2:00   ` Max Matveev
2011-07-05 11:34     ` Neil Horman
2011-07-04 16:11 ` Ben Hutchings
2011-07-05  1:34 ` Shan Wei
2011-07-05  1:58   ` Max Matveev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox