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
7c525ffa
Commit
7c525ffa
authored
May 08, 2019
by
nolancon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More intuitive TopologyHints - socketmask.go
parent
ce569564
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
socketmask.go
pkg/kubelet/cm/topologymanager/socketmask/socketmask.go
+3
-8
No files found.
pkg/kubelet/cm/topologymanager/socketmask/socketmask.go
View file @
7c525ffa
...
...
@@ -33,18 +33,13 @@ func NewSocketMask(Mask []int64) SocketMask {
}
// GetSocketMask calculates the socket mask.
func
(
sm
SocketMask
)
GetSocketMask
(
socketMask
[]
SocketMask
,
maskHolder
[]
string
,
count
int
)
(
SocketMask
,
[]
string
)
{
var
socketAffinityInt64
[][]
int64
for
r
:=
range
socketMask
{
socketAffinityVals
:=
[]
int64
(
socketMask
[
r
])
socketAffinityInt64
=
append
(
socketAffinityInt64
,
socketAffinityVals
)
}
func
(
sm
SocketMask
)
GetSocketMask
(
socketMaskInt64
[][]
int64
,
maskHolder
[]
string
,
count
int
)
(
SocketMask
,
[]
string
)
{
if
count
==
0
{
maskHolder
=
buildMaskHolder
(
socket
Affinity
Int64
)
maskHolder
=
buildMaskHolder
(
socket
Mask
Int64
)
}
klog
.
V
(
4
)
.
Infof
(
"[socketmask] MaskHolder : %v"
,
maskHolder
)
klog
.
V
(
4
)
.
Infof
(
"[socketmask] %v is passed into arrange function"
,
socketMask
)
arrangedMask
:=
arrangeMask
(
socket
Affinity
Int64
)
arrangedMask
:=
arrangeMask
(
socket
Mask
Int64
)
newMask
:=
getTopologyAffinity
(
arrangedMask
,
maskHolder
)
klog
.
V
(
4
)
.
Infof
(
"[socketmask] New Mask after getTopologyAffinity (new mask) : %v "
,
newMask
)
finalMaskValue
:=
parseMask
(
newMask
)
...
...
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