mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-10 07:47:29 -04:00
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:
1 parent
104c2fb440
commit
d90f703bd9
3 files changed
+116
-18
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user