hugepage

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	THPPath             = "/sys/kernel/mm/transparent_hugepage/"
	THPEnabledFile      = "enabled"
	THPShmemEnabledFile = "shmem_enabled"
	THPDefragFile       = "defrag"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewHugepageManager

func NewHugepageManager(ctx context.Context, THPPath string) (*Manager, error)

func (*Manager) ApplyConfig

func (h *Manager) ApplyConfig(thp *nodev1beta1.THPConfig) error

func (*Manager) GenerateStatus

func (h *Manager) GenerateStatus() (*nodev1beta1.HugepageStatus, error)

func (*Manager) GetDefaultTHPConfig

func (h *Manager) GetDefaultTHPConfig() *nodev1beta1.THPConfig

GetDefaultTHPConfig returns the system's current THP config, or if that fails, it returns sensible default values. This is to be used when first creating a Hugepage CR for a node so that the initial spec reflects the current state of the system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL