Re: [PATCH -mm 3/5] memcg scalable file stat accounting method

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

 



On Wed, 4 Aug 2010 10:11:50 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> On Wed, 4 Aug 2010 09:55:13 +0900
> Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:
> 
> > > @@ -1074,7 +1075,49 @@ static unsigned int get_swappiness(struc
> > >  	return swappiness;
> > >  }
> > >  
> > > -/* A routine for testing mem is not under move_account */
> > > +static void mem_cgroup_start_move(struct mem_cgroup *mem)
> > > +{
> > > +	int cpu;
> > > +	/* for fast checking in mem_cgroup_update_file_stat() etc..*/
> > > +	spin_lock(&mc.lock);
> > > +	for_each_possible_cpu(cpu)
> > > +		per_cpu(mem->stat->count[MEM_CGROUP_ON_MOVE], cpu) += 1;
> > > +	spin_unlock(&mc.lock);
> > > +
> > > +	synchronize_rcu();
> > > +}
> > > +
> > > +static void mem_cgroup_end_move(struct mem_cgroup *mem)
> > > +{
> > > +	int cpu;
> > > +
> > > +	if (!mem)
> > > +		return;
> > Is this check necessary?
> > 
> 
> Yes, I hit NULL here.
> That happens migration=off case, IIRC.
> 
Ah, you're right.
Thank you for your clarification.

Daisuke Nishimura.

--
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/ .
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]