Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,76 @@ spec:
type: object
type: array
type: object
poolNameConfig:
description: PoolNameConfig is a configuration for manipulating
TMO on specified resource pools
items:
properties:
configDetail:
description: ConfigDetail is configuration details of TMO
properties:
enableSwap:
description: EnableSwap is whether to enable swap to
offloading anon pages
type: boolean
enableTMO:
description: EnableTMO is whether to enable TMO on target
objective
type: boolean
interval:
description: Interval is the minimum duration the objectives
got memory reclaimed by TMO
type: string
policyName:
description: PolicyName is used to specify the policy
for calculating memory offloading size
type: string
psiPolicy:
description: PSIPolicyConf is configurations of a TMO
policy which reclaim memory by PSI
properties:
maxProbe:
description: MaxProbe limits the memory offloading
size in one cycle, it's a ratio of memory usage.
type: number
psiAvg60Threshold:
description: |-
PSIAvg60Threshold indicates the threshold of memory pressure. If observed pressure exceeds
this threshold, memory offloading will be paused.
type: number
type: object
refaultPolicy:
description: RefaultPolicy is configurations of a TMO
policy which reclaim memory by refault
properties:
maxProbe:
description: MaxProbe limits the memory offloading
size in one cycle, it's a ratio of memory usage.
type: number
reclaimAccuracyTarget:
description: ReclaimAccuracyTarget indicates the
desired level of precision or accuracy in offloaded
pages.
type: number
reclaimScanEfficiencyTarget:
description: |-
ReclaimScanEfficiencyTarget indicates the desired level of efficiency in scanning and
identifying memory pages that can be offloaded.
type: number
type: object
type: object
poolName:
description: PoolName is a resource pool name, e.g. system,
shared, reclaimed
type: string
required:
- configDetail
- poolName
type: object
type: array
x-kubernetes-list-map-keys:
- poolName
x-kubernetes-list-type: map
qosLevelConfig:
description: QoSLevelConfig is a configuration for manipulating
TMO on Different QoS Level
Expand Down
14 changes: 14 additions & 0 deletions pkg/apis/config/v1alpha1/tmo.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ type TransparentMemoryOffloadingConfig struct {
// +listType=map
CgroupConfig []CgroupConfig `json:"CgroupConfig,omitempty"`

// PoolNameConfig is a configuration for manipulating TMO on specified resource pools
// +optional
// +listMapKey=poolName
// +listType=map
PoolNameConfig []PoolNameConfig `json:"poolNameConfig,omitempty"`

// BlockConfig is a configuration for blocking tmo on specified pods.
// +optional
BlockConfig *BlockConfig `json:"blockConfig,omitempty"`
Expand All @@ -100,6 +106,14 @@ type CgroupConfig struct {
ConfigDetail TMOConfigDetail `json:"configDetail"`
}

type PoolNameConfig struct {
// PoolName is a resource pool name, e.g. system, shared, reclaimed
PoolName string `json:"poolName"`

// ConfigDetail is configuration details of TMO
ConfigDetail TMOConfigDetail `json:"configDetail"`
}

type TMOConfigDetail struct {
// EnableTMO is whether to enable TMO on target objective
// +optional
Expand Down