'Unreasonably long poll interval's are reasonable for PMD threads.
Also reporting of high CPU usage is not necessary.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
return n_cores > 0 ? n_cores : 0;
}
+
+/* Returns 'true' if current thread is PMD thread. */
+bool
+thread_is_pmd(void)
+{
+ const char *name = get_subprogram_name();
+ return !strncmp(name, "pmd", 3);
+}
+
\f
/* ovsthread_key. */
/* Useful functions related to threading. */
int count_cpu_cores(void);
+bool thread_is_pmd(void);
#endif /* ovs-thread.h */
cpu_usage = get_cpu_usage();
if (VLOG_IS_DBG_ENABLED()) {
level = VLL_DBG;
- } else if (cpu_usage > 50 && !VLOG_DROP_INFO(&rl)) {
+ } else if (cpu_usage > 50
+ && !thread_is_pmd()
+ && !VLOG_DROP_INFO(&rl)) {
level = VLL_INFO;
} else {
return;
time_init();
coverage_clear();
coverage_run();
- if (*last_wakeup) {
+ if (*last_wakeup && !thread_is_pmd()) {
log_poll_interval(*last_wakeup);
}
start = time_msec();