diff mbox series

[14/16] mm/page_alloc: use costly_order in WARN_ON_ONCE_GFP()

Message ID 20220909092451.24883-15-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series A few cleanup patches for mm | expand

Commit Message

Miaohe Lin Sept. 9, 2022, 9:24 a.m. UTC
There's no need to check whether order > PAGE_ALLOC_COSTLY_ORDER again.
Minor readability improvement.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Hildenbrand Sept. 9, 2022, 11:37 a.m. UTC | #1
On 09.09.22 11:24, Miaohe Lin wrote:
> There's no need to check whether order > PAGE_ALLOC_COSTLY_ORDER again.
> Minor readability improvement.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   mm/page_alloc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 63ad25e86010..262e8972e019 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5272,7 +5272,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
>   		 * so that we can identify them and convert them to something
>   		 * else.
>   		 */
> -		WARN_ON_ONCE_GFP(order > PAGE_ALLOC_COSTLY_ORDER, gfp_mask);
> +		WARN_ON_ONCE_GFP(costly_order, gfp_mask);
>   
>   		/*
>   		 * Help non-failing allocations by giving them access to memory

Reviewed-by: David Hildenbrand <david@redhat.com>
Anshuman Khandual Sept. 13, 2022, 9:08 a.m. UTC | #2
On 9/9/22 14:54, Miaohe Lin wrote:
> There's no need to check whether order > PAGE_ALLOC_COSTLY_ORDER again.
> Minor readability improvement.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 63ad25e86010..262e8972e019 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5272,7 +5272,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
>  		 * so that we can identify them and convert them to something
>  		 * else.
>  		 */
> -		WARN_ON_ONCE_GFP(order > PAGE_ALLOC_COSTLY_ORDER, gfp_mask);
> +		WARN_ON_ONCE_GFP(costly_order, gfp_mask);
>  
>  		/*
>  		 * Help non-failing allocations by giving them access to memory
Oscar Salvador Sept. 15, 2022, 7:45 a.m. UTC | #3
On Fri, Sep 09, 2022 at 05:24:49PM +0800, Miaohe Lin wrote:
> There's no need to check whether order > PAGE_ALLOC_COSTLY_ORDER again.
> Minor readability improvement.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Reviewed-by: Oscar Salvador <osalvador@suse.de>

> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 63ad25e86010..262e8972e019 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5272,7 +5272,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
>  		 * so that we can identify them and convert them to something
>  		 * else.
>  		 */
> -		WARN_ON_ONCE_GFP(order > PAGE_ALLOC_COSTLY_ORDER, gfp_mask);
> +		WARN_ON_ONCE_GFP(costly_order, gfp_mask);
>  
>  		/*
>  		 * Help non-failing allocations by giving them access to memory
> -- 
> 2.23.0
>
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 63ad25e86010..262e8972e019 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5272,7 +5272,7 @@  __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 		 * so that we can identify them and convert them to something
 		 * else.
 		 */
-		WARN_ON_ONCE_GFP(order > PAGE_ALLOC_COSTLY_ORDER, gfp_mask);
+		WARN_ON_ONCE_GFP(costly_order, gfp_mask);
 
 		/*
 		 * Help non-failing allocations by giving them access to memory