[PATCH] lib: Debug flex proportions code

From: Jan Kara
Date: Mon Sep 24 2012 - 10:17:16 EST


Signed-off-by: Jan Kara <jack@xxxxxxx>
---
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


--9jxsPFA5p3P2qPhR--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/