lkml.org 
[lkml]   [2013]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/16] slab: remove cachep in struct slab_rcu
    Date
    We can get cachep using page in struct slab_rcu, so remove it.

    Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

    diff --git a/mm/slab.c b/mm/slab.c
    index 69dc25a..b378f91 100644
    --- a/mm/slab.c
    +++ b/mm/slab.c
    @@ -204,7 +204,6 @@ typedef unsigned int kmem_bufctl_t;
    */
    struct slab_rcu {
    struct rcu_head head;
    - struct kmem_cache *cachep;
    struct page *page;
    };

    @@ -1818,7 +1817,7 @@ static void kmem_freepages(struct kmem_cache *cachep, struct page *page)
    static void kmem_rcu_free(struct rcu_head *head)
    {
    struct slab_rcu *slab_rcu = (struct slab_rcu *)head;
    - struct kmem_cache *cachep = slab_rcu->cachep;
    + struct kmem_cache *cachep = slab_rcu->page->slab_cache;

    kmem_freepages(cachep, slab_rcu->page);
    if (OFF_SLAB(cachep))
    @@ -2046,7 +2045,6 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp)
    struct slab_rcu *slab_rcu;

    slab_rcu = (struct slab_rcu *)slabp;
    - slab_rcu->cachep = cachep;
    slab_rcu->page = page;
    call_rcu(&slab_rcu->head, kmem_rcu_free);
    } else {
    --
    1.7.9.5


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