Commit 40b760c
mm/numa: no task_numa_fault() call if PTE is changed
When handling a numa page fault, task_numa_fault() should be called by a
process that restores the page table of the faulted folio to avoid
duplicated stats counting. Commit b99a342 ("NUMA balancing: reduce
TLB flush via delaying mapping on hint page fault") restructured
do_numa_page() and did not avoid task_numa_fault() call in the second page
table check after a numa migration failure. Fix it by making all
!pte_same() return immediately.
This issue can cause task_numa_fault() being called more than necessary
and lead to unexpected numa balancing results (It is hard to tell whether
the issue will cause positive or negative performance impact due to
duplicated numa fault counting).
Link: https://lkml.kernel.org/r/[email protected]
Fixes: b99a342 ("NUMA balancing: reduce TLB flush via delaying mapping on hint page fault")
Signed-off-by: Zi Yan <[email protected]>
Reported-by: "Huang, Ying" <[email protected]>
Closes: https://lore.kernel.org/linux-mm/[email protected]/
Acked-by: David Hildenbrand <[email protected]>
Cc: Baolin Wang <[email protected]>
Cc: Kefeng Wang <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 61ebe5a commit 40b760c
1 file changed
+16
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5295 | 5295 | | |
5296 | 5296 | | |
5297 | 5297 | | |
5298 | | - | |
| 5298 | + | |
5299 | 5299 | | |
5300 | 5300 | | |
5301 | 5301 | | |
| |||
5358 | 5358 | | |
5359 | 5359 | | |
5360 | 5360 | | |
5361 | | - | |
5362 | | - | |
5363 | | - | |
5364 | | - | |
5365 | | - | |
5366 | | - | |
5367 | | - | |
5368 | | - | |
5369 | | - | |
5370 | | - | |
5371 | | - | |
| 5361 | + | |
| 5362 | + | |
5372 | 5363 | | |
5373 | 5364 | | |
5374 | | - | |
5375 | | - | |
5376 | | - | |
5377 | | - | |
| 5365 | + | |
| 5366 | + | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
5378 | 5374 | | |
5379 | 5375 | | |
5380 | 5376 | | |
| |||
5387 | 5383 | | |
5388 | 5384 | | |
5389 | 5385 | | |
5390 | | - | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
5391 | 5390 | | |
5392 | 5391 | | |
5393 | 5392 | | |
| |||
0 commit comments