mbox series

[v3,0/2] mm: batch mm counter updating in filemap_map_pages()

Message ID 20240412064751.119015-1-wangkefeng.wang@huawei.com (mailing list archive)
Headers show
Series mm: batch mm counter updating in filemap_map_pages() | expand

Message

Kefeng Wang April 12, 2024, 6:47 a.m. UTC
Let's batch mm counter updating to accelerate filemap_map_pages(). 

v2:
- estimate folio type from caller and no need to return from
  set_pte_range()
- use unsigned long for rss

v3: 
- make is_cow to bool in patch1 and fix null folio in patch2
- retest, improvement same with v1

Kefeng Wang (2):
  mm: move mm counter updating out of set_pte_range()
  mm: filemap: batch mm counter updating in filemap_map_pages()

 mm/filemap.c | 17 ++++++++++++-----
 mm/memory.c  |  8 +++++---
 2 files changed, 17 insertions(+), 8 deletions(-)

Comments

Andrew Morton April 12, 2024, 11:12 p.m. UTC | #1
On Fri, 12 Apr 2024 14:47:49 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:

> Let's batch mm counter updating to accelerate filemap_map_pages(). 

Are any performance testing results available?
Matthew Wilcox April 13, 2024, 1:05 a.m. UTC | #2
On Fri, Apr 12, 2024 at 04:12:17PM -0700, Andrew Morton wrote:
> On Fri, 12 Apr 2024 14:47:49 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> 
> > Let's batch mm counter updating to accelerate filemap_map_pages(). 
> 
> Are any performance testing results available?

Patch 2/2 says 12% improvement
Kefeng Wang April 15, 2024, 5:41 a.m. UTC | #3
On 2024/4/13 9:05, Matthew Wilcox wrote:
> On Fri, Apr 12, 2024 at 04:12:17PM -0700, Andrew Morton wrote:
>> On Fri, 12 Apr 2024 14:47:49 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>
>>> Let's batch mm counter updating to accelerate filemap_map_pages().
>>
>> Are any performance testing results available?
> 
> Patch 2/2 says 12% improvement

Yes, lat_pagefault with 512M file from lmbench, thanks.