]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/mm.h
mm: optimize compound_head() by avoiding a shared page flag
[linux-2.6-omap-h63xx.git] / include / linux / mm.h
index 8c149fa4491d751bd70997b024d220a5a139f8d4..695b90437bbc763bba0bb935793450d102f1dbf7 100644 (file)
@@ -269,14 +269,7 @@ static inline int get_page_unless_zero(struct page *page)
 
 static inline struct page *compound_head(struct page *page)
 {
-       /*
-        * We could avoid the PageCompound(page) check if
-        * we would not overload PageTail().
-        *
-        * This check has to be done in several performance critical
-        * paths of the slab etc. IMHO PageTail deserves its own flag.
-        */
-       if (unlikely(PageCompound(page) && PageTail(page)))
+       if (unlikely(PageTail(page)))
                return page->first_page;
        return page;
 }
@@ -327,7 +320,7 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
 
 static inline int compound_order(struct page *page)
 {
-       if (!PageCompound(page) || PageTail(page))
+       if (!PageHead(page))
                return 0;
        return (unsigned long)page[1].lru.prev;
 }