Re: [PATCH] memcg: revise the position of threshold index while unregistering event

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

 



On Tue, Mar 06, 2012 at 08:12:23PM +0800, Sha Zhengju wrote:
> From: Sha Zhengju <handai.szj@xxxxxxxxxx>
> 
> Index current_threshold should point to threshold just below or equal to usage.
> See below:
> http://www.spinics.net/lists/cgroups/msg00844.html
> 
> 
> Signed-off-by: Sha Zhengju <handai.szj@xxxxxxxxxx>

Reviewved-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>

> 
> ---
>  mm/memcontrol.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 22d94f5..cd40d67 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4398,7 +4398,7 @@ static void mem_cgroup_usage_unregister_event(struct cgroup *cgrp,
>  			continue;
>  
>  		new->entries[j] = thresholds->primary->entries[i];
> -		if (new->entries[j].threshold < usage) {
> +		if (new->entries[j].threshold <= usage) {
>  			/*
>  			 * new->current_threshold will not be used
>  			 * until rcu_assign_pointer(), so it's safe to increment
> -- 
> 1.7.4.1
> 

-- 
 Kirill A. Shutemov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[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]