| From: David Hildenbrand <david@redhat.com> |
| Subject: mm-migrate-move-numa-hinting-fault-folio-isolation-checks-under-ptl-fix |
| Date: Wed, 26 Jun 2024 18:14:44 +0200 |
| |
| Donet reports an issue during NUMA migration we haven't seen previously: |
| |
| [ 71.422804] list_del corruption, c00c00000061b3c8->next is |
| LIST_POISON1 (5deadbeef0000100) |
| [ 71.422839] ------------[ cut here ]------------ |
| [ 71.422843] kernel BUG at lib/list_debug.c:56! |
| [ 71.422850] Oops: Exception in kernel mode, sig: 5 [#1] |
| |
| We forgot to convert one "return 0;" to return an error instead from |
| migrate_misplaced_folio_prepare() in case the target node is nearly |
| full. |
| |
| Link: https://lkml.kernel.org/r/8f85c31a-e603-4578-bf49-136dae0d4b69@redhat.com |
| Link: https://lkml.kernel.org/r/20240626191129.658CFC32782@smtp.kernel.org |
| Signed-off-by: David Hildenbrand <david@redhat.com> |
| Tested-by: Donet Tom <donettom@linux.ibm.com> |
| Cc: Baolin Wang <baolin.wang@linux.alibaba.com> |
| Cc: Zi Yan <ziy@nvidia.com> |
| Signed-off-by: Andrew Morton <akpm@linux-foundation.org> |
| --- |
| |
| mm/migrate.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/mm/migrate.c~mm-migrate-move-numa-hinting-fault-folio-isolation-checks-under-ptl-fix |
| +++ a/mm/migrate.c |
| @@ -2556,7 +2556,7 @@ int migrate_misplaced_folio_prepare(stru |
| int z; |
| |
| if (!(sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING)) |
| - return 0; |
| + return -EAGAIN; |
| for (z = pgdat->nr_zones - 1; z >= 0; z--) { |
| if (managed_zone(pgdat->node_zones + z)) |
| break; |
| _ |