lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/page-writeback: Use __this_cpu_inc() in account_page_dirtied()
Date
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>
---
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
\
 
 \ /
  Last update: 2021-05-12 16:48    [W:0.039 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site