From: Jose Abreu <Jose.Abreu@synopsys.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Joao Pinto <Joao.Pinto@synopsys.com>
Subject: stmmac: Race in coalesce timer and NAPI
Date: Fri, 21 Sep 2018 10:19:45 +0100 [thread overview]
Message-ID: <dd4b67f1-5ce7-22e2-8fe5-8925ec016386@synopsys.com> (raw)
Hello,
I'm getting a race in stmmac coalesce timer and the
napi_schedule() interrupt and I'm asking for advice. Currently,
we are scheduling NAPI in coalesce timer but this leads to
stmmac_tx_clean() deadlock because this function tries to acquire
queue lock.
I find that this is not expected because only one instance of
NAPI should run at same time so I was wondering if it is possible
that xmit() callback is causing the deadlock ?
BTW, this is solved by:
- Directly call stmmac_tx_clean() in timer function AND
- Use netif_tx_trylock() in stmmac_tx_clean(). Then, if queue
is already locked we re-arm coalesce timer or reschedule NAPI.
This is easily reproducible in an ARM board with 8 core running
at 100MHz each.
Thanks and Best Regards,
Jose Miguel Abreu
next reply other threads:[~2018-09-21 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-21 9:19 Jose Abreu [this message]
2018-09-21 13:54 ` stmmac: Race in coalesce timer and NAPI Eric Dumazet
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=dd4b67f1-5ce7-22e2-8fe5-8925ec016386@synopsys.com \
--to=jose.abreu@synopsys.com \
--cc=Joao.Pinto@synopsys.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