OpenVZ Forum


Home » Mailing lists » Devel » [PATCH][ just for review] memory controller enhancements [0/5]
Re: [PATCH][ just for review] memory controller enhancements [4/5] statistics for memory cgroup [message #21698 is a reply to message #21697] Mon, 15 October 2007 06:46 Go to previous messageGo to previous message
KAMEZAWA Hiroyuki is currently offline  KAMEZAWA Hiroyuki
Messages: 463
Registered: September 2006
Senior Member
On Mon, 15 Oct 2007 15:37:01 +0900 (JST)
yamamoto@valinux.co.jp (YAMAMOTO Takashi) wrote:

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

> > @@ -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?
> 

Ah, always pc->mem_cgroup. ok, I'll remove that.

Thanks,
-Kame

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Guidance required...
Next Topic: CONFIG_NAMESPACE* patchset
Goto Forum:
  


Current Time: Wed Oct 16 07:01:07 GMT 2024

Total time taken to generate the page: 0.05058 seconds