void-packages/srcpkgs/procps/patches/top_nohz.patch

15 lines
589 B
Diff
Raw Normal View History

Author: <fabbione@sunfire.int.fabbione.net>
Description: Handle idle time calculations correctly when running with NOHZ.
Index: b/top.c
===================================================================
--- a/top.c 2009-11-24 21:00:50.000000000 +1100
+++ b/top.c 2009-11-24 21:00:50.000000000 +1100
@@ -2916,6 +2916,7 @@
s_frme = cpu->s - cpu->s_sav;
n_frme = cpu->n - cpu->n_sav;
i_frme = TRIMz(cpu->i - cpu->i_sav);
+ if ((u_frme == 0) && (i_frme == 0)) i_frme = 100.0;
w_frme = cpu->w - cpu->w_sav;
x_frme = cpu->x - cpu->x_sav;
y_frme = cpu->y - cpu->y_sav;