netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: krkumar2@in.ibm.com
Cc: netdev@vger.kernel.org, rdreier@cisco.com, general@lists.openfabrics.org
Subject: [ofa-general] Re: [Bug, PATCH and another Bug] Was: Fix refcounting problem with netif_rx_reschedule()
Date: Wed, 19 Sep 2007 09:05:57 -0700 (PDT)	[thread overview]
Message-ID: <20070919.090557.24612742.davem@davemloft.net> (raw)
In-Reply-To: <20070919115403.19455.65941.sendpatchset@K50wks273871wss.in.ibm.com>

From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Wed, 19 Sep 2007 17:24:03 +0530

> Note: during steps F-H and C-E, priv/napi is read/modified by both cpu's
> 	which is another bug relating to the same race.
> 
> I guess the above patch is not required if this bug (in IPoIB) is fixed?

The NAPI_STATE_SCHED flag bit should provide all of the necessary
synchornization.

Only the setter of that bit should add the NAPI instance to the
polling list.

The polling loop runs atomically on the cpu where the NAPI instance
got added to the per-cpu polling list.  And therefore decisions to
complete NAPI are serialized too.

That serialized completion decision is also when the list deletion
occurs.

I'm starting to suspect the whole problem comes from the resched
facility, and now I really don't blame Stephen for trying to delete
it.  Semantically it really makes things very difficult, especially
wrt. to the atomicity of the list handling.

  parent reply	other threads:[~2007-09-19 16:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 11:54 [Bug, PATCH and another Bug] Was: Fix refcounting problem with netif_rx_reschedule() Krishna Kumar
2007-09-19 13:23 ` Jan-Bernd Themann
2007-09-20  5:10   ` Krishna Kumar2
2007-09-20  5:12     ` David Miller
2007-09-20  5:54       ` [ofa-general] " Krishna Kumar2
2007-09-20 18:12         ` David Miller
2007-09-19 16:05 ` David Miller [this message]
2007-09-20  5:18   ` Krishna Kumar2
2007-09-20 18:12     ` [ofa-general] " 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.090557.24612742.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=general@lists.openfabrics.org \
    --cc=krkumar2@in.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdreier@cisco.com \
    /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).