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>
Mon, 27 Apr 2020 17:02:57 +0000 (18:02 +0100)
commit2c9bb704b6c650a71beddf8cff31ff694adcff14
tree08cb76010fcf3a9310cad9224348ebc9747e1616
parent5c6ebf660335f3d2760a30e9bce4a4dda21e1075
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