linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Chi Wu <wuchi.zero@gmail.com>
Cc: akpm@linux-foundation.org, axboe@fb.com,
	hcochran@kernelspring.com, jack@suse.cz,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mszeredi@redhat.com, sedat.dilek@gmail.com, tj@kernel.org
Subject: Re: [PATCH] mm/page-writeback: Use __this_cpu_inc() in account_page_dirtied()
Date: Thu, 13 May 2021 10:22:36 +0200	[thread overview]
Message-ID: <20210513082236.GD2734@quack2.suse.cz> (raw)
In-Reply-To: <20210512144742.4764-1-wuchi.zero@gmail.com>

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@gmail.com>

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.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@suse.com>
SUSE Labs, CR

      reply	other threads:[~2021-05-13  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12 14:47 [PATCH] mm/page-writeback: Use __this_cpu_inc() in account_page_dirtied() Chi Wu
2021-05-13  8:22 ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210513082236.GD2734@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=hcochran@kernelspring.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mszeredi@redhat.com \
    --cc=sedat.dilek@gmail.com \
    --cc=tj@kernel.org \
    --cc=wuchi.zero@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).