[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140701151547.fa67354878399575c8eb4647@linux-foundation.org>
Date: Tue, 1 Jul 2014 15:15:47 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Joonsoo Kim <iamjoonsoo.kim@....com>
Cc: Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Vladimir Davydov <vdavydov@...allels.com>
Subject: Re: [PATCH v3 5/9] slab: introduce alien_cache
On Tue, 1 Jul 2014 17:27:34 +0900 Joonsoo Kim <iamjoonsoo.kim@....com> wrote:
> -static struct array_cache **alloc_alien_cache(int node, int limit, gfp_t gfp)
> +static struct alien_cache *__alloc_alien_cache(int node, int entries,
> + int batch, gfp_t gfp)
> +{
> + int memsize = sizeof(void *) * entries + sizeof(struct alien_cache);
nit: all five memsizes in slab.c have type `int'. size_t would be more
appropriate.
> + struct alien_cache *alc = NULL;
> +
> + alc = kmalloc_node(memsize, gfp, node);
> + init_arraycache(&alc->ac, entries, batch);
> + return alc;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists