cgtop: Fix processing of controllers other than CPU
authorSzabolcs Fruhwald <sfruhwald@google.com>
Wed, 20 Feb 2019 20:38:50 +0000 (12:38 -0800)
committerAdrian Bunk <bunk@debian.org>
Thu, 29 Jun 2023 13:57:02 +0000 (14:57 +0100)
commit2cba661c3cf5d21d245a0ae35aefc27665a9aabc
treee2d9d7e64258f30711d0c4d63683a9f78b174f80
parentd5bf37e91c8dea98a170fd5545483ddb1907a047
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