From: Carsten Emde <C.Emde@osadl.org>
To: "Nebojša Ćosić" <nebojsa@asnn.org>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: UDP jitter
Date: Tue, 30 Apr 2013 17:22:13 +0200 [thread overview]
Message-ID: <517FE1A5.1090702@osadl.org> (raw)
In-Reply-To: <20130429222238.2b440d8c@sanja.asnn.org>
Hi Nebojša,
> I am doing some work on a product running kernel 2.6.33.7.2-rt30.
> Applications running on this kernel are a bit specific, meaning that
> there are a number of threads running on a different priorities.
> For a several months I was haunted with spurious jitter, detected on
> UDP messages - multicast UDP messages where received on originating
> node without any delay, but on other nodes a delay in range of 10s of
> milliseconds was detected. Simply, it looked like a message was stuck
> in kernel before finally getting transmitted.
> Finally, thanks to LTTng tool, I was able to locate the problem down to
> this peace of code in net/sched/sch_generic.c:
>
> int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q,
> struct net_device *dev, struct netdev_queue *txq,
> spinlock_t *root_lock)
> {
> int ret = NETDEV_TX_BUSY;
>
> /* And release qdisc */
> spin_unlock(root_lock);
>
> HARD_TX_LOCK(dev, txq);
>
> if (!netif_tx_queue_stopped(txq) && !netif_tx_queue_frozen(txq))
> ret = dev_hard_start_xmit(skb, dev, txq);
>
>
> HARD_TX_UNLOCK(dev, txq);
>
> spin_lock(root_lock);
> ...
>
> When transmit queue is empty, thread wanting to send a message comes
> directly to sch_direct_xmit, without changing context. It then releases
> spin lock, and than takes another. So far so good.
> If this starting thread is of lower priority, it can be preempted by
> another thread, while still being in dev_hard_start_xmit function
> This thread will check if HARD_TX_LOCK is taken, and if so, go on and
> queue its own message.
> If there are enough higher priority tasks, tx can be stalled
> indefinitely. [..]
Did you increase the priority of the related sirq-net-tx and sirq-net-rx
kernel threads appropriately? Some more details on enabling real-time
Ethernet are given here -> https://www.osadl.org/?id=930.
-Carsten.
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-04-30 15:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 20:22 UDP jitter Nebojša Ćosić
2013-04-30 15:22 ` Carsten Emde [this message]
2013-04-30 17:26 ` Nebojša Ćosić
2013-11-06 8:53 ` AW: " eg Engleder Gerhard
2013-11-06 11:57 ` Nebojša Ćosić
2013-11-06 19:07 ` Thomas Gleixner
2013-11-07 8:00 ` AW: " eg Engleder Gerhard
2013-11-07 9:33 ` Nebojša Ćosić
2013-11-08 2:07 ` Thomas Gleixner
2013-11-08 9:39 ` Stanislav Meduna
2013-11-08 10:32 ` Nebojša Ćosić
2013-11-08 11:48 ` Thomas Gleixner
2013-11-08 12:22 ` Armin Steinhoff
2013-11-08 18:57 ` E-Blokos
2013-11-08 10:50 ` Tom Cook
2013-11-08 10:51 ` AW: " eg Engleder Gerhard
2013-11-08 11:30 ` Thomas Gleixner
2013-11-08 12:07 ` AW: " eg Engleder Gerhard
2013-11-08 13:35 ` Thomas Gleixner
2013-11-09 10:26 ` Nebojša Ćosić
2013-11-09 16:33 ` Joe Korty
2013-11-08 12:14 ` Stanislav Meduna
2013-11-08 13:32 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517FE1A5.1090702@osadl.org \
--to=c.emde@osadl.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=nebojsa@asnn.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.