diff options
| author | Michal Hocko <[email protected]> | 2016-08-02 14:02:34 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-08-02 17:31:41 -0400 |
| commit | 4e666314d286765a9e61818b488c7372326654ec (patch) | |
| tree | 7a50291e533fcd14a2476212e71afb3feccc49ac /tools/perf/scripts/python/stat-cpi.py | |
| parent | 649920c6ab93429b94bc7c1aa7c0e8395351be32 (diff) | |
mm, hugetlb: fix huge_pte_alloc BUG_ON
Zhong Jiang has reported a BUG_ON from huge_pte_alloc hitting when he
runs his database load with memory online and offline running in
parallel. The reason is that huge_pmd_share might detect a shared pmd
which is currently migrated and so it has migration pte which is
!pte_huge.
There doesn't seem to be any easy way to prevent from the race and in
fact seeing the migration swap entry is not harmful. Both callers of
huge_pte_alloc are prepared to handle them. copy_hugetlb_page_range
will copy the swap entry and make it COW if needed. hugetlb_fault will
back off and so the page fault is retries if the page is still under
migration and waits for its completion in hugetlb_fault.
That means that the BUG_ON is wrong and we should update it. Let's
simply check that all present ptes are pte_huge instead.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Michal Hocko <[email protected]>
Reported-by: zhongjiang <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions