aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page-flags.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-05-09 15:59:24 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-09 15:59:24 -0400
commite800072c18f0d7b89a80fa46dceb3d080c80e09c (patch)
tree8da6cb7944762a60ec37594720c1ad2757631c2f /include/linux/page-flags.h
parente8ed77dfa90dd79c5343415a4bbbfdab9787b35a (diff)
parentb507146bb6b9ac0c0197100ba3e299825a21fed3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
In netdevice.h we removed the structure in net-next that is being changes in 'net'. In macsec.c and rtnetlink.c we have overlaps between fixes in 'net' and the u64 attribute changes in 'net-next'. The mlx5 conflicts have to do with vxlan support dependencies. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/page-flags.h')
-rw-r--r--include/linux/page-flags.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index f4ed4f1b0c77..6b052aa7b5b7 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -517,6 +517,27 @@ static inline int PageTransCompound(struct page *page)
517} 517}
518 518
519/* 519/*
520 * PageTransCompoundMap is the same as PageTransCompound, but it also
521 * guarantees the primary MMU has the entire compound page mapped
522 * through pmd_trans_huge, which in turn guarantees the secondary MMUs
523 * can also map the entire compound page. This allows the secondary
524 * MMUs to call get_user_pages() only once for each compound page and
525 * to immediately map the entire compound page with a single secondary
526 * MMU fault. If there will be a pmd split later, the secondary MMUs
527 * will get an update through the MMU notifier invalidation through
528 * split_huge_pmd().
529 *
530 * Unlike PageTransCompound, this is safe to be called only while
531 * split_huge_pmd() cannot run from under us, like if protected by the
532 * MMU notifier, otherwise it may result in page->_mapcount < 0 false
533 * positives.
534 */
535static inline int PageTransCompoundMap(struct page *page)
536{
537 return PageTransCompound(page) && atomic_read(&page->_mapcount) < 0;
538}
539
540/*
520 * PageTransTail returns true for both transparent huge pages 541 * PageTransTail returns true for both transparent huge pages
521 * and hugetlbfs pages, so it should only be called when it's known 542 * and hugetlbfs pages, so it should only be called when it's known
522 * that hugetlbfs pages aren't involved. 543 * that hugetlbfs pages aren't involved.
@@ -559,6 +580,7 @@ static inline int TestClearPageDoubleMap(struct page *page)
559#else 580#else
560TESTPAGEFLAG_FALSE(TransHuge) 581TESTPAGEFLAG_FALSE(TransHuge)
561TESTPAGEFLAG_FALSE(TransCompound) 582TESTPAGEFLAG_FALSE(TransCompound)
583TESTPAGEFLAG_FALSE(TransCompoundMap)
562TESTPAGEFLAG_FALSE(TransTail) 584TESTPAGEFLAG_FALSE(TransTail)
563TESTPAGEFLAG_FALSE(DoubleMap) 585TESTPAGEFLAG_FALSE(DoubleMap)
564 TESTSETFLAG_FALSE(DoubleMap) 586 TESTSETFLAG_FALSE(DoubleMap)