>
> The processors shown were not necessarily the ones running the load,
> easily seen by not matching temp and speed measurements.
>

Oh yes, I agree, that's annoying. More annoying than seeing the unused CPUs
actually.

However the situation of the OP in issue
https://github.com/htop-dev/htop/issues/1195, which has "caused" the patch,
is slightly different.
OP seems to be using LXD with just a CPU limit set but with random threads
and no fixed CPU assignment.
In my situation I have assigned a specific set of cpu's (e.g. 6-7) to the
LXC container.
Here htop represents the correct CPU usage. Compared CPU usage on host and
inside container with htop 3.2.2 (source) and htop 3.2.2 (deb) and they
show the same values (with some millisecond diffs of course).
You can find both htop 3.2.2 from source and from deb package running in
parallel inside the same container:
https://www.claudiokuenzler.com/media/htop-3.2.2-comparison.png

Now the question is whether or not this situation is somehow detectable. Is
there some "knowledge" inside the container that there are fixed cpu
threads assigned to the container or are these randomly assigned threads?
But this is a discussion which is out of scope of Debian and should be
discussed in htop upstream. Maybe also include Stephane Graber or someone
from the LXC maintainers in the discussion.

I let you close this Debian bug now, as I agree, in a situation with random
cpu threads the htop cpu usage can be wrong and this is worse than seeing
all cpu threads from the host.

Reply via email to