linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: 史嘉成 <billsjc@sjtu.edu.cn>
To: ying.huang@linux.alibaba.com
Cc: linux-mm@kvack.org
Subject: [Question] About the PCP free_high heuristic
Date: Tue, 29 Jul 2025 16:08:20 +0800	[thread overview]
Message-ID: <212D6530-0FE8-4EA7-A599-48D71E8AFA23@sjtu.edu.cn> (raw)

Hi,

I ran the bw_unix benchmark in lmbench on my test machine (EPYC-7T83, 32 vCPUs,
64 GB of memory):
    bin/x86_64-linux-gnu/bw_unix -P 16
The bandwidth result was 30511.63 MB/s when percpu_pagelist_high_fraction was
set to 8; however, the result drops to 21595.98 MB/s when
percpu_pagelist_high_fraction is set to 0 (enabling PCP high auto-tuning).

I first inspected the auto-tuning code, but the root cause of the performance
degradation lies in the triggering threshold of the free_high heuristic:
    pcp->free_count >= (batch + pcp->high_min / 2)
I noticed that commit c544a95 increases this threshold, but pcp->high_min is
relatively small when auto-tuning is enabled, and the PCP draining leads to
the performance degradation.

The problem was fixed when increasing the threshold to (batch + pcp->high / 2).
Is it intended to use high_min instead of high in the threshold? Would it be
more adaptive to introduce some new tunables for the free_high threshold?

Best,
Shi, Jiacheng

             reply	other threads:[~2025-07-29  8:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29  8:08 史嘉成 [this message]
2025-07-29  9:59 ` Huang, Ying
2025-07-29 11:29   ` Shi, Jiacheng
2025-07-30  1:26     ` Huang, Ying
2025-07-30  1:33       ` 史嘉成

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=212D6530-0FE8-4EA7-A599-48D71E8AFA23@sjtu.edu.cn \
    --to=billsjc@sjtu.edu.cn \
    --cc=linux-mm@kvack.org \
    --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