Documentation
¶
Index ¶
- func LimitsToString(lls []Limit) string
- func SetSystemLimits(lh logr.Logger, cgPath string, limits []Limit) error
- type Limit
- func LimitsFromAllocations(lh logr.Logger, machineData sysinfo.MachineData, allocs []types.Allocation) []Limit
- func LimitsFromSystemPID(lh logr.Logger, machineData sysinfo.MachineData, procRoot string, pid int) ([]Limit, error)
- func LimitsFromSystemPath(lh logr.Logger, machineData sysinfo.MachineData, cgPath string) ([]Limit, error)
- func SumLimits(lla, llb []Limit) []Limit
- type LimitValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LimitsToString ¶
Types ¶
type Limit ¶
type Limit struct {
// The value of PageSize has the format <size><unit-prefix>B (2MB, 1GB),
// and must match the <hugepagesize> of the corresponding control file found in `hugetlb.<hugepagesize>.limit_in_bytes`.
// The values of <unit-prefix> are intended to be parsed using base 1024("1KB" = 1024, "1MB" = 1048576, etc).
PageSize string `json:"pageSize"`
// limit in bytes of hugepagesize HugeTLB usage.
Limit LimitValue `json:"limit"`
}
Limit is a Plain-Old-Data struct we carry around to do our computations; this way we can set `runtimeapi.HugepageLimit` once and avoid copies.
func LimitsFromAllocations ¶
func LimitsFromAllocations(lh logr.Logger, machineData sysinfo.MachineData, allocs []types.Allocation) []Limit
func LimitsFromSystemPID ¶
func LimitsFromSystemPath ¶
type LimitValue ¶
func (LimitValue) Add ¶
func (lv LimitValue) Add(x LimitValue) LimitValue
func (LimitValue) Clone ¶
func (lv LimitValue) Clone() LimitValue
Directories
¶
| Path | Synopsis |
|---|---|
|
api/v0
* Copyright 2025 The Kubernetes Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
|
* Copyright 2025 The Kubernetes Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |
Click to show internal directories.
Click to hide internal directories.