Netdev List
 help / color / mirror / Atom feed
* new NAPI quota synchronization issue
@ 2007-09-19 16:58 David Miller
  2007-09-19 17:35 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2007-09-19 16:58 UTC (permalink / raw)
  To: netdev; +Cc: shemminger


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-19 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19 16:58 new NAPI quota synchronization issue David Miller
2007-09-19 17:35 ` David Miller
2007-09-19 22:01   ` Stephen Hemminger
2007-09-19 22:10     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox