Re: [PATCH] kernel: add system_energy_efficiency syscall (nr 337)
From: Greg KH
Date: Sun Sep 20 2026 - 06:21:39 EST
On Sun, Sep 20, 2026 at 06:07:13PM +0800, 林濬哲 wrote:
> Add a new syscall that reports GPU presence and system-wide
> energy information:
>
> - mode 0: returns the number of display devices found on the PCI bus
> - mode 1: returns an energy efficiency metric; prefers the real GPU
> power reported through hwmon, falls back to runtime PM status
> weights, plus the online CPU count
> - mode 2: returns the real-time GPU power in milliwatts read from
> the hwmon power1_input channel exposed by GPU drivers
> (amdgpu/nouveau/radeon/nvidia); returns 0 if not reported
Cute, but you missed a bunch of other gpu drivers, AND all of this can
be done today from userspace, no syscall is needed, right?
thanks,
greg k-h