Skip to content

Commit

Permalink
modify annotation
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Kang <kang.zhang@intel.com>
  • Loading branch information
kangclzjc committed Jan 22, 2024
1 parent ed626e2 commit b952aec
Showing 1 changed file with 55 additions and 8 deletions.
63 changes: 55 additions & 8 deletions docs/proposals/koordlet/20231227-koordlet-resctrl-qos-enhance.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,67 @@ considerations for performance, reliability and security.
##### NFR2

### API
To support pod level LLC/MBA limit, we add a new annotation, the annotation key is `node.koordinator.sh/resctrl`, the annotation value finally will be parsed as below:
To support pod level LLC/MBA limit, we add a new annotation, the annotation key is `node.koordinator.sh/resctrl`.

Below is the example value of the annotation. schemata defines all caches' configuration. schemataPerCache will define specific cache's configuration which will not use all caches' configuration.
```go
type Resctrl struct {
L3 map[int64]int64
MB map[int64]int64
{
"LLC": {
"schemata": {
"range": [20,80],
},
"schemataPerCache": {
{
"cacheid" : 0,
"schemata": {
"range": [20,50],
}
},
{
"cacheid" : 1,
"schemata": {
"range": [20,60],
}
},
},
},
"MB": {
"schemata": {
"percent": 20,
},
"schemataPerCache": {
{
"cacheid": 0,
"percent": 20
},
{
"cacheid": 1,
"percent": 40
},
},
}
}
```

Below is the example of annotation. 80 means 80% of LLC. 60 means 60% of MB.
schemata and schemataPerCache are defined as below structures:

```go
type SchemataConfig struct {
Percent int `json:"percent,omitempty"`
Range []int `json:"percent,omitempty"`
}

type SchematePerCacheConfig struct {
CacheID int "json:"cacheID,omitempty""
SchemataConfig `json:",inline"`
}
```

The annotation value finally will be parsed as below which define LLC and MB configuration:
```go
{
"L3": "80"
"MB": "60"
type Resctrl struct {
LLC map[int]int64
MB map[int]int64
}
```

Expand Down

0 comments on commit b952aec

Please sign in to comment.