On Tue, 3 Nov 2015 17:26:15 +0200 "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> wrote: > I've missed two simlar codepath which need some preparation to work well > with reworked THP refcounting. > > Both page_referenced() and page_idle_clear_pte_refs_one() assume that > THP can only be mapped with PMD, so there's no reason to look on PTEs > for PageTransHuge() pages. That's no true anymore: THP can be mapped > with PTEs too. > > The patch removes PageTransHuge() test from the functions and opencode > page table check. x86_64 allnoconfig: In file included from mm/rmap.c:47: include/linux/mm.h: In function 'page_referenced': include/linux/mm.h:448: error: call to '__compiletime_assert_448' declared with attribute error: BUILD_BUG failed make[1]: *** [mm/rmap.o] Error 1 make: *** [mm/rmap.o] Error 2 because #else /* CONFIG_TRANSPARENT_HUGEPAGE */ #define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; }) btw, total_mapcount() is far too large to be inlined and page_mapcount() is getting pretty bad too. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>