Re: [PATCH -V3 2/9] cacheinfo: calculate size of per-CPU data cache slice

Mel Gorman
2023-10-19T12:11:43Z

On Mon, Oct 16, 2023 at 01:29:55PM +0800, Huang Ying wrote:
> This can be used to estimate the size of the data cache slice that can
> be used by one CPU under ideal circumstances. Both DATA caches and
> UNIFIED caches are used in calculation. So, the users need to consider
> the impact of the code cache usage.
>
> Because the cache inclusive/non-inclusive information isn't available
> now, we just use the size of the per-CPU slice of LLC to make the
> result more predictable across architectures. This may be improved
> when more cache information is available in the future.
>
> A brute-force algorithm to iterate all online CPUs is used to avoid
> to allocate an extra cpumask, especially in offline callback.
>
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

--
Mel Gorman
SUSE Labs