[Devel] [PATCH vz7 v2 2/2] nfsd: use kvzalloc() to allocate memory for drc_hashtbl

Andrey Ryabinin aryabinin at virtuozzo.com
Fri May 11 12:25:26 MSK 2018



On 05/10/2018 08:09 PM, Oleg Babin wrote:
> The original code uses vzalloc() directly as a fallback path if
> the allocation with kcalloc() failed. But in this case a warning
> about memory allocation failure will be generated even in case
> when the fallback path succeeds. Also kcalloc() can involve retries
> and OOM killer which is undesireable.
> 
> kvzalloc() handles all these aspects properly.
> 
> https://jira.sw.ru/browse/PSBM-84234
> 
> Signed-off-by: Oleg Babin <obabin at virtuozzo.com>

Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>



More information about the Devel mailing list