Skip to content

Conversation

@karthikvetrivel
Copy link
Member

@karthikvetrivel karthikvetrivel commented Jan 8, 2026

Relevant PRs:

Description

  • Implements userspace-only fast path install when kernel modules are already loaded with matching configuration
  • Checks if NVIDIA modules are loaded (/sys/module/nvidia/refcnt) and compares configuration digest
  • When match detected, performs userspace-only install (libraries/binaries) while skipping kernel module build/load
  • Stores digest after successful installation for future comparisons

}

_userspace_only_install() {
echo "Detected matching loaded driver & config (${DRIVER_VERSION}); performing userspace-only install"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
echo "Detected matching loaded driver & config (${DRIVER_VERSION}); performing userspace-only install"
echo "The NVIDIA driver is already loaded with the desired configuration, performing userspace-only install"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

# Check if fast path is being used - if so, skip building and signal completion
if _should_use_fast_path; then
echo "Fast path detected in DTK container: driver already loaded with matching config, skipping build"
echo "Signaling driver_built and sleeping forever..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "Signaling driver_built and sleeping forever..."
echo "Signaling driver_built to the main container and sleeping forever..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Comment on lines 754 to 758
if [ -f /sys/module/nvidia/refcnt ] && [ -f /run/nvidia/nvidia-driver.state ]; then
current_digest=$(_get_current_digest)
stored_digest=$(_read_stored_digest)

if [ -n "${current_digest}" ] && [ "${current_digest}" = "${stored_digest}" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the changes you made in rhel9, can we create a helper function to check if the fast-path install path should be taken or not? That will simplify the call-site here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the call-site, should look a bit cleaner here now.

@karthikvetrivel karthikvetrivel force-pushed the feat/operator-digest-driver-config branch from a9bde48 to 82123af Compare January 12, 2026 20:36
exit 0
}

_userspace_only_install() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this name would imply that it is "userspace only"

Suggested change
_userspace_only_install() {
_userspace_install() {


# Check if fast path should be used (driver already loaded with matching config)
# Compares current digest from DRIVER_CONFIG_DIGEST env var with stored digest
_should_use_fast_path() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this as the method name?

Suggested change
_should_use_fast_path() {
_should_skip_kernel_module_reload() {

OR invert the conditional statement and use the name below

Suggested change
_should_use_fast_path() {
_should_rebuild_kernel_module() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants