Skip to contentSkip to conversation

mm: clean up non-standard page->_mapcount users

PATCH New [email protected] 1 participant 1 message Jul 26, 2016 MM core

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 68/126 mm: clean up non-standard page->_mapcount users

From: Vladimir Davydov <[email protected]>
Subject: mm: clean up non-standard page->_mapcount users

- Add a proper comment to page->_mapcount.
- Introduce a macro for generating helper functions.
- Place all special page->_mapcount values next to each other so that readers can see all possible values and so we don't get duplicates.

---

 include/linux/mm_types.h   |    5 ++
 include/linux/page-flags.h |   73 +++++++++++++++--------------------
 scripts/tags.sh            |    3 +
 3 files changed, 40 insertions(+), 41 deletions(-)
include/linux/mm_types.h renamed from include/linux/mm_types.h~mm-clean-up-non-standard-page-_mapcount-users +5 -0
diff -puN include/linux/mm_types.h~mm-clean-up-non-standard-page-_mapcount-users include/linux/mm_types.h
@@ -85,6 +85,11 @@ struct page {
 				/*
 				 * Count of ptes mapped in mms, to show when
 				 * page is mapped & limit reverse map searches.
+				 *
+				 * Extra information about page type may be
+				 * stored here for pages that are never mapped,
+				 * in which case the value MUST BE <= -2.
+				 * See page-flags.h for more details.
 				 */
 				atomic_t _mapcount;
 
include/linux/page-flags.h renamed from include/linux/page-flags.h~mm-clean-up-non-standard-page-_mapcount-users +32 -40

82 lines not on this page · raw message