From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Pan Deng <pan.deng@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <tianyou.li@intel.com>,
<tim.c.chen@linux.intel.com>, <peterz@infradead.org>,
<mingo@kernel.org>
Subject: Re: [PATCH 4/4] sched/rt: Split cpupri_vec->cpumask to per NUMA node to reduce contention
Date: Mon, 21 Jul 2025 19:23:59 +0800 [thread overview]
Message-ID: <36eb3d2e-03f3-4829-b0f6-94b0f3371629@intel.com> (raw)
In-Reply-To: <3755b9d2bf78da2ae593a9c92d8e79dddcaa9877.1751852370.git.pan.deng@intel.com>
On 7/7/2025 10:35 AM, Pan Deng wrote:
> When running a multi-instance FFmpeg workload on HCC system, significant
> contention is observed on bitmap of `cpupri_vec->cpumask`.
>
> The SUT is a 2-socket machine with 240 physical cores and 480 logical
> CPUs. 60 FFmpeg instances are launched, each pinned to 4 physical cores
> (8 logical CPUs) for transcoding tasks. Sub-threads use RT priority 99
> with FIFO scheduling. FPS is used as score.
>
> perf c2c tool reveals:
> cpumask (bitmap) cache line of `cpupri_vec->mask`:
> - bits are loaded during cpupri_find
> - bits are stored during cpupri_set
> - cycles per load: ~2.2K to 8.7K
>
> This change splits `cpupri_vec->cpumask` into per-NUMA-node data to
> mitigate false sharing.
>
> As a result:
> - FPS improves by ~3.8%
> - Kernel cycles% drops from ~20% to ~18.7%
> - Cache line contention is mitigated, perf-c2c shows cycles per load
> drops from ~2.2K-8.7K to ~0.5K-2.2K
>
This brings noticeable improvement for RT workload, and it would
be even more convincing if we can have try on normal task workload,
at least not bring regression(schbench/hackbenc, etc).
thanks,
Chenyu
> Note: CONFIG_CPUMASK_OFFSTACK=n remains unchanged.
>
next prev parent reply other threads:[~2025-07-21 11:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 2:35 [PATCH 0/4] sched/rt: mitigate root_domain cache line contention Pan Deng
2025-07-07 2:35 ` [PATCH 1/4] sched/rt: Optimize cpupri_vec layout to mitigate " Pan Deng
2025-09-01 5:10 ` Chen, Yu C
2025-09-01 13:24 ` Deng, Pan
2025-07-07 2:35 ` [PATCH 2/4] sched/rt: Restructure root_domain to reduce cacheline contention Pan Deng
2025-07-07 2:35 ` [PATCH 3/4] sched/rt: Split root_domain->rto_count to per-NUMA-node counters Pan Deng
2025-07-07 6:53 ` kernel test robot
2025-07-07 11:36 ` Deng, Pan
2025-07-07 6:53 ` kernel test robot
2025-07-08 5:33 ` kernel test robot
2025-07-08 14:02 ` Deng, Pan
2025-07-09 8:56 ` Li, Philip
2025-07-07 2:35 ` [PATCH 4/4] sched/rt: Split cpupri_vec->cpumask to per NUMA node to reduce contention Pan Deng
2025-07-21 11:23 ` Chen, Yu C [this message]
2025-07-22 14:46 ` Deng, Pan
2025-08-06 14:00 ` Deng, Pan
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=36eb3d2e-03f3-4829-b0f6-94b0f3371629@intel.com \
--to=yu.c.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pan.deng@intel.com \
--cc=peterz@infradead.org \
--cc=tianyou.li@intel.com \
--cc=tim.c.chen@linux.intel.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;
as well as URLs for NNTP newsgroup(s).