slab: do not call compound_head() in page_get_cache()
PATCH 1/1 slab: do not call compound_head() in page_get_cache()
page_get_cache() does not need to call compound_head(), as its unique caller virt_to_slab() already makes sure to return a head page.
Additionally, removing the compound_head() call makes page_get_cache() consistent with page_get_slab().
--- mm/slab.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/slab.c +0 -1
@@ -501,7 +501,6 @@ static inline void page_set_cache(struct page *page, struct kmem_cache *cache)static inline struct kmem_cache *page_get_cache (struct page *page) { - page =compound_head (page);BUG_ON (!PageSlab (page));return (struct kmem_cache *)page->lru.next; }
Signature · 7 lines
1.7.7.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Michel Lespinasse
page_get_cache()does not need to callcompound_head(), as its unique callervirt_to_slab()already makes sure to return a head page.Additionally, removing the
compound_head()call makespage_get_cache()consistent withpage_get_slab().Signed-off-by Michel Lespinasse <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · David Rientjes
Quoted 7 lines · Michel Lespinasse
page_get_cache()does not need to callcompound_head(), as its unique callervirt_to_slab()already makes sure to return a head page.Additionally, removing the
compound_head()call makespage_get_cache()consistent withpage_get_slab().Signed-off-by Michel Lespinasse <[email protected]>Acked-by David Rientjes <[email protected]>
The page_get_cache() helper is no longer used in the slab/next branch of
git://github.com/penberg/linux.git
Pekka
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>