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

koord-scheduler: fix NodeNUMAResource sortCPUsByRefCount #709

Merged

Conversation

ZiMengSheng
Copy link
Contributor

@ZiMengSheng ZiMengSheng commented Oct 18, 2022

Signed-off-by: wangjianyu zmsjianyu@gmail.com

Ⅰ. Describe what this PR does

this pr fixes NodeNUMAResource sortCPUsByRefCount bug and supply UT for it.

A node has 16 CPUs, and the maxRefCount of CPUTopologyOptions is set to 2, there are 32 CPUs to allocate at this time. After allocating 32C according to the SpreadByPCPUs and FullPCPUsOnly strategies, and then following the SpreadByPCPUs allocation, there should be 16 CPUs left to allocate. But at this time koord-scheduler will report insufficient CPU resources.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. 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

Signed-off-by: wangjianyu <zmsjianyu@gmail.com>
@ZiMengSheng ZiMengSheng changed the title koord-scheduler: fix UnifiedCPUSetAllocator sortCPUsByRefCount koord-scheduler: fix NodeNUMAResource sortCPUsByRefCount Oct 18, 2022
@eahydra eahydra added this to the v1.0 milestone Oct 18, 2022
Copy link
Member

@eahydra eahydra left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@codecov
Copy link

codecov bot commented Oct 18, 2022

Codecov Report

Base: 68.87% // Head: 68.92% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (c2da143) compared to base (75441b0).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #709      +/-   ##
==========================================
+ Coverage   68.87%   68.92%   +0.05%     
==========================================
  Files         205      205              
  Lines       23319    23319              
==========================================
+ Hits        16060    16072      +12     
+ Misses       6150     6138      -12     
  Partials     1109     1109              
Flag Coverage Δ
unittests 68.92% <100.00%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...eduler/plugins/nodenumaresource/cpu_accumulator.go 83.01% <100.00%> (+2.45%) ⬆️
pkg/util/httputil/reverseproxy.go 84.30% <0.00%> (-0.80%) ⬇️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 81.05% <0.00%> (+2.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hormes
Copy link
Member

hormes commented Oct 18, 2022

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra, 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 8a6edf2 into koordinator-sh:main Oct 18, 2022
@ZiMengSheng ZiMengSheng deleted the fix_sortCPUsByRefCount branch January 13, 2023 03:27
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