Commit 7c525ffa authored by nolancon's avatar nolancon

More intuitive TopologyHints - socketmask.go

parent ce569564
...@@ -33,18 +33,13 @@ func NewSocketMask(Mask []int64) SocketMask { ...@@ -33,18 +33,13 @@ func NewSocketMask(Mask []int64) SocketMask {
} }
// GetSocketMask calculates the socket mask. // GetSocketMask calculates the socket mask.
func (sm SocketMask) GetSocketMask(socketMask []SocketMask, maskHolder []string, count int) (SocketMask, []string) { func (sm SocketMask) GetSocketMask(socketMaskInt64 [][]int64, maskHolder []string, count int) (SocketMask, []string) {
var socketAffinityInt64 [][]int64
for r := range socketMask {
socketAffinityVals := []int64(socketMask[r])
socketAffinityInt64 = append(socketAffinityInt64, socketAffinityVals)
}
if count == 0 { if count == 0 {
maskHolder = buildMaskHolder(socketAffinityInt64) maskHolder = buildMaskHolder(socketMaskInt64)
} }
klog.V(4).Infof("[socketmask] MaskHolder : %v", maskHolder) klog.V(4).Infof("[socketmask] MaskHolder : %v", maskHolder)
klog.V(4).Infof("[socketmask] %v is passed into arrange function", socketMask) klog.V(4).Infof("[socketmask] %v is passed into arrange function", socketMask)
arrangedMask := arrangeMask(socketAffinityInt64) arrangedMask := arrangeMask(socketMaskInt64)
newMask := getTopologyAffinity(arrangedMask, maskHolder) newMask := getTopologyAffinity(arrangedMask, maskHolder)
klog.V(4).Infof("[socketmask] New Mask after getTopologyAffinity (new mask) : %v ", newMask) klog.V(4).Infof("[socketmask] New Mask after getTopologyAffinity (new mask) : %v ", newMask)
finalMaskValue := parseMask(newMask) finalMaskValue := parseMask(newMask)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment