Re: [PATCH] mm: slab: comment __GFP_ZERO case for kmem_cache_alloc

From: David Rientjes
Date: Sun Oct 09 2022 - 23:48:17 EST


On Fri, 7 Oct 2022, Alexander Aring wrote:

> diff --git a/mm/slab.c b/mm/slab.c
> index 10e96137b44f..7a84c2aae85a 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -3482,7 +3482,8 @@ void *__kmem_cache_alloc_lru(struct kmem_cache *cachep, struct list_lru *lru,
> * @flags: See kmalloc().
> *
> * Allocate an object from this cache. The flags are only relevant
> - * if the cache has no available objects.
> + * if the cache has no available objects. Except flag __GFP_ZERO which
> + * will zero the returned object.

Minor nit: it's probably better to do "... has no available objects,
except flag ..." and not seperate sentences. After that is done, feel
free to add

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>