Skip to contentSkip to conversation

mm: don't use __GFP_HARDWALL when migrating remote pages

PATCH Superseded David Hildenbrand 4 participants 9 messages Dec 5, 2024 – Dec 9, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover mm: don't use __GFP_HARDWALL when migrating remote pages

Sending this via the RH SMTP first, because IT doesn't see any obvious problems why the mails shouldn't be reaching linux-mm, so let's see if the problems are gone now. If this doesn't work, I'll resend them using the known-working gmail SMTP. Sorry already for the noise ...

---

__GFP_HARDWALL means that we will be respecting the cpuset of the caller when allocating a page. However, when we are migrating remote allocations (pages allocated from other context), the cpuset of the current context is irrelevant.

For memory offlining + alloc_contig_*(), this is rather obvious. There might be other such page migration users, let's start with the obvious ones.

Cc Andrew Morton <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Zi Yan <[email protected]>

David Hildenbrand (2):
mm/page_alloc: don't use __GFP_HARDWALL when migrating pages via

    alloc_contig*()

mm/memory_hotplug: don't use __GFP_HARDWALL when migrating pages via
memory offlining

 mm/memory_hotplug.c | 2 +-
 mm/page_alloc.c     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.1
#1 lore raw

PATCH 1/2 mm/page_alloc: don't use __GFP_HARDWALL when migrating pages via alloc_contig*()

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.

---
 mm/page_alloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
mm/page_alloc.c +3 -3
index 48a291c485df..acadfcf654fd 100644
@@ -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;
 }
 
Signature · 1 line
2.47.1
maintainer Reviewed-by on v1 1/2
#2 lore raw

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

Quoted 11 lines · David Hildenbrand

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.

Signature · 2 lines
Oscar Salvador
SUSE Labs
#3 lore raw

PATCH 2/2 mm/memory_hotplug: don't use __GFP_HARDWALL when migrating pages via memory offlining

In reply to David Hildenbrand

We'll migrate pages allocated by other context; respecting the cpuset of the memory offlining context when allocating a migration target does not make sense.

Drop the __GFP_HARDWALL by using GFP_KERNEL.

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

---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory_hotplug.c +1 -1
index 5f497ccf473d..3b6f93962481 100644
@@ -1838,7 +1838,7 @@ static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
 		nodemask_t nmask = node_states[N_MEMORY];
 		struct migration_target_control mtc = {
 			.nmask = &nmask,
-			.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
+			.gfp_mask = GFP_KERNEL | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
 			.reason = MR_MEMORY_HOTPLUG,
 		};
 		int ret;
Signature · 1 line
2.47.1
maintainer Acked-by on v1 2/2
#4 lore raw

Re: [PATCH v1 2/2] mm/memory_hotplug: don't use __GFP_HARDWALL when migrating pages via memory offlining

Quoted 11 lines · David Hildenbrand

We'll migrate pages allocated by other context; respecting the cpuset of the memory offlining context when allocating a migration target does not make sense.

Drop the __GFP_HARDWALL by using GFP_KERNEL.

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

Signature · 2 lines
Oscar Salvador
SUSE Labs
#5 lore raw

linux-mm mailing list problems

In reply to David Hildenbrand
Quoted 4 lines · David Hildenbrand

Sending this via the RH SMTP first, because IT doesn't see any obvious problems why the mails shouldn't be reaching linux-mm, so let's see if the problems are gone now. If this doesn't work, I'll resend them using the known-working gmail SMTP. Sorry already for the noise ...

I talked to RH IT, and it looks like the mails get delivered to [email protected] just fine, and linux-mm decides to silently drop them.

Does anybody know who maintains [email protected]? I wrote a mail to [email protected], but I am pretty sure that is the wrong address.

Signature · 3 lines
Cheers,

David / dhildenb
#6 lore raw

Re: linux-mm mailing list problems

Quoted 11 lines · David Hildenbrand
Quoted 4 lines · David Hildenbrand

Sending this via the RH SMTP first, because IT doesn't see any obvious problems why the mails shouldn't be reaching linux-mm, so let's see if the problems are gone now. If this doesn't work, I'll resend them using the known-working gmail SMTP. Sorry already for the noise ...

I talked to RH IT, and it looks like the mails get delivered to [email protected] just fine, and linux-mm decides to silently drop them.

Does anybody know who maintains [email protected]? I wrote a mail to [email protected], but I am pretty sure that is the wrong address.

AFAIK it's Benjamin, CC'd

#7 lore raw

Re: linux-mm mailing list problems

Quoted 9 lines · Vlastimil Babka
Quoted 8 lines · David Hildenbrand
Quoted 4 lines · David Hildenbrand

Sending this via the RH SMTP first, because IT doesn't see any obvious problems why the mails shouldn't be reaching linux-mm, so let's see if the problems are gone now. If this doesn't work, I'll resend them using the known-working gmail SMTP. Sorry already for the noise ...

I talked to RH IT, and it looks like the mails get delivered to [email protected] just fine, and linux-mm decides to silently drop them.

Messages were being dumped into a spam folder as the upstream spam filtering service used for kvack.org was incorrectly tagging them as spam. The folder where these messages were being quarantined in was not the one being checked for the last few months due to the spam tagging changing back on September 8th.

Quoted 1 line
Quoted 1 line

Does anybody know who maintains [email protected]?

Use [email protected], which has been in place since the mailing list was first created. That is the sender of every mailing list message.

Unfortunately, the issue was not flagged to me until today. The mailing list footers that used to let people know about the mailing list contact info previously had to be removed due to the implementation of DKIM enforcement. Even sending emails to majordomo@ per the List-Subscribe:
and List-Unsubscribe: headers would have gotten my attention.

Quoted 2 lines
Quoted 2 lines

I wrote a mail to
[email protected], but I am pretty sure that is the wrong address.

[email protected] is a spam trap. Do not send emails there unless you want to be marked as a spam sender.

Quoted 1 line

AFAIK it's Benjamin, CC'd

It should now be fixed as I have tweaked the spam filtering rules. The messages misfiled as spam since September 8th have now been delivered. I'm shocked that nobody bothered reporting this until now. Please do not report mailing list issues to the mailing list. I simply do not have the time / energy to scan the thousands of messages that fly by every week. Cheers,

-ben

Signature · 1 line
"Thought is the essence of where you are now."
#8 lore raw

Re: linux-mm mailing list problems

Quoted 8 lines · Benjamin LaHaise
Quoted 7 lines · Vlastimil Babka
Quoted 6 lines · David Hildenbrand
Quoted 4 lines · David Hildenbrand

Sending this via the RH SMTP first, because IT doesn't see any obvious problems why the mails shouldn't be reaching linux-mm, so let's see if the problems are gone now. If this doesn't work, I'll resend them using the known-working gmail SMTP. Sorry already for the noise ...

Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

I talked to RH IT, and it looks like the mails get delivered to [email protected] just fine, and linux-mm decides to silently drop them.

Messages were being dumped into a spam folder as the upstream spam filtering service used for kvack.org was incorrectly tagging them as spam. The folder where these messages were being quarantined in was not the one being checked for the last few months due to the spam tagging changing back on September 8th.

Ah that explains it,

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

Does anybody know who maintains [email protected]?

Use [email protected], which has been in place since the mailing list was first created. That is the sender of every mailing list message.

Ah!

Quoted 6 lines

Unfortunately, the issue was not flagged to me until today. The mailing list footers that used to let people know about the mailing list contact info previously had to be removed due to the implementation of DKIM enforcement. Even sending emails to majordomo@ per the List-Subscribe:
and List-Unsubscribe: headers would have gotten my attention.

Yeah, I tried hard finding a contact, and apparently ...

Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

I wrote a mail to
[email protected], but I am pretty sure that is the wrong address.

[email protected] is a spam trap. Do not send emails there unless you want to be marked as a spam sender.

... all I found was a trap :)

(guess I'm now a swam sender ;) )

Quoted 4 lines
Quoted 2 lines

AFAIK it's Benjamin, CC'd

It should now be fixed as I have tweaked the spam filtering rules.

Thanks!

Quoted 3 lines

The
messages misfiled as spam since September 8th have now been delivered. I'm shocked that nobody bothered reporting this until now.

Hm, I sent quite a bunch of patches after September 8th, and I think they mostly got delivered. For me, it started ~1 week ago.

Quoted 3 lines

Please do not
report mailing list issues to the mailing list. I simply do not have the time / energy to scan the thousands of messages that fly by every week.

Now that I know how to contact you, that will obviously be my first choice.

Thanks!

Signature · 3 lines
Cheers,

David / dhildenb