Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
452ebed9
Commit
452ebed9
authored
Sep 10, 2015
by
Janet Kuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the bug that qos class determination be incorrect with small numbers
parent
bff6ee8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
memory_policy.go
pkg/kubelet/qos/memory_policy.go
+3
-3
No files found.
pkg/kubelet/qos/memory_policy.go
View file @
452ebed9
...
@@ -37,9 +37,9 @@ func isMemoryBestEffort(container *api.Container) bool {
...
@@ -37,9 +37,9 @@ func isMemoryBestEffort(container *api.Container) bool {
func
isMemoryGuaranteed
(
container
*
api
.
Container
)
bool
{
func
isMemoryGuaranteed
(
container
*
api
.
Container
)
bool
{
// A container is memory guaranteed if its memory request == memory limit.
// A container is memory guaranteed if its memory request == memory limit.
// If memory request == memory limit, the user is very confident of resource consumption.
// If memory request == memory limit, the user is very confident of resource consumption.
memoryRequest
Value
:=
container
.
Resources
.
Requests
.
Memory
()
.
Value
()
memoryRequest
:=
container
.
Resources
.
Requests
.
Memory
()
memoryLimit
Value
:=
container
.
Resources
.
Limits
.
Memory
()
.
Value
()
memoryLimit
:=
container
.
Resources
.
Limits
.
Memory
()
return
memoryRequestValue
==
memoryLimitValue
&&
memoryRequestValue
!=
0
return
(
*
memoryRequest
)
.
Cmp
(
*
memoryLimit
)
==
0
&&
memoryRequest
.
Value
()
!=
0
}
}
// GetContainerOomAdjust returns the amount by which the OOM score of all processes in the
// GetContainerOomAdjust returns the amount by which the OOM score of all processes in the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment