fix(xsysinfo): read process VRAM without proc children (#12482)

* fix(xsysinfo): read process VRAM without proc children

Kernels without CONFIG_PROC_CHILDREN have no task children file, so
ProcessVRAM dropped every DRM reading. When that file is missing, walk
child processes from /proc/<pid>/stat ppid links instead. Other read
errors still drop the reading.

Fixes #12481

Signed-off-by: leilei3167 <imleilei123@gmail.com>

* docs(system): describe the proc children fallback

Document VRAM reporting on kernels without CONFIG_PROC_CHILDREN.

Assisted-by: Codex:GPT-6

---------

Signed-off-by: leilei3167 <imleilei123@gmail.com>
Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
This commit is contained in:
leilei3167andlocalai-org-maint-bot authored and GitHub committed 2026-10-05 01:37:12 +02:00
1 parent 104c2fb440
commit d90f703bd9
3 files changed
+116 -18

No files matched your search

+4
View File
@@ -40,6 +40,10 @@ to the backend, without separating weights, KV cache, and other allocations.
See the [kernel DRM accounting specification](https://docs.kernel.org/gpu/drm-usage-stats.html)
for these counters.
Kernels without `CONFIG_PROC_CHILDREN` are supported. When `/proc` does not
provide per-thread `children` files, LocalAI finds child processes through
the parent PIDs in `/proc/<pid>/stat`.
The field is omitted when accounting is unavailable or incomplete. This
includes external and distributed backends, macOS, proprietary NVIDIA
drivers, primary DRM nodes (`/dev/dri/card*`), missing resident counters,