From: Matt Mackall <mpm@selenic.com>
To: DDD <Dongdong.deng@windriver.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] netpoll: fix race between skb_queue_len and skb_dequeue
Date: Tue, 08 Sep 2009 12:27:05 -0500 [thread overview]
Message-ID: <1252430825.7145.55.camel@calx> (raw)
In-Reply-To: <1252396189.16528.19.camel@dengdd-desktop>
On Tue, 2009-09-08 at 15:49 +0800, DDD wrote:
> This race will break the messages order.
>
> Sequence of events in the problem case:
>
> Assume there is one skb "A" in skb_queue and the next action of
> netpoll_send_skb() is: sending out "B" skb.
> The right order of messages should be: send A first, then send B.
>
> But as following orders, it will send B first, then send A.
I would say no, the order of messages A and B queued on different CPUs
is undefined. The only issue is that we can queue a message A on CPU0,
then causally trigger a message on CPU1 B that arrives first. But bear
in mind that the message A >>may never arrive<< because the message is
about a lockup that kills processing of delayed work.
Generally speaking, queueing should be a last ditch effort. We should
instead aim to deliver all messages immediately, even if they might be
out of order. Because out of order is better than not arriving at all.
--
http://selenic.com : development and support for Mercurial and Linux
next prev parent reply other threads:[~2009-09-08 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-08 7:49 [PATCH 1/1] netpoll: fix race between skb_queue_len and skb_dequeue DDD
2009-09-08 17:27 ` Matt Mackall [this message]
2009-09-09 14:27 ` DDD
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=1252430825.7145.55.camel@calx \
--to=mpm@selenic.com \
--cc=Dongdong.deng@windriver.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).