linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: wangzicheng <wangzicheng@honor.com>
To: wangxinyu19 <wxy2009nrrr@163.com>,
	"devnull+kasong.tencent.com@kernel.org"
	<devnull+kasong.tencent.com@kernel.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"axelrasmussen@google.com" <axelrasmussen@google.com>,
	"baohua@kernel.org" <baohua@kernel.org>,
	"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
	"chenridong@huaweicloud.com" <chenridong@huaweicloud.com>,
	"chrisl@kernel.org" <chrisl@kernel.org>,
	"david@kernel.org" <david@kernel.org>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"kaleshsingh@google.com" <kaleshsingh@google.com>,
	"kasong@tencent.com" <kasong@tencent.com>,
	"laoar.shao@gmail.com" <laoar.shao@gmail.com>,
	"lenohou@gmail.com" <lenohou@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"ljs@kernel.org" <ljs@kernel.org>,
	"mhocko@kernel.org" <mhocko@kernel.org>,
	"qi.zheng@linux.dev" <qi.zheng@linux.dev>,
	"shakeel.butt@linux.dev" <shakeel.butt@linux.dev>,
	"stevensd@google.com" <stevensd@google.com>,
	"surenb@google.com" <surenb@google.com>,
	"vernon2gm@gmail.com" <vernon2gm@gmail.com>,
	"weixugc@google.com" <weixugc@google.com>,
	"yuanchu@google.com" <yuanchu@google.com>,
	"yuzhao@google.com" <yuzhao@google.com>,
	"zhengqi.arch@bytedance.com" <zhengqi.arch@bytedance.com>,
	wangzhen <wangzhen5@honor.com>, wangtao <tao.wangtao@honor.com>
Subject: RE: [PATCH v5 00/14] mm/mglru: improve reclaim loop and dirty folio handling
Date: Sat, 18 Apr 2026 07:17:20 +0000	[thread overview]
Message-ID: <3a28d9d327d84ae192fb3dcb925a0674@honor.com> (raw)
In-Reply-To: <20260417025123.2971253-1-wxy2009nrrr@163.com>

> Hi Kairui,
> 
> We have tested this patch series on Android device under a typical scenario.
> 
> The test consisted of cold-starting multiple applications sequentially
> under moderate system load (some services running on the background,
> such as map navigating, AI voice-assistant). Each test round cold-starts
> a fixed set of apps one by one and records the cold start latency.
> A total of 100 rounds were conducted to ensure statistical significance.
> 

Hi Xinyu and Kairui,

We have test the patch under a **heavy** load benchmark for camera.

> Before:
>   /proc/vmstat info:
>     pgpgin 269,224
>     pgpgout 226,078
>     workingset_refault_anon 237
>     workingset_refault_file 27689
> 
>   Launch Time Summary (all apps, all runs)
>     Mean 868.0ms
>     P50 888.0ms
>     P90 1274.2ms
>     P95 1399.0ms
> 
> After:
>   /proc/vmstat info:
>     pgpgin 223,801                (-16.9%)
>     pgpgout 308,873
>     workingset_refault_anon 498
>     workingset_refault_file 17075 (-38.3%)
> 
>   Launch Time Summary (all apps, all runs)
>     Mean 850.5ms (-2.07%)
>     P50 861.5ms  (-3.04%)
>     P90 1179.0ms (-8.05%)
>     P95 1228.0ms (-12.2%)
> 
> --
> Best regards,
> Xinyu
> 

We evaluated the backported patches on android16-6.12 using a **heavy**
mobile workload on a Qualcomm 8850 device (16GB RAM + 16GB zram).
(vmscan code in this tree is largely similar to v6.18)

The workload simulates real user behavior by sequentially
cold-starting 23 apps. For each application we perform the related
operations (short‑video swiping, background music playback, and
navigation). After exiting one application the next is launched
immediately in 1s. After all apps complete, the camera is launched
and a photo is taken.

Baseline and patched kernels were tested under identical conditions.
(with a fan kept cooling the testbed)
Full system traces were collected for three runs in each
configuration, and ten additional traces were recorded for the final
camera launch stage.

Overall application keepalive behavior shows no noticeable
difference. However, we observed performance deviations in some
memory‑pressure scenarios.

Before:
Meminfo (100 ms per sample, average result)
MemAvailable: 5420
MemFree: 1421
Cached: 3862
AnonPages: 3804
Dirty: 62
vmstat counters (last sample)
pgpgin: 3,701,869
pgpgout: 3,545,058
workingset_refault_anon: 390,967
workingset_refault_file: 79,927
Total app launch time (23 apps + launcher × 23): 7702 ms
Camera launch time: 684 ms

After:
Meminfo (100 ms per sample, average result)
MemAvailable: 5058 (-7%)
MemFree: 1382 (-3%)
Cached: 3213 (-17%)
AnonPages: 3637 (-4%)
Dirty: 35 (-44%)
vmstat counters (last sample)
pgpgin: 5,752,429 (+55%)
pgpgout: 3,668,788 (+3%)
workingset_refault_anon: 1,492,964 (+282%)
workingset_refault_file: 590,505 (+639%)
Total app launch time (23 apps + launcher × 23): 8872 ms (+15%)
Among the tested apps, 11 improved while 14 regressed.
Camera launch time: 980 ms (+43%), which is also the stage with the
highest memory pressure.

From whole trace analysis, direct reclaim appears to run slower.
Before v.s. after
total duration: 11659 ms / 57006 ms
total reclaimed: 3953 MB / 6344 MB
speed: 0.339 MB/ms / 0.111 MB/ms
times: 16117 / 27562

The performance might behave differently on devices with smaller memory
(e.g. 8–16GB) compared to servers with 100+GB memory, or under
moderate to heavy memory pressure.
Could this be related to patch 09/14[1] which removes folio_inc_gen()
when ` writeback || (type == LRU_GEN_FILE && dirty)`?

Any comments or suggestions would be appreciated.

[1] https://lore.kernel.org/linux-mm/20260413-mglru-reclaim-v5-0-8eaeacbddc44@tencent.com/T/#m568eba84d35d8d5ff519d3e29237de6d64f67659

Best,
Zicheng


  parent reply	other threads:[~2026-04-18  7:17 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-12 16:48 Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 01/14] mm/mglru: consolidate common code for retrieving evictable size Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 02/14] mm/mglru: rename variables related to aging and rotation Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 03/14] mm/mglru: relocate the LRU scan batch limit to callers Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 04/14] mm/mglru: restructure the reclaim loop Kairui Song via B4 Relay
2026-04-16  6:33   ` Barry Song
2026-04-16 18:47   ` Kairui Song
2026-04-12 16:48 ` [PATCH v5 05/14] mm/mglru: scan and count the exact number of folios Kairui Song via B4 Relay
2026-04-15  3:16   ` Baolin Wang
2026-04-16  7:01   ` Barry Song
2026-04-16 17:39     ` Kairui Song
2026-04-12 16:48 ` [PATCH v5 06/14] mm/mglru: use a smaller batch for reclaim Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 07/14] mm/mglru: don't abort scan immediately right after aging Kairui Song via B4 Relay
2026-04-16  7:32   ` Barry Song
2026-04-12 16:48 ` [PATCH v5 08/14] mm/mglru: remove redundant swap constrained check upon isolation Kairui Song via B4 Relay
2026-04-14  7:43   ` Chen Ridong
2026-04-15  3:19   ` Baolin Wang
2026-04-16  9:05   ` Barry Song
2026-04-12 16:48 ` [PATCH v5 09/14] mm/mglru: use the common routine for dirty/writeback reactivation Kairui Song via B4 Relay
2026-04-15  3:30   ` Baolin Wang
2026-04-16  9:18   ` Barry Song
2026-04-12 16:48 ` [PATCH v5 10/14] mm/mglru: simplify and improve dirty writeback handling Kairui Song via B4 Relay
2026-04-15  3:25   ` Baolin Wang
2026-04-12 16:48 ` [PATCH v5 11/14] mm/mglru: remove no longer used reclaim argument for folio protection Kairui Song via B4 Relay
2026-04-12 16:48 ` [PATCH v5 12/14] mm/vmscan: remove sc->file_taken Kairui Song via B4 Relay
2026-04-14  7:46   ` Chen Ridong
2026-04-12 16:48 ` [PATCH v5 13/14] mm/vmscan: remove sc->unqueued_dirty Kairui Song via B4 Relay
2026-04-14  7:46   ` Chen Ridong
2026-04-12 16:48 ` [PATCH v5 14/14] mm/vmscan: unify writeback reclaim statistic and throttling Kairui Song via B4 Relay
2026-04-17  2:51 ` [PATCH v5 00/14] mm/mglru: improve reclaim loop and dirty folio handling wangxinyu19
2026-04-17 17:52   ` Kairui Song
2026-04-18  7:17   ` wangzicheng [this message]
2026-04-18  8:16     ` Kairui Song
2026-04-18  9:08       ` wangzicheng
2026-04-18  8:55     ` Barry Song
2026-04-17  2:55 ` wangxinyu19

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=3a28d9d327d84ae192fb3dcb925a0674@honor.com \
    --to=wangzicheng@honor.com \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=baohua@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chenridong@huaweicloud.com \
    --cc=chrisl@kernel.org \
    --cc=david@kernel.org \
    --cc=devnull+kasong.tencent.com@kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=kaleshsingh@google.com \
    --cc=kasong@tencent.com \
    --cc=laoar.shao@gmail.com \
    --cc=lenohou@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=qi.zheng@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=stevensd@google.com \
    --cc=surenb@google.com \
    --cc=tao.wangtao@honor.com \
    --cc=vernon2gm@gmail.com \
    --cc=wangzhen5@honor.com \
    --cc=weixugc@google.com \
    --cc=wxy2009nrrr@163.com \
    --cc=yuanchu@google.com \
    --cc=yuzhao@google.com \
    --cc=zhengqi.arch@bytedance.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