linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slab: do not call compound_head() in page_get_cache()
@ 2012-06-20 23:01 Michel Lespinasse
  2012-06-21  1:37 ` David Rientjes
  0 siblings, 1 reply; 3+ messages in thread
From: Michel Lespinasse @ 2012-06-20 23:01 UTC (permalink / raw)
  To: linux-mm, Christoph Lameter, Pekka Enberg, Matt Mackall
  Cc: linux-kernel, Andrew Morton

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().

Signed-off-by: Michel Lespinasse <walken@google.com>
---
 mm/slab.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index e901a36..6a1aa1f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -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;
 }
-- 
1.7.7.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] slab: do not call compound_head() in page_get_cache()
  2012-06-20 23:01 [PATCH] slab: do not call compound_head() in page_get_cache() Michel Lespinasse
@ 2012-06-21  1:37 ` David Rientjes
  2012-07-02 10:56   ` Pekka Enberg
  0 siblings, 1 reply; 3+ messages in thread
From: David Rientjes @ 2012-06-21  1:37 UTC (permalink / raw)
  To: Michel Lespinasse
  Cc: linux-mm, Christoph Lameter, Pekka Enberg, Matt Mackall,
	linux-kernel, Andrew Morton

On Wed, 20 Jun 2012, Michel Lespinasse wrote:

> 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().
> 
> Signed-off-by: Michel Lespinasse <walken@google.com>

Acked-by: David Rientjes <rientjes@google.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] slab: do not call compound_head() in page_get_cache()
  2012-06-21  1:37 ` David Rientjes
@ 2012-07-02 10:56   ` Pekka Enberg
  0 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2012-07-02 10:56 UTC (permalink / raw)
  To: David Rientjes
  Cc: Michel Lespinasse, linux-mm, Christoph Lameter, Matt Mackall,
	linux-kernel, Andrew Morton

On Wed, 20 Jun 2012, David Rientjes wrote:

> On Wed, 20 Jun 2012, Michel Lespinasse wrote:
> 
> > 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().
> > 
> > Signed-off-by: Michel Lespinasse <walken@google.com>
> 
> Acked-by: David Rientjes <rientjes@google.com>

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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-02 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 23:01 [PATCH] slab: do not call compound_head() in page_get_cache() Michel Lespinasse
2012-06-21  1:37 ` David Rientjes
2012-07-02 10:56   ` Pekka Enberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).