From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, eilong@broadcom.com, jhs@mojatatu.com,
herbert@gondor.apana.org.au
Subject: Re: [PATCH net-next 2/2] bnx2x: use the default NAPI weight
Date: Wed, 06 Mar 2013 14:59:47 -0500 (EST) [thread overview]
Message-ID: <20130306.145947.1445904594058156164.davem@davemloft.net> (raw)
In-Reply-To: <1362553398.15793.168.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 05 Mar 2013 23:03:18 -0800
> On Tue, 2013-03-05 at 23:37 -0500, David Miller wrote:
>
>> Thanks for the explanation.
>>
>> Since you haven't completely resolved the issues you were running into
>> I'll target this to net-next for now.
>
> Thanks David
>
> An other issue is the spin_trylock() attempted in net_tx_action()
>
> It seems we can miss a qdisc_run(), and have to wait the following
> NET_TX softirq(s) to send more data. NET_RX being interleaved, we can
> have to wait a long time (not mentioning other softirq handlers like
> RCU ...)
>
> I might be too tired right now, but cant see the reason of the trylock.
>
> qdisc lock is already BH safe, so we should do a spinlock
...
> @@ -3201,22 +3201,11 @@ static void net_tx_action(struct softirq_action *h)
> head = head->next_sched;
>
> root_lock = qdisc_lock(q);
> - if (spin_trylock(root_lock)) {
> - smp_mb__before_clear_bit();
> - clear_bit(__QDISC_STATE_SCHED,
> - &q->state);
> - qdisc_run(q);
> - spin_unlock(root_lock);
I think this trylock is intentional, but not to deal with BH safeness,
but rather to allow another cpu already processing the qdisc to
continue doing so.
I think this is what Jamal's amazing flash animations back at netconf
in Toronto were all about :-)
Herbert Xu and Jamal have touched upon this issue several times in
the past.
next prev parent reply other threads:[~2013-03-06 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 1:57 [PATCH net-next 2/2] bnx2x: use the default NAPI weight Eric Dumazet
2013-03-06 2:09 ` David Miller
2013-03-06 3:28 ` Eric Dumazet
2013-03-06 4:37 ` David Miller
2013-03-06 7:03 ` Eric Dumazet
2013-03-06 19:59 ` David Miller [this message]
2013-03-06 21:52 ` Eric Dumazet
2013-03-10 8:38 ` Herbert Xu
2013-03-11 6:14 ` Eric Dumazet
2013-03-06 4:59 ` David Miller
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=20130306.145947.1445904594058156164.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=jhs@mojatatu.com \
--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).