From 5533e49e2c090b651748c5a98efcf5111d8542cb Mon Sep 17 00:00:00 2001 From: "Ian K. Coolidge" Date: Tue, 3 Jan 2023 17:16:11 +0000 Subject: [PATCH] cpuset: Add package comment Describe use cases (node IDs, HT siblings, etc) Call out novelty (Linux CPU list parse/dump) Describe future work (relax immutable, refactor to use 'set') --- pkg/kubelet/cm/cpuset/cpuset.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/kubelet/cm/cpuset/cpuset.go b/pkg/kubelet/cm/cpuset/cpuset.go index a0f6a78361c..4c910d334a2 100644 --- a/pkg/kubelet/cm/cpuset/cpuset.go +++ b/pkg/kubelet/cm/cpuset/cpuset.go @@ -14,6 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package cpuset represents a collection of CPUs in a 'set' data structure. +// +// It can be used to represent core IDs, hyper thread siblings, CPU nodes, or processor IDs. +// +// The only special thing about this package is that +// methods are provided to convert back and forth from Linux 'list' syntax. +// See http://man7.org/linux/man-pages/man7/cpuset.7.html#FORMATS for details. +// +// Future work can migrate this to use a 'set' library, and relax the dubious 'immutable' property. package cpuset import (