Re: [PATCH] cgroup: prefer [kv]zalloc over [kv]malloc+memset in memory controller code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 01, 2010 at 08:59:13PM +0100, Jesper Juhl wrote:

> @@ -4169,13 +4169,11 @@ static int alloc_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
>  	 */
>  	if (!node_state(node, N_NORMAL_MEMORY))
>  		tmp = -1;
> -	pn = kmalloc_node(sizeof(*pn), GFP_KERNEL, tmp);
> +	pn = kmalloc_node(sizeof(*pn), GFP_KERNEL|__GFP_ZERO, tmp);

Use the simpler kzalloc_node()? It's introduced here:

        commit 979b0fea2d9ae5d57237a368d571cbc84655fba6
        Author: Jeff Layton <jlayton@xxxxxxxxxx>
        Date:   Thu Jun 5 22:47:00 2008 -0700

            vm: add kzalloc_node() inline


Reviewed-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>

Thanks,
Fengguang

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]