[dpdk-users] KNI with RTE_KNI_PREEMPT_DEFAULT=n causes CPU soft-lockup

Jay Rolette rolette at infinite.io
Mon Nov 27 13:36:21 CET 2017


That shouldn't cause soft-lockups, but IIRC, there have been KNI bugs in
that past that would. Probably worth checking whatever version of DPDK you
are running vs. the tree for relevant fixes.

Given what you are looking into, this thread may be of interest:

http://dpdk.org/ml/archives/dev/2015-June/018858.html

Jay

On Sun, Nov 26, 2017 at 7:27 PM, junlee <lijun422 at gmail.com> wrote:

> Hi,
>
> We are testing KNI performance and finds the schedule_timeout_interruptible
> causes extra latency for packets.
>
> We tried to set RTE_KNI_PREEMPT_DEFAULT=n to reduce the latency, but ends
> up with CPU soft-lockup.
>
> Anybody knows how to make this work?
>
> static int
> kni_thread_single(void *data)
> {
> struct kni_net *knet = data;
> int j;
> struct kni_dev *dev;
>
> while (!kthread_should_stop()) {
> down_read(&knet->kni_list_lock);
> for (j = 0; j < KNI_RX_LOOP_NUM; j++) {
> list_for_each_entry(dev, &knet->kni_list_head, list) {
> kni_net_rx(dev);
> kni_net_poll_resp(dev);
> }
> }
> 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));
> #endif
> }
>
> return 0;
> }
>
> Thanks.
>


More information about the users mailing list