diff options
author | Naoya Horiguchi <[email protected]> | 2015-04-15 16:14:38 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-04-15 16:35:19 -0700 |
commit | bcc54222309c70ebcb6c69c156fba4a13dee0a3b (patch) | |
tree | 2d947c66bdc0391d5294dd5fdd87cbabfa032020 /tools/perf/scripts/python/check-perf-trace.py | |
parent | 822fc61367f062d36c5b5a4d517e9bd2b65a741f (diff) |
mm: hugetlb: introduce page_huge_active
We are not safe from calling isolate_huge_page() on a hugepage
concurrently, which can make the victim hugepage in invalid state and
results in BUG_ON().
The root problem of this is that we don't have any information on struct
page (so easily accessible) about hugepages' activeness. Note that
hugepages' activeness means just being linked to
hstate->hugepage_activelist, which is not the same as normal pages'
activeness represented by PageActive flag.
Normal pages are isolated by isolate_lru_page() which prechecks PageLRU
before isolation, so let's do similarly for hugetlb with a new
paeg_huge_active().
set/clear_page_huge_active() should be called within hugetlb_lock. But
hugetlb_cow() and hugetlb_no_page() don't do this, being justified because
in these functions set_page_huge_active() is called right after the
hugepage is allocated and no other thread tries to isolate it.
[[email protected]: s/PageHugeActive/page_huge_active/, make it return bool]
[[email protected]: set_page_huge_active() can be static]
Signed-off-by: Naoya Horiguchi <[email protected]>
Cc: Hugh Dickins <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions