summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.8/60_top_nohz.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/procps-3.2.8/60_top_nohz.dpatch')
-rw-r--r--patches/procps-3.2.8/60_top_nohz.dpatch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/procps-3.2.8/60_top_nohz.dpatch b/patches/procps-3.2.8/60_top_nohz.dpatch
new file mode 100644
index 000000000..6b7390fdd
--- /dev/null
+++ b/patches/procps-3.2.8/60_top_nohz.dpatch
@@ -0,0 +1,18 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 60_top_nohz.dpatch by <fabbione@sunfire.int.fabbione.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle idle time calculations correctly when running with NOHZ.
+
+@DPATCH@
+diff -urNad procps-3.2.7~/top.c procps-3.2.7/top.c
+--- procps-3.2.7~/top.c 2006-06-25 08:41:48.000000000 +0200
++++ procps-3.2.7/top.c 2007-07-20 12:50:00.000000000 +0200
+@@ -2886,6 +2886,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;