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

feat(core-distributor)!: add cuid cache #2381

Merged
merged 9 commits into from
Sep 23, 2024
Merged

feat(core-distributor)!: add cuid cache #2381

merged 9 commits into from
Sep 23, 2024

Conversation

gurinderu
Copy link
Contributor

@gurinderu gurinderu commented Sep 17, 2024

Description

Allows to cache assignment by cuid for the core distributor.

Motivation

physical_core_id stability is critical for the CCP

Proposed Changes

Added cache for cuid->physical_core_id

Checklist

  • The code follows the project's coding conventions and style guidelines.
  • All tests related to the changes have passed successfully.
  • Documentation has been updated to reflect the changes (if applicable).
  • All new and existing unit tests have passed.
  • I have self-reviewed my code and ensured its quality.
  • I have added/updated necessary comments to aid understanding.

Reviewer Checklist

  • Code has been reviewed for quality and adherence to guidelines.
  • Tests have been reviewed and are sufficient to validate the changes.
  • Documentation has been reviewed and is up to date.
  • Any questions or concerns have been addressed.

@gurinderu gurinderu added the e2e Run e2e workflow label Sep 17, 2024
@@ -95,6 +96,8 @@ pub struct PersistentCoreDistributorState {
pub unit_id_mapping: Vec<(PhysicalCoreId, CUID)>,
#[serde_as(as = "Vec<(Hex, _)>")]
pub work_type_mapping: Vec<(CUID, WorkType)>,
#[serde_as(as = "Vec<(Hex, _)>")]
pub cpu_cache: Map<CUID, PhysicalCoreId>,
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure you need to persist a cache to disk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure, but it can be better in case of restarts.

Copy link
Member

Choose a reason for hiding this comment

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

Am I right that providers will need to cleanup cache to update Nox in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we need to cleanup at least the core distributor state

Copy link
Member

@mikevoronov mikevoronov left a comment

Choose a reason for hiding this comment

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

utACK

@folex folex merged commit 7c2ff1a into master Sep 23, 2024
15 of 18 checks passed
@folex folex deleted the cpu_cache branch September 23, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants