lkml.org 
[lkml]   [2013]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/16] slab: use __GFP_COMP flag for allocating slab pages
On Thu, 22 Aug 2013, Joonsoo Kim wrote:

> If we use 'struct page' of first page as 'struct slab', there is no
> advantage not to use __GFP_COMP. So use __GFP_COMP flag for all the cases.

Ok that brings it in line with SLUB and SLOB.

> @@ -2717,17 +2701,8 @@ static void slab_put_obj(struct kmem_cache *cachep, struct slab *slabp,
> static void slab_map_pages(struct kmem_cache *cache, struct slab *slab,
> struct page *page)
> {
> - int nr_pages;
> -
> - nr_pages = 1;
> - if (likely(!PageCompound(page)))
> - nr_pages <<= cache->gfporder;
> -
> - do {
> - page->slab_cache = cache;
> - page->slab_page = slab;
> - page++;
> - } while (--nr_pages);
> + page->slab_cache = cache;
> + page->slab_page = slab;
> }

And saves some processing.



\
 
 \ /
  Last update: 2013-08-22 20:21    [W:0.164 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site