Skip to contentSkip to conversation

sched/fair: remove the wrong check is_vm_hugetlb_page

PATCH In review Huang Shijie 1 participant 2 messages Jul 23 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/fair: remove the wrong check is_vm_hugetlb_page

In vma_migratable(), we do strictly check with hugetlb mapping:
hugepage_migration_supported()

When vma_migratable() returns true, it means the hugetlb mapping passes the hugepage_migration_supported(). So we should not skip this hugetlb mapping.

Remove the wrong is_vm_hugetlb_page() check in task_numa_work().

---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
index d78467ec6ee1..0582e0cfba36 100644
@@ -4167,7 +4167,7 @@ static void task_numa_work(struct callback_head *work)
 
 	for (; vma; vma = vma_next(&vmi)) {
 		if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
-			is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) {
+			(vma->vm_flags & VM_MIXEDMAP)) {
 			trace_sched_skip_vma_numa(mm, vma, NUMAB_SKIP_UNSUITABLE);
 			continue;
 		}
Signature · 1 line
2.53.0
#1 lore raw
Quoted 13 lines · Huang Shijie

+++ b/kernel/sched/fair.c

kernel/sched/fair.c +1 -1
@@ -4167,7 +4167,7 @@ static void task_numa_work(struct callback_head *work)
 
 	for (; vma; vma = vma_next(&vmi)) {
 		if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
-			is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) {
+			(vma->vm_flags & VM_MIXEDMAP)) {
 			trace_sched_skip_vma_numa(mm, vma, NUMAB_SKIP_UNSUITABLE);
 			continue;
 		}
Signature · 1 line
2.53.0

Please ignore this patch. The code disables the hugetlb migration on purpose.

Thanks
Huang Shijie