>From dd0947226a0d5868ba0c2b8808162898396035b7 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Mon, 24 Sep 2012 16:17:16 +0200 Subject: [PATCH] lib: Debug flex proportions code Signed-off-by: Jan Kara --- lib/flex_proportions.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c index c785554..f88f793 100644 --- a/lib/flex_proportions.c +++ b/lib/flex_proportions.c @@ -62,11 +62,13 @@ void fprop_global_destroy(struct fprop_global *p) */ bool fprop_new_period(struct fprop_global *p, int periods) { - u64 events; + s64 events; unsigned long flags; local_irq_save(flags); events = percpu_counter_sum(&p->events); + if (events < 0) + printk("Got negative events: %lld\n", (long long)events); /* * Don't do anything if there are no events. */ -- 1.7.1