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

scheduler: fix that cpu should be preferred if numa policy is restricted #2033

Merged
merged 1 commit into from
May 8, 2024

Conversation

KunWuLuan
Copy link
Contributor

@KunWuLuan KunWuLuan commented May 7, 2024

Ⅰ. Describe what this PR does

When pods request multi resources, and some of these resources need to be placed on 2 numa nodes and some other resources can be placed on 1 numa node, the pods can not be scheduled. This PR solve the problem by set preferred property to true for restricted policy and cpu resource to solve the problem. 

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Label a node that have 2 numa nodes with node.koordinator.sh/numa-topology-policy=restricted and create a pod that request 2 cpus and all gpu cards on node. The pod will be pending.

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.74%. Comparing base (038308b) to head (707cd54).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2033      +/-   ##
==========================================
- Coverage   68.76%   68.74%   -0.03%     
==========================================
  Files         423      423              
  Lines       39199    39199              
==========================================
- Hits        26956    26946      -10     
- Misses       9910     9918       +8     
- Partials     2333     2335       +2     
Flag Coverage Δ
unittests 68.74% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
@KunWuLuan KunWuLuan changed the title WIP: fix: cpu should be preferred if numa policy is restricted fix: cpu should be preferred if numa policy is restricted May 8, 2024
@ZiMengSheng
Copy link
Contributor

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label May 8, 2024
@saintube saintube changed the title fix: cpu should be preferred if numa policy is restricted scheduler: fix that cpu should be preferred if numa policy is restricted May 8, 2024
@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hormes

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@koordinator-bot koordinator-bot bot merged commit fb33c30 into koordinator-sh:main May 8, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants