File 0005-use-cond_resched-rather-than-schedule_timeout_interr.patch of Package dpdk.8207
From ff22f273d7b6437029357936bb08112d0eb349b7 Mon Sep 17 00:00:00 2001
From: Nirmoy Das <ndas@suse.de>
Date: Tue, 20 Feb 2018 10:33:49 +0100
Subject: [PATCH] use cond_resched rather than schedule_timeout_interruptible
this will remove latency just as well, but will allow other kernel
threads (with higher priorities) to run on the core as needed.
---
lib/librte_eal/linuxapp/kni/kni_misc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
index 497db9b..02ba8ff 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -151,8 +151,7 @@ kni_thread_single(void *data)
up_read(&knet->kni_list_lock);
#ifdef RTE_KNI_PREEMPT_DEFAULT
/* reschedule out for a while */
- schedule_timeout_interruptible(
- usecs_to_jiffies(KNI_KTHREAD_RESCHEDULE_INTERVAL));
+ cond_resched();
#endif
}
@@ -175,8 +174,7 @@ kni_thread_multiple(void *param)
kni_net_poll_resp(dev);
}
#ifdef RTE_KNI_PREEMPT_DEFAULT
- schedule_timeout_interruptible(
- usecs_to_jiffies(KNI_KTHREAD_RESCHEDULE_INTERVAL));
+ cond_resched();
#endif
}
--
2.16.1