lkml.org 
[lkml]   [2022]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 5/7] mm: try use fast path for pmd setting as well
Date
From: Kairui Song <kasong@tencent.com>

Use the per-CPU RSS cache helper as much as possible.

Signed-off-by: Kairui Song <kasong@tencent.com>
---
mm/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index f00f302143b6..09d7d193da51 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4419,7 +4419,7 @@ vm_fault_t do_set_pmd(struct vm_fault *vmf, struct page *page)
if (write)
entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);

- add_mm_counter(vma->vm_mm, mm_counter_file(page), HPAGE_PMD_NR);
+ add_mm_counter_fast(vma->vm_mm, mm_counter_file(page), HPAGE_PMD_NR);
page_add_file_rmap(page, vma, true);

/*
--
2.35.2
\
 
 \ /
  Last update: 2022-07-28 22:47    [W:0.038 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site