kni: add build option to disable preempting
This patch introduces CONFIG_RTE_KNI_PREEMPT_DEFAULT flag. When set to 'no', KNI kernel thread(s) do not call schedule_timeout_interruptible(), which improves overall KNI performance at the expense of CPU cycles (polling). Default values is 'yes', maintaining the same behaviour as of now. Signed-off-by: Marc Sune <marc.sune@bisdn.de> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com>
This commit is contained in:
parent
6597fc642d
commit
16eaf25232
@ -377,6 +377,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=y
|
||||
# Compile librte_kni
|
||||
#
|
||||
CONFIG_RTE_LIBRTE_KNI=y
|
||||
CONFIG_RTE_KNI_PREEMPT_DEFAULT=y
|
||||
CONFIG_RTE_KNI_KO_DEBUG=n
|
||||
CONFIG_RTE_KNI_VHOST=n
|
||||
CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024
|
||||
|
@ -229,9 +229,11 @@ kni_thread_single(void *unused)
|
||||
}
|
||||
}
|
||||
up_read(&kni_list_lock);
|
||||
#ifdef RTE_KNI_PREEMPT_DEFAULT
|
||||
/* reschedule out for a while */
|
||||
schedule_timeout_interruptible(usecs_to_jiffies( \
|
||||
KNI_KTHREAD_RESCHEDULE_INTERVAL));
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -252,8 +254,10 @@ kni_thread_multiple(void *param)
|
||||
#endif
|
||||
kni_net_poll_resp(dev);
|
||||
}
|
||||
#ifdef RTE_KNI_PREEMPT_DEFAULT
|
||||
schedule_timeout_interruptible(usecs_to_jiffies( \
|
||||
KNI_KTHREAD_RESCHEDULE_INTERVAL));
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user