cgtop: Fix processing of controllers other than CPU
authorSzabolcs Fruhwald <sfruhwald@google.com>
Wed, 20 Feb 2019 20:38:50 +0000 (12:38 -0800)
committerMichael Biebl <biebl@debian.org>
Fri, 29 Jan 2021 14:16:06 +0000 (14:16 +0000)
commita3c495fb954d2e64da53991266649d9bbaf9fd55
treef75d9f8c1c4e6c9adfeb3b4b059b7d0d223a877e
parentbbd35b92f6527241bc9058cfc2f89e3b6eeb7262
cgtop: Fix processing of controllers other than CPU

After debugging the issue with gdb, I found that the following change

 94ddb08 "cgtop: Still try to get CPU statistics if controller-free"

has introduced a bug, which prevents process(..) method processing
memory and io controllers when cpu_accounting_is_cheap() is true.
The obvious fix is to move this branch to be the last one, keeping
the intended behavior of the above change, without having a negative
effect on the other controllers.

Fixes #11773 [systemd-cgtop no longer shows memory (and io) usage]

(cherry picked from commit 5fe74e893c7939a360dc4eb75dbf3f540526c968)

Gbp-Pq: Name cgtop-Fix-processing-of-controllers-other-than-CPU.patch
src/cgtop/cgtop.c