Re: [PATCH RT] mm/memcontrol: Move misplaced local_unlock_irqrestore()

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

 



On 2020-01-26 21:19:45 [+0000], Matt Fleming wrote:
> There's no need to leave interrupts disabled when calling css_put_many().

For RT the interrupts are never actually disabled and for !RT they are
disabled with or without the change.
The comment about the disable function mentions just the counters and
css_put_many()'s callback just invokes a worker so it is probably save
to move the function as suggested.

May I ask how on earth you managed to open that file on a Sunday
evening?

> Cc: Daniel Wagner <wagi@xxxxxxxxx>
> Signed-off-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxxxx>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 7b6f208c5a6b..1120b9d8dd86 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -7062,10 +7062,10 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
>  	mem_cgroup_charge_statistics(memcg, page, PageTransHuge(page),
>  				     -nr_entries);
>  	memcg_check_events(memcg, page);
> +	local_unlock_irqrestore(event_lock, flags);
>  
>  	if (!mem_cgroup_is_root(memcg))
>  		css_put_many(&memcg->css, nr_entries);
> -	local_unlock_irqrestore(event_lock, flags);
>  }
>  
>  /**

Sebastian



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux