<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Developer Documentation on DRA Driver for CPU</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/</link><description>Recent content in Developer Documentation on DRA Driver for CPU</description><generator>Hugo</generator><language>en</language><atom:link href="https://dra-driver-cpu.sigs.k8s.io/docs/dev/index.xml" rel="self" type="application/rss+xml"/><item><title>Testing</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/testing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/testing/</guid><description>&lt;p&gt;&lt;span id="testing"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="running-the-tests"&gt;Running the tests&lt;/h2&gt;
&lt;h3 id="unit-tests"&gt;Unit Tests&lt;/h3&gt;
&lt;p&gt;To run the node-local unit tests, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make test-unit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="chart-render-tests"&gt;Chart render tests&lt;/h3&gt;
&lt;p&gt;To check what the Helm chart renders, without a cluster, run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make helm-render-check
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;hack/ci/helm-render-check.sh&lt;/code&gt; renders each case and hands the DaemonSet to the
validator in &lt;code&gt;test/render&lt;/code&gt;. It needs Helm and the project&amp;rsquo;s Go toolchain, but no
cluster. The cluster-side counterpart is the &lt;code&gt;helm e2e&lt;/code&gt; workflow, which installs
the chart against both the default and a relocated kubelet root.&lt;/p&gt;</description></item><item><title>Linting</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/linting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/linting/</guid><description>&lt;p&gt;&lt;span id="linting"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Run the linter against the codebase:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;make lint
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To automatically fix lint issues, pass &lt;code&gt;--fix&lt;/code&gt; via the &lt;code&gt;GOLANGCI_LINT_EXTRA_ARGS&lt;/code&gt; variable:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GOLANGCI_LINT_EXTRA_ARGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;--fix make lint
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;GOLANGCI_LINT_EXTRA_ARGS&lt;/code&gt; is forwarded verbatim to &lt;code&gt;golangci-lint run&lt;/code&gt;, so any other supported flags can be passed the same way.&lt;/p&gt;</description></item><item><title>Logging Guidelines</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/logging/</guid><description>&lt;p&gt;&lt;span id="logging-guidelines"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="picking-a-verbosity-level"&gt;picking a verbosity level&lt;/h2&gt;
&lt;p&gt;V(0): high-signal operational logs and errors always visible at default verbosity
V(2): normal operation, important decisions, summary, container lifecycle
V(4): allocation internals, fine details about decisions
V(6): debug messages, very fine details, mostly for developers&lt;/p&gt;
&lt;p&gt;V(7) or more is reserved for future usage.&lt;/p&gt;
&lt;h2 id="when-to-use-error"&gt;when to use Error()&lt;/h2&gt;
&lt;p&gt;Summary: use Error() if we need to log an unrecoverable error which leads
to a failed state, not to a degraded-but-operational state.&lt;/p&gt;</description></item><item><title>Configuration Guidelines</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/configuration/</guid><description>&lt;p&gt;&lt;span id="adding-configuration-tunables"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The configurable behavior of the DRA CPU driver can be changed using two approaches:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;command line flags&lt;/li&gt;
&lt;li&gt;configuration file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The preferred way to add or extend the configurable behavior is through the
configuration file. The reasons why we prefer this approach are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;user friendliness: adding options quickly makes the command line long and awkward&lt;/li&gt;
&lt;li&gt;auditable, reviewable artifact: the configuration file can be versioned, compared
and verified more easily&lt;/li&gt;
&lt;li&gt;extensibility: it&amp;rsquo;s usually easier to process configuration files with programs
than command line options&lt;/li&gt;
&lt;li&gt;configuration files are easier to version and evolve compatibly than command
line flags.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Configuration values are applied incrementally:&lt;/p&gt;</description></item><item><title>Deep Dive: Cgroup v2, QoS Classes, and CPU Enforcement in Kubernetes</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/kubelet-cgroups-and-qos/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/kubelet-cgroups-and-qos/</guid><description>&lt;p&gt;&lt;span id="deep-dive-cgroup-v2-qos-classes-and-cpu-enforcement-in-kubernetes"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This document provides a technical deep-dive into how Kubernetes organizes Linux control groups under &lt;strong&gt;cgroup v2&lt;/strong&gt;, calculates and applies Quality of Service (QoS) classes, manages cgroup hierarchies at node, QoS, pod, and container levels, and enforces CPU allocations. It also documents the architectural relationship between Kubelet&amp;rsquo;s cgroup management and out-of-tree Dynamic Resource Allocation (DRA) drivers such as &lt;code&gt;dra-driver-cpu&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="1-the-linux-cgroup-v2-hierarchy-in-kubernetes"&gt;1. The Linux Cgroup v2 Hierarchy in Kubernetes&lt;/h2&gt;
&lt;p&gt;Under cgroup v2 with the &lt;code&gt;systemd&lt;/code&gt; cgroup driver, Kubernetes organizes container processes into a strictly hierarchical tree under &lt;code&gt;/sys/fs/cgroup/kubepods.slice&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Deep dive: how linux reports topology attributes</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/topology-linux-sysfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/topology-linux-sysfs/</guid><description>&lt;p&gt;&lt;span id="deep-dive-how-linux-reports-topology-attributes"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;disclosure: this document was created with AI assistance.
The research was human-steered by LLM-operated; the document was then reviewed by humans
for correctness and edited extensively.&lt;/p&gt;
&lt;p&gt;This document assumes kernel code, architecture and hardware management knowledge.&lt;/p&gt;
&lt;p&gt;This document tries to be architecture agnostic whenever possible, but the author can only claim sufficient
knowledge about the &lt;code&gt;x86_64&lt;/code&gt; architecture.
The reader must assume the &amp;ldquo;silicon&amp;rdquo; and hardware is assumed to be &lt;code&gt;x86_64&lt;/code&gt; unless clearly specified otherwise.&lt;/p&gt;</description></item><item><title>Deep dive: finding and exploring PCI/PCIe root buses</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/pci-bus-linux-sysfs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/pci-bus-linux-sysfs/</guid><description>&lt;p&gt;&lt;span id="deep-dive-finding-and-exploring-pcipcie-root-buses"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;disclosure: this document was created with AI assistance.
The research was human-steered by LLM-operated; the document was then reviewed by humans
for correctness and edited extensively.&lt;/p&gt;
&lt;p&gt;This document assumes kernel code, architecture and hardware management knowledge.&lt;/p&gt;
&lt;p&gt;This document tries to be architecture agnostic whenever possible, but the author can only claim sufficient
knowledge about the &lt;code&gt;x86_64&lt;/code&gt; architecture.
The reader must assume the &amp;ldquo;silicon&amp;rdquo; and hardware is assumed to be &lt;code&gt;x86_64&lt;/code&gt; unless clearly specified otherwise.&lt;/p&gt;</description></item><item><title>SMT layout encoding</title><link>https://dra-driver-cpu.sigs.k8s.io/docs/dev/smt-layout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://dra-driver-cpu.sigs.k8s.io/docs/dev/smt-layout/</guid><description>&lt;p&gt;&lt;span id="smt-layout-encoding"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;dra.cpu/smtLayout&lt;/code&gt; is a compact representation of logical-CPU sibling pairs.&lt;/p&gt;
&lt;p&gt;We reserve the option to version the encoding, adding new versions with
the &lt;code&gt;Vxxx&lt;/code&gt; suffix appended. The reason for this decision is because,
albeit aiming to be correct and completed, the encoding format didn&amp;rsquo;t
get sufficient testing and validation to be called confidently final.
Therefore we version to enable smooth future upgrades.
Users should consider then unversioned name &lt;code&gt;dra.cpu/smtLayout&lt;/code&gt; effectively
as synonym for &lt;code&gt;V1&lt;/code&gt;.
The V1 format represents only two-way SMT; see the user-facing
&lt;a href="https://dra-driver-cpu.sigs.k8s.io/docs/user/device-attributes/"&gt;attribute reference&lt;/a&gt; for more details.&lt;/p&gt;</description></item></channel></rss>