/*
- * Copyright (c) 2008, 2009, 2010 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
now = time_msec();
interval = MIN(10000, now - last_wakeup) << 4;
- /* Warn if we took too much time between polls. */
- if (n_samples > 10 && interval > mean_interval * 8) {
+ /* Warn if we took too much time between polls: at least 50 ms and at least
+ * 8X the mean interval. */
+ if (n_samples > 10 && interval > mean_interval * 8 && interval > 50 * 16) {
struct rusage rusage;
getrusage(RUSAGE_SELF, &rusage);