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>
Tue, 20 Aug 2019 11:50:42 +0000 (12:50 +0100)
commit1f6bea50a62a7fb4e92d809c77f5ca4d74e14262
treed6651e04222ca3c621b8e01e62632d23a1f541b4
parent9392b01d0dda0dfe4c6e2acd449c6860dd2ba236
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