diff mbox series

[RESEND,v1,1/2] mm/page_alloc: don't use __GFP_HARDWALL when migrating pages via alloc_contig*()

Message ID 20241205090508.2095225-2-david@redhat.com (mailing list archive)
State New
Headers show
Series mm: don't use __GFP_HARDWALL when migrating remote pages | expand

Commit Message

David Hildenbrand Dec. 5, 2024, 9:05 a.m. UTC
We'll migrate pages allocated by other contexts; respecting the cpuset of
the alloc_contig*() caller when allocating a migration target does not
make sense.

Drop the __GFP_HARDWALL.

Note that in an ideal world, migration code could figure out the cpuset
of the original context and take that into consideration.

Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 mm/page_alloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Vlastimil Babka Dec. 9, 2024, 5:45 p.m. UTC | #1
On 12/5/24 10:05, David Hildenbrand wrote:
> We'll migrate pages allocated by other contexts; respecting the cpuset of
> the alloc_contig*() caller when allocating a migration target does not
> make sense.
> 
> Drop the __GFP_HARDWALL.
> 
> Note that in an ideal world, migration code could figure out the cpuset
> of the original context and take that into consideration.
> 
> Suggested-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  mm/page_alloc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 48a291c485df..acadfcf654fd 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -6410,11 +6410,11 @@ static int __alloc_contig_verify_gfp_mask(gfp_t gfp_mask, gfp_t *gfp_cc_mask)
>  	 * page range. Migratable pages are movable, __GFP_MOVABLE is implied
>  	 * for them.
>  	 *
> -	 * Traditionally we always had __GFP_HARDWALL|__GFP_RETRY_MAYFAIL set,
> -	 * keep doing that to not degrade callers.
> +	 * Traditionally we always had __GFP_RETRY_MAYFAIL set, keep doing that
> +	 * to not degrade callers.
>  	 */
>  	*gfp_cc_mask = (gfp_mask & (reclaim_mask | cc_action_mask)) |
> -			__GFP_HARDWALL | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL;
> +			__GFP_MOVABLE | __GFP_RETRY_MAYFAIL;
>  	return 0;
>  }
>
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 48a291c485df..acadfcf654fd 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6410,11 +6410,11 @@  static int __alloc_contig_verify_gfp_mask(gfp_t gfp_mask, gfp_t *gfp_cc_mask)
 	 * page range. Migratable pages are movable, __GFP_MOVABLE is implied
 	 * for them.
 	 *
-	 * Traditionally we always had __GFP_HARDWALL|__GFP_RETRY_MAYFAIL set,
-	 * keep doing that to not degrade callers.
+	 * Traditionally we always had __GFP_RETRY_MAYFAIL set, keep doing that
+	 * to not degrade callers.
 	 */
 	*gfp_cc_mask = (gfp_mask & (reclaim_mask | cc_action_mask)) |
-			__GFP_HARDWALL | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL;
+			__GFP_MOVABLE | __GFP_RETRY_MAYFAIL;
 	return 0;
 }