Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

balloons: support for L2 cache cluster allocation #384

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

askervin
Copy link
Collaborator

No description provided.

@askervin
Copy link
Collaborator Author

This PR depends on #383

@askervin askervin force-pushed the 5XX_balloons_cacheclusters branch 3 times, most recently from 745e5b1 to d4c7412 Compare October 21, 2024 11:09
@askervin askervin changed the title WIP: balloons: support for L2 cache cluster allocation balloons: support for L2 cache cluster allocation Oct 21, 2024
@askervin askervin force-pushed the 5XX_balloons_cacheclusters branch 3 times, most recently from 10357d5 to cd8e43a Compare October 21, 2024 12:01
@askervin askervin marked this pull request as ready for review October 21, 2024 12:02
When two caches of the same level and kind share the same id, they
collide in saved caches. This could lead to assigning cpu.caches
caches from different package than the CPU itself. This change fixes
the issue by ensuring unique cache ids to all caches of the same level
and kind.

Signed-off-by: Antti Kervinen <[email protected]>
Cache level functions, for instance CPU.GetCachesByLevel(), expect
cpu.caches to be sorted by level, the lowest first. This change
ensures that overridden caches follow this ordering, too, no matter in
which order user has spesified them.

Signed-off-by: Antti Kervinen <[email protected]>
This implementation expects CPUs sharing the same L2 cache also
belonging into the same NUMA node, and that hyperthreads of the same
CPU core always share L2 cache.

Signed-off-by: Antti Kervinen <[email protected]>
@askervin askervin force-pushed the 5XX_balloons_cacheclusters branch from cd8e43a to f9b7a24 Compare November 8, 2024 10:31
@askervin
Copy link
Collaborator Author

askervin commented Nov 8, 2024

(Documentation added as the last commit.)

Copy link
Collaborator

@kad kad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@fmuyassarov fmuyassarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment on lines +29 to +39
{"cpusets": ["0-7", "8-15"], "level": 3, "size": "128M"},

{"cpusets": ["0-1", "2-3", "4-5", "6-7"], "level": 2, "size": "4M", "kind": "u"},
{"cpusets": ["8-9", "10-11", "12-13", "14-15"], "level": 2, "size": "4M", "kind": "u"},

{"cpusets": ["0-1", "2-3", "4-5", "6-7"], "level": 1, "size": "256k", "kind": "d"},
{"cpusets": ["0-1", "2-3", "4-5", "6-7"], "level": 1, "size": "128k", "kind": "i"},

{"cpusets": ["8-9", "10-11", "12-13", "14-15"], "level": 1, "size": "256k", "kind": "d"},
{"cpusets": ["8-9", "10-11", "12-13", "14-15"], "level": 1, "size": "128k", "kind": "i"}
]'''
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this cache configuration override interesting/useful ? Doesn't it provide the same grouping as the socket and the physical cores ?

@klihub klihub merged commit b80b75f into containers:main Nov 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants