Re: [PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-22 Thread Herbert Xu
On Wed, Apr 22, 2015 at 09:41:45AM +0200, Thomas Graf wrote: > When rhashtable_insert_rehash() fails with ENOMEM, this indicates that > we can't allocate the necessary memory in the current context but the > limits as set by the user would still allow to grow. > > Thus attempt an async resize in t

[PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-22 Thread Thomas Graf
When rhashtable_insert_rehash() fails with ENOMEM, this indicates that we can't allocate the necessary memory in the current context but the limits as set by the user would still allow to grow. Thus attempt an async resize in the background where we can allocate using GFP_KERNEL which is more like

Re: [PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-22 Thread Thomas Graf
On 04/21/15 at 10:10pm, David Miller wrote: > From: Herbert Xu > Date: Wed, 22 Apr 2015 08:36:34 +0800 > > > On Tue, Apr 21, 2015 at 02:55:34PM +0200, Thomas Graf wrote: > >> When rhashtable_insert_rehash() fails with ENOMEM, this indicates that > >> we can't allocate the necessary memory in the

Re: [PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-21 Thread David Miller
From: Herbert Xu Date: Wed, 22 Apr 2015 08:36:34 +0800 > On Tue, Apr 21, 2015 at 02:55:34PM +0200, Thomas Graf wrote: >> When rhashtable_insert_rehash() fails with ENOMEM, this indicates that >> we can't allocate the necessary memory in the current context but the >> limits as set by the user wou

Re: [PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-21 Thread Herbert Xu
On Tue, Apr 21, 2015 at 02:55:34PM +0200, Thomas Graf wrote: > When rhashtable_insert_rehash() fails with ENOMEM, this indicates that > we can't allocate the necessary memory in the current context but the > limits as set by the user would still allow to grow. > > Thus attempt an async resize in t

[PATCH net 1/2] rhashtable: Schedule async resize when sync realloc fails

2015-04-21 Thread Thomas Graf
When rhashtable_insert_rehash() fails with ENOMEM, this indicates that we can't allocate the necessary memory in the current context but the limits as set by the user would still allow to grow. Thus attempt an async resize in the background where we can allocate using GFP_KERNEL which is more like