nvhost-ctrl (/dev/nvhost-ctrl) not available with OOT modules on mainline kernel (kernel 6.18, Jetson Orin NX) #2198
Replies: 6 comments 4 replies
|
If I'm not mistaken, all the device hierarchy has been changing here for quite some time, in favor of a new heirarchy, for example the gpu drivers moving from /dev/nvhost-ctrl-gpu to /dev/nvgpu/igpu0/ctrl, and no central /dev/nvhost-ctrl device is supposed to exist at all. Can you help me locate where in the downstream kernel sources this device is being set up? If you move to the 5.15 kernel from jetpack (mirrored here https://github.com/OE4T/linux-jammy-nvidia-tegra, |
|
I just realized I have a Jetpack 6 flashed orin nx available to me, and I checked the device nodes there: I think this issue has some measure of AI hallucinations going on with it. The syncpt interface for Jetpack 6 (provided by NVIDIA's out of tree gpu driver, the same one we're building in OE4T) has been moved to /dev/host1x-fence and has a new polling API associated with it. CUDA should know how to deal with this. And if it doesn't, it's not something we can really address here. |
|
"OOT" just stands for "out-of-tree".. the driver code is all NVIDIA's, and the repos you are pulling the code from are simply work-in-progress trees we used for integration into our OpenEmbedded/Yocto builds. The definitive sources, and current patches, are enumerated in the bitbake recipes here. NVIDIA has not yet published sources for their out-of-tree drivers that are compatible with recent kernels yet, so the extra 60+ patches we apply on top of the R36.5 sources are combinations of back-ports from their R38.4 out-of-tree drivers, and community contributions to deal with build and runtime issues we've discovered. I have zero knowledge of Talos Linux, how it builds, or how it integrates the Jetson Linux runtime packages, kernel, etc. All I can suggest is to use Jetson Linux directly and refer to the Bring Your Own Kernel documentation that NVIDIA provides there, or to try some Yocto builds using our demo distro (our master and wrynose branches default to using the 6.18 linux-yocto kernel). You'll at least have something that works to compare against, and then you can do some side-by-side analysis of where you got your integration wrong. |
Oh, is that why the problem statement sounded so authoritative and yet was so wrong? I should have picked up on that. |
|
I went ahead and converted this issue to a discussion. It's fair to ask questions here and get help debugging an issue with the application (at least to the extent we can assist with that here), but at this point I don't see anything implicating the work specific to building OE4T. |
|
Thanks for the detailed responses. I should clarify the setup, and then provide concrete data rather than assertions. Setup: Talos Linux (immutable OS, mainline kernel 6.18.24) + OE4T OOT modules ( On the "AI hallucinations" comment: I understand the skepticism, but the claims in the issue are based on empirical observation on real hardware. Here is the evidence: 1. 2. The library actively opens it during inference: Two 3. Performance delta is real:
On kekiefer's JetPack 6 device listing: On madisongh's suggestion to use BYOK or demo-distro for comparison: Fair point. I am aware the OE4T repos are WIP Yocto trees. The reason I am using them is that they are the only publicly available kernel 6.18 source with GA10B support. I am not asking OE4T to support Talos Linux. The question is narrower: is |
Uh oh!
There was an error while loading. Please reload this page.
Summary
When running the OE4T OOT driver stack (
linux-nvgpu+linux-nv-oot) on a mainline-based kernel (kernel 6.18, Talos Linux),/dev/nvhost-ctrlis not created. The JetPack 6 CUDA runtime (libnvrm_host1x.so) requires this device for interrupt-drivencudaStreamSynchronize— without it, CUDA falls back to CPU polling, causing a significant throughput regression on inference workloads (~7 tok/s vs. ~60 tok/s for qwen3:4b on Jetson Orin NX 16GB).Background
On a standard JetPack installation,
/dev/nvhost-ctrlis provided by NVIDIA's downstream kernel (nvidia-t23x-kernel, in-treenvhost). With OOT modules + mainline kernel, the device does not exist.The OOT
nvgpu.kodriver integrates with the OE4T host1x subsystem for GPU compute, but the/dev/nvhost-ctrlcharacter device with theNVHOST_IOCTL_CTRL_SYNCPT_WAITMEXioctl is not part of the OOT package.ioctls used by libnvrm_host1x.so
The JetPack 6 CUDA runtime calls these 8 ioctls on
/dev/nvhost-ctrl:NVHOST_IOCTL_CTRL_GET_VERSIONNVHOST_IOCTL_CTRL_SYNCPT_READNVHOST_IOCTL_CTRL_SYNCPT_READ_MAXNVHOST_IOCTL_CTRL_SYNCPT_WAITMEX(interrupt-driven viadma_fence)NVHOST_IOCTL_CTRL_SYNC_FENCE_CREATENVHOST_IOCTL_CTRL_GET_CHARACTERISTICSNVHOST_IOCTL_CTRL_POLL_FD_CREATENVHOST_IOCTL_CTRL_SYNC_FILE_EXTRACTThe most critical is
SYNCPT_WAITMEX: it implements interrupt-driven syncpoint waiting usingdma_fence/host1x_fence. Without it, the CUDA runtime polls via CPU semaphore, causing the throughput regression.Current workaround
We developed a small shim module (
nvhost_ctrl_shim.c) that creates/dev/nvhost-ctrland implements these 8 ioctls backed by the OE4T host1x syncpoint API. This is currently included in a Talos Linux kernel package PR: siderolabs/pkgs#1518.The siderolabs maintainer (@dsseng) suggested getting community review from OE4T before merging — hence this issue.
Questions
Is there a roadmap for supporting
/dev/nvhost-ctrlin the OOT module stack for mainline kernel deployments? Would it make sense to integrate this functionality intolinux-nvgpuor as a separate OOT module?Does the shim approach (implementing the ioctls via OE4T host1x API) look reasonable? Are there known issues with this interface on GA10B / Tegra234?
Is there a preferred upstream path for this functionality?
We're happy to contribute — whether that means contributing the shim code to OE4T, integrating into an existing module, or following a different approach.
Related
Also tracking: OE4T's conftest infrastructure (
linux-nv-oot) does not yet detect kernel 6.18 APIs correctly when building withLLVM=1/ Clang. Currently worked around in siderolabs/pkgs#1518 via forced macro overrides infixup.sh. Would appreciate guidance on where to upstream the kernel 6.18 conftest fixes (sincelinux-nv-oothas issues disabled).All reactions