[Devel] Re: [PATCH][ just for review] memory controller enhancements [4/5] statistics for memory cgroup

YAMAMOTO Takashi yamamoto at valinux.co.jp
Sun Oct 14 23:37:01 PDT 2007


>  - changed from u64 to s64

why?

> +/*
> + * For batching....mem_cgroup_charge_statistics()(see below).
> + */
> +static inline void mem_cgroup_stat_add(struct mem_cgroup_stat *stat,
> +                enum mem_cgroup_stat_index idx, int val)
> +{
> +	int cpu = smp_processor_id();
> +	stat->cpustat[cpu].count[idx] += val;
> +}

i think the function name should be something which implies batching.

> @@ -207,8 +299,23 @@ clear_page_cgroup(struct page *page, str
>  }
>  
>  
> -static void __mem_cgroup_move_lists(struct page_cgroup *pc, bool active)
> +static void __mem_cgroup_move_lists(struct page_cgroup *pc, bool active,
> +				    struct mem_cgroup *mem)
>  {

can mem be different from pc->mem_cgroup here?

YAMAMOTO Takashi
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list