Re: [PATCH v2] net/core: Increase default optmem_max limit

2018-01-16 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface
and its underlying AF_ALG socket, the current default value
for `net.core.optmem_max` can be exhausted pretty quick when
using asynchronous IO; on 32 bit systems it is not even enough
for sending about 10 IOVECs at once to the socket interface.

To provide consumers of this new user space interface a well
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of
the previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---
 net/core/sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index c0b5b2f17412..de00c571c933 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX;
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly = sizeof(unsigned 
long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;



Re: [PATCH v2] net/core: Increase default optmem_max limit

2018-01-16 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface
and its underlying AF_ALG socket, the current default value
for `net.core.optmem_max` can be exhausted pretty quick when
using asynchronous IO; on 32 bit systems it is not even enough
for sending about 10 IOVECs at once to the socket interface.

To provide consumers of this new user space interface a well
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of
the previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---
 net/core/sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index c0b5b2f17412..de00c571c933 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly = SK_WMEM_MAX;
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly = sizeof(unsigned 
long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;



[PATCH v2] net/core: Increase default optmem_max limit

2018-01-16 Thread Björn 'besser82' Esser



[PATCH v2] net/core: Increase default optmem_max limit

2018-01-16 Thread Björn 'besser82' Esser



Re: [PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly = sizeof(unsigned 
long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;



Re: [PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly = sizeof(unsigned 
long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;



[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or
ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly
= sizeof(unsigned long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;


signature.asc
Description: This is a digitally signed message part


[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal space eaten by iovec or
ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int sysctl_optmem_max __read_mostly
= sizeof(unsigned long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data __read_mostly = 1;


signature.asc
Description: This is a digitally signed message part


[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-
4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal
space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int
sysctl_optmem_max __read_mostly = sizeof(unsigned long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data
__read_mostly = 1;



[PATCH 4.15-rc8] net/core: Increase default optmem_max limit

2018-01-15 Thread Björn 'besser82' Esser
With the new Linux Kernel Crypto API User Space Interface and
its underlying socket interface, the current default value for
`net.core.optmem_max` can be exhausted pretty quick.
On 32 bit systems it is not even enough for sending 16 IOVECs
at once to the socket interface.

To provide consumers of this new user space interface a
sufficient and reasonable maximum ancillary buffer size per
socket by default, the limit is increased to four times of the
previous setting:

  * 32 bit systems:  from 10240 bytes to 40960 bytes
  * 64 bit systems:  from 20480 bytes to 81920 bytes

This allows for sending 32/64 (32/64 bit) parallel IOVECs at
once to the socket interface, which should be enough for use
in real world applications.

Signed-off-by: Björn Esser 
---

Index: linux-4.15/net/core/sock.c
===
--- linux-4.15.orig/net/core/sock.c
+++ linux-
4.15/net/core/sock.c
@@ -316,7 +316,7 @@ __u32 sysctl_wmem_default __read_mostly
 __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX;
 
 /* Maximal
space eaten by iovec or ancillary data plus some space */
-int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512);
+int
sysctl_optmem_max __read_mostly = sizeof(unsigned long)*4*(2*UIO_MAXIOV+512);
 EXPORT_SYMBOL(sysctl_optmem_max);
 
 int sysctl_tstamp_allow_data
__read_mostly = 1;