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

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

 



> > > +/*
> > > + * 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.
> > 
> Hm, How about this ?
> ==
> mem_cgroup_stat_add_atomic() 
> ==
> and add this 
> ==
> VM_BUG_ON(preempt_count() == 0)
> ==

_atomic sounds like a different thing to me.  _nonpreemptible?

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

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux