linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com>
To: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"Huang, Ying" <ying.huang@intel.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Yasunori Gotou (Fujitsu)" <y-goto@fujitsu.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	"lkp@intel.com" <lkp@intel.com>
Subject: Re: [PATCH RFC v2] mm: memory-tiering: Fix PGPROMOTE_CANDIDATE accounting
Date: Tue, 8 Jul 2025 02:26:54 +0000	[thread overview]
Message-ID: <ef637fe1-436e-4003-86fb-47f651433f7b@fujitsu.com> (raw)
In-Reply-To: <87tt3nxz4x.fsf@DESKTOP-5N7EMDA>



On 08/07/2025 09:14, Huang, Ying wrote:
> "Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com> writes:
> 
>> Hi,
>>
>>
>> On 25/06/2025 10:13, Li Zhijian wrote:
>>> V2:
>>> Fix compiling error # Reported by LKP
>>>
>>> As Ying suggested, we need to assess whether this change causes regression.
>>> However, considering the stringent conditions this patch involves,
>>> properly evaluating it may be challenging, as the outcomes depend on your
>>> perspective. Much like in a zero-sum game, if someone benefits, another
>>> might lose.
>>>
>>> If there are subsequent results, I will update them here.
>>
>> I ran memhog + pmbench to evaluate the impact of the patch(3 runs [1] for each kernel).
>>
>> The results show an approximate 4% performance increase in pmbench after applying this patch.
>>
>> Average     pmbench-access            max-promotion-rate
>> Before:     7956805 pages/sec                168301 pages/sec
>> After:      8313666 pages/sec (+4.4%)        207149 pages/sec
> 
> It's hard for me to understand why performance increases because of
> higher promotion rate, while the expected behavior is more promotion
> rate limiting.

Good question.

Above max-promotion-rate means the maximum rate during the WHOLE pmbench period which
can not indicate the total promoted pages.

Allow me to present each sample [0] recorded per second during the pmbench duration, as exemplified below:


             |       AFTER             |VS |           BEFORE       |
------------+-------------------------+++++------------------------|
| Timestamp |  pgprom/s   |  pgdem/s  |   |  pgprom/s  |  pgdem/s  |
|-----------|-------------|-----------|---|------------|-----------|
|     1     |   122977    |     0     |   |   123051   |     0     |
|     2     |   50171     |     0     |   |   50159    |     0     |
|     3     |     18      |     0     |   |     28     |     0     |
|     4     |   16647     |     0     |   |     0      |     0     |
|     5     | 207149.5    |     0     |   |   78895    |     0     |
|     6     | 193411      | 161521    |   |  168301    |   8702    |
|     7     |  52464      |  53989    |   |   42294    |  39108    |
|     8     |   5133      |   2627    |   |     0      |     0     |
|     9     |     24      |     8     |   |   3875     |   6213    |
|    10     |     0       |     0     |   |  45513     |  43260    |
|    11     |     0       |     0     |   |  36600     |  44982    |
|    12     |     0       |     0     |   |  21091     |  11631    |
|    13     |     0       |     0     |   |  12276     |  10719    |
|    14     |     0       |     0     |   | 149699     | 149400    |
|    15     |     0       |     0     |   |   4026     |   4933    |
|    16     |     0       |     0     |   |   3780     |     0     |
|    17     |     0       |     0     |   |     2      |     0     |
|    18     |     0       |     0     |   |     0      |     0     |
|    19     |     0       |     0     |   |     0      |     0     |
|    20     |     0       |     0     |   |     0      |     0     |
|    21     |     0       |     0     |   |    62      |     0     |
|    22     |     0       |     0     |   |   2016     |     0     |
|    23     |     0       |     0     |   |     0      |     0     |
|    24     |     0       |     0     |   |    62      |     0     |
|    25     |   8308      |     0     |   |     1      |     0     |
|    26     |   220       |     0     |   |     0      |     0     |
|    27     |     0       |     0     |   |  1995.05   |     0     |
|    28     |     0       |     0     |   |     1      |     0     |
|    29     |   5791      |     0     |   |     0      |     0     |
|    30     |     0       |     0     |   |    62      |     0     |
------------+-------------------------+++++------------------------|
|   total   | 662313.5    | 218145    |   | 743789.05  | 318948    |
|    max    | 207149.5    | 161521    |   |  168301    | 149400    |
------------+-------------------------+++++------------------------|
|   pmbench |        8416250          |VS |        8079500         |


As far as I can tell, the higher pmbench scores applied-patch may be attributed to
a reduction in the total number of promoted pages in the entire pmbench execution period.
(Similar circumstances were observed in the results of other tests conducted)



[0]
before:
https://github.com/zhijianli88/misc/blob/main/20250627/promotion-evaluation/without-patch/pmbench-1750988862.log
https://github.com/zhijianli88/misc/blob/main/20250627/promotion-evaluation/without-patch/sar-1750988862.log
after:
https://github.com/zhijianli88/misc/blob/main/20250627/promotion-evaluation/with-patch/pmbench-1750988291.log
https://github.com/zhijianli88/misc/blob/main/20250627/promotion-evaluation/with-patch/sar-1750988291.log


Thanks
Zhijian

> 
>> The detailed logs are available at [2].
>>
>> [1] https://github.com/zhijianli88/misc/blob/main/20250627/promotion-evaluation/reproduce.sh
>> [2] https://github.com/zhijianli88/misc/tree/main/20250627/promotion-evaluation
> 
> [snip]
> 
> ---
> Best Regards,
> Huang, Ying

  reply	other threads:[~2025-07-08  2:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-25  2:13 Li Zhijian
2025-06-25  6:11 ` Huang, Ying
2025-06-25  7:39   ` Zhijian Li (Fujitsu)
2025-06-30  2:11 ` Zhijian Li (Fujitsu)
2025-07-08  1:14   ` Huang, Ying
2025-07-08  2:26     ` Zhijian Li (Fujitsu) [this message]
2025-07-08  2:47       ` Huang, Ying
2025-07-08  6:40         ` Zhijian Li (Fujitsu)
2025-07-08  8:56           ` Huang, Ying
2025-07-09  1:03             ` Zhijian Li (Fujitsu)

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=ef637fe1-436e-4003-86fb-47f651433f7b@fujitsu.com \
    --to=lizhijian@fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=y-goto@fujitsu.com \
    --cc=ying.huang@intel.com \
    --cc=ying.huang@linux.alibaba.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