All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()
@ 2022-12-19 12:36 Lorenzo Stoakes
  2022-12-19 13:45 ` Uladzislau Rezki
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Stoakes @ 2022-12-19 12:36 UTC (permalink / raw)
  To: linux-mm, Andrew Morton, Uladzislau Rezki, Christoph Hellwig,
	linux-kernel
  Cc: Matthew Wilcox, Nicholas Piggin, Baoquan He, Lorenzo Stoakes

This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc()
invocations no-ops. Remove this and instead rely on this flag being set
only for the vm_area_alloc_pages() function, ensuring it is cleared for
each of the warn_alloc() calls.

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
---
 mm/vmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ca71de7c9d77..10fe83c24436 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	int ret;

 	array_size = (unsigned long)nr_small_pages * sizeof(struct page *);
-	gfp_mask |= __GFP_NOWARN;
+
 	if (!(gfp_mask & (GFP_DMA | GFP_DMA32)))
 		gfp_mask |= __GFP_HIGHMEM;

--
2.39.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node()
  2022-12-19 12:36 [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node() Lorenzo Stoakes
@ 2022-12-19 13:45 ` Uladzislau Rezki
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzislau Rezki @ 2022-12-19 13:45 UTC (permalink / raw)
  To: Lorenzo Stoakes
  Cc: linux-mm, Andrew Morton, Uladzislau Rezki, Christoph Hellwig,
	linux-kernel, Matthew Wilcox, Nicholas Piggin, Baoquan He

On Mon, Dec 19, 2022 at 12:36:59PM +0000, Lorenzo Stoakes wrote:
> This function sets __GFP_NOWARN in the gfp_mask rendering the warn_alloc()
> invocations no-ops. Remove this and instead rely on this flag being set
> only for the vm_area_alloc_pages() function, ensuring it is cleared for
> each of the warn_alloc() calls.
> 
> Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
> ---
>  mm/vmalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index ca71de7c9d77..10fe83c24436 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -3031,7 +3031,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
>  	int ret;
> 
>  	array_size = (unsigned long)nr_small_pages * sizeof(struct page *);
> -	gfp_mask |= __GFP_NOWARN;
> +
>  	if (!(gfp_mask & (GFP_DMA | GFP_DMA32)))
>  		gfp_mask |= __GFP_HIGHMEM;
> 
> --
> 2.39.0
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>

--
Uladzislau Rezki

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-19 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 12:36 [PATCH v2] mm: vmalloc: correct use of __GFP_NOWARN mask in __vmalloc_area_node() Lorenzo Stoakes
2022-12-19 13:45 ` Uladzislau Rezki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.