Re: [PATCH] NFS: fix usage of mempools.

2017-04-10 Thread NeilBrown
On Mon, Apr 10 2017, Anna Schumaker wrote: > Hi Neil, > > On 04/09/2017 10:22 PM, NeilBrown wrote: >> >> +/* It is OK to do some reclaim, not no safe to wait >> + * for anything to be returned to the pool. >> + * mempool_alloc() cannot handle that particular co

Re: [PATCH] NFS: fix usage of mempools.

2017-04-10 Thread Anna Schumaker
Hi Neil, On 04/09/2017 10:22 PM, NeilBrown wrote: > > When passed GFP flags that allow sleeping (such as > GFP_NOIO), mempool_alloc() will never return NULL, it will > wait until memory is available. > > This means that we don't need to handle failure, but that we > do need to ensure one thread

[PATCH] NFS: fix usage of mempools.

2017-04-09 Thread NeilBrown
When passed GFP flags that allow sleeping (such as GFP_NOIO), mempool_alloc() will never return NULL, it will wait until memory is available. This means that we don't need to handle failure, but that we do need to ensure one thread doesn't call mempool_alloc() twice on the one pool without queuin