Re: [PATCH 2/4] lib/rhashtable: guarantee initial hashtable allocation

2018-06-22 Thread Herbert Xu
On Thu, Jun 21, 2018 at 02:28:23PM -0700, Davidlohr Bueso wrote: > rhashtable_init() may fail due to -ENOMEM, thus making the > entire api unusable. This patch removes this scenario, > however unlikely. In order to guarantee memory allocation, > this patch always ends up doing

Re: [PATCH 2/4] lib/rhashtable: guarantee initial hashtable allocation

2018-06-22 Thread Herbert Xu
On Thu, Jun 21, 2018 at 02:28:23PM -0700, Davidlohr Bueso wrote: > rhashtable_init() may fail due to -ENOMEM, thus making the > entire api unusable. This patch removes this scenario, > however unlikely. In order to guarantee memory allocation, > this patch always ends up doing

[PATCH 2/4] lib/rhashtable: guarantee initial hashtable allocation

2018-06-21 Thread Davidlohr Bueso
rhashtable_init() may fail due to -ENOMEM, thus making the entire api unusable. This patch removes this scenario, however unlikely. In order to guarantee memory allocation, this patch always ends up doing GFP_KERNEL|__GFP_NOFAIL for both the tbl as well as alloc_bucket_spinlocks(). Upon the first

[PATCH 2/4] lib/rhashtable: guarantee initial hashtable allocation

2018-06-21 Thread Davidlohr Bueso
rhashtable_init() may fail due to -ENOMEM, thus making the entire api unusable. This patch removes this scenario, however unlikely. In order to guarantee memory allocation, this patch always ends up doing GFP_KERNEL|__GFP_NOFAIL for both the tbl as well as alloc_bucket_spinlocks(). Upon the first