diff options
| author | Aneesh Kumar K.V <[email protected]> | 2016-12-12 16:41:56 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-12-12 18:55:07 -0800 |
| commit | 3999f52e3198e76607446ab1a4610c1ddc406c56 (patch) | |
| tree | 78469e2ed7888389cabfe8270e51fdcd3b308d2a /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 771ab4302c592d1de9e6b73f58979e9e5c424f4c (diff) | |
mm/hugetlb.c: use the right pte val for compare in hugetlb_cow
We cannot use the pte value used in set_pte_at for pte_same comparison,
because archs like ppc64, filter/add new pte flag in set_pte_at.
Instead fetch the pte value inside hugetlb_cow. We are comparing pte
value to make sure the pte didn't change since we dropped the page table
lock. hugetlb_cow get called with page table lock held, and we can take
a copy of the pte value before we drop the page table lock.
With hugetlbfs, we optimize the MAP_PRIVATE write fault path with no
previous mapping (huge_pte_none entries), by forcing a cow in the fault
path. This avoid take an addition fault to covert a read-only mapping
to read/write. Here we were comparing a recently instantiated pte (via
set_pte_at) to the pte values from linux page table. As explained above
on ppc64 such pte_same check returned wrong result, resulting in us
taking an additional fault on ppc64.
Fixes: 6a119eae942c ("powerpc/mm: Add a _PAGE_PTE bit")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Aneesh Kumar K.V <[email protected]>
Reported-by: Jan Stancek <[email protected]>
Acked-by: Hillf Danton <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Scott Wood <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions