lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210513082236.GD2734@quack2.suse.cz>
Date:   Thu, 13 May 2021 10:22:36 +0200
From:   Jan Kara <jack@...e.cz>
To:     Chi Wu <wuchi.zero@...il.com>
Cc:     akpm@...ux-foundation.org, axboe@...com, hcochran@...nelspring.com,
        jack@...e.cz, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        mszeredi@...hat.com, sedat.dilek@...il.com, tj@...nel.org
Subject: Re: [PATCH] mm/page-writeback: Use __this_cpu_inc() in
 account_page_dirtied()

On Wed 12-05-21 22:47:42, Chi Wu wrote:
> As account_page_dirtied() was always protected by xa_lock_irqsave(),
> so using __this_cpu_inc() is better.
> 
> Signed-off-by: Chi Wu <wuchi.zero@...il.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  mm/page-writeback.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index 0062d5c57d41..e3901d0d329e 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -2436,7 +2436,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping)
>  		inc_wb_stat(wb, WB_DIRTIED);
>  		task_io_account_write(PAGE_SIZE);
>  		current->nr_dirtied++;
> -		this_cpu_inc(bdp_ratelimits);
> +		__this_cpu_inc(bdp_ratelimits);
>  
>  		mem_cgroup_track_foreign_dirty(page, wb);
>  	}
> -- 
> 2.17.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ