From: David Miller <davem@davemloft.net>
To: netdev@vger.kernel.org
Cc: shemminger@linux-foundation.org
Subject: new NAPI quota synchronization issue
Date: Wed, 19 Sep 2007 09:58:25 -0700 (PDT) [thread overview]
Message-ID: <20070919.095825.39465358.davem@davemloft.net> (raw)
Ok, as has been hinted at with some postings from Krishna and others,
we still have some mutual exclusion issues in the new NAPI code.
In short, the napi->quota updates happen outside of the sections where
the code stream "owns" the napi_struct instance, so it can be modified
in parallel on multiple cpus, the n->quota can go negative, and the
quota bug checks trigger.
It just seems that gradually I'm reverting every single cleanup done
by Stephen in his original patch, first the list handling and now the
quota bits too :-)
Probably a good way to deal with this is to simply make the quota
handling stateless.
The only reason we handle partial quota usage is to handle the
global netdev_budget. But we can simply "round up" and let
netdev_budget get oversubscribed by one napi->quota's worth
if necessary.
At that point, n->quota only holds two states when used, full
and empty. And at that point there is no reason to maintain
it's value at all. Only the weight is necessary.
I'll try to post a patch which implements this later today.
next reply other threads:[~2007-09-19 16:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 16:58 David Miller [this message]
2007-09-19 17:35 ` new NAPI quota synchronization issue David Miller
2007-09-19 22:01 ` Stephen Hemminger
2007-09-19 22:10 ` 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=20070919.095825.39465358.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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