All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: benh@kernel.crashing.org
Cc: netdev@vger.kernel.org, Roland Dreier <rdreier@cisco.com>,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi	poll
Date: Tue, 16 Oct 2007 23:16:52 -0400	[thread overview]
Message-ID: <47157EA4.1000500@garzik.org> (raw)
In-Reply-To: <1192589522.11899.130.camel@pasglop>

Benjamin Herrenschmidt wrote:
> net: Add __napi_synchronize() to sync with napi poll
> 
> The EMAC driver which needs to handle multiple devices with one
> NAPI instance implements its own per-channel disable bit. However,
> when setting such a bit, it needs to synchronize with the poller
> (that is make sure that any pending poller instance has completed,
> or is started late enough to see that disable bit).
> 
> This implements a low level __napi_synchronize() function to acheive
> that. The underscores are to emphasis the low level aspect of it and
> to discourage driver writers who don't know what they are doing to
> use it (to please DaveM :-)
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> Switched to do a cpu_relax() spin instead and only on SMP. Not that
> we have an smp_mb() in there which synchronize_irq() lacks. I believe
> this is a bug in synchronize_irq() which I'll handle separately.
> 
> Note: unfortunately, Jeff already picked up the EMAC patch without
> waiting for this to be sorted out (oops...). So if you agree with
> this patch, it would be nice to have it go in quickly or maybe via
> Jeff's tree to avoid breakage ? Not terribly important tho.


Sorry, I thought that was the way everybody was headed.  With the driver 
broken /anyway/, I just sorta threw it into the pile of fixes.

It's upstream now, so let me know if you want to revert or move forward 
from here...

	Jeff

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Garzik <jeff@garzik.org>
To: benh@kernel.crashing.org
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Roland Dreier <rdreier@cisco.com>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi	poll
Date: Tue, 16 Oct 2007 23:16:52 -0400	[thread overview]
Message-ID: <47157EA4.1000500@garzik.org> (raw)
In-Reply-To: <1192589522.11899.130.camel@pasglop>

Benjamin Herrenschmidt wrote:
> net: Add __napi_synchronize() to sync with napi poll
> 
> The EMAC driver which needs to handle multiple devices with one
> NAPI instance implements its own per-channel disable bit. However,
> when setting such a bit, it needs to synchronize with the poller
> (that is make sure that any pending poller instance has completed,
> or is started late enough to see that disable bit).
> 
> This implements a low level __napi_synchronize() function to acheive
> that. The underscores are to emphasis the low level aspect of it and
> to discourage driver writers who don't know what they are doing to
> use it (to please DaveM :-)
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> Switched to do a cpu_relax() spin instead and only on SMP. Not that
> we have an smp_mb() in there which synchronize_irq() lacks. I believe
> this is a bug in synchronize_irq() which I'll handle separately.
> 
> Note: unfortunately, Jeff already picked up the EMAC patch without
> waiting for this to be sorted out (oops...). So if you agree with
> this patch, it would be nice to have it go in quickly or maybe via
> Jeff's tree to avoid breakage ? Not terribly important tho.


Sorry, I thought that was the way everybody was headed.  With the driver 
broken /anyway/, I just sorta threw it into the pile of fixes.

It's upstream now, so let me know if you want to revert or move forward 
from here...

	Jeff



  reply	other threads:[~2007-10-17  3:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-16  5:49 [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi poll Benjamin Herrenschmidt
2007-10-16  5:49 ` Benjamin Herrenschmidt
2007-10-16  6:06 ` Herbert Xu
2007-10-16  6:06   ` Herbert Xu
2007-10-16  7:37   ` Benjamin Herrenschmidt
2007-10-16  7:37     ` Benjamin Herrenschmidt
2007-10-16  7:44     ` David Miller
2007-10-16  7:44       ` David Miller
2007-10-16 18:53 ` Stephen Hemminger
2007-10-16 18:53   ` Stephen Hemminger
2007-10-16 21:14   ` Benjamin Herrenschmidt
2007-10-16 21:14     ` Benjamin Herrenschmidt
2007-10-17  2:50   ` Benjamin Herrenschmidt
2007-10-17  2:50     ` Benjamin Herrenschmidt
2007-10-17  2:52   ` Benjamin Herrenschmidt
2007-10-17  2:52     ` Benjamin Herrenschmidt
2007-10-17  3:16     ` Jeff Garzik [this message]
2007-10-17  3:16       ` Jeff Garzik
2007-10-17  3:24       ` Benjamin Herrenschmidt
2007-10-17  3:24         ` Benjamin Herrenschmidt
2007-10-17 15:31         ` Stephen Hemminger
2007-10-17 15:31           ` Stephen Hemminger
2007-10-17 21:52           ` Benjamin Herrenschmidt
2007-10-17 22:04           ` [PATCH] net: Add napi_sycnhronize() " Benjamin Herrenschmidt
2007-10-17 22:04             ` Benjamin Herrenschmidt
2007-10-17 23:36             ` Josh Boyer
2007-10-17 23:36               ` Josh Boyer
2007-10-17 23:59               ` Benjamin Herrenschmidt
2007-10-17 23:59                 ` Benjamin Herrenschmidt
2007-10-18  1:02             ` Josh Boyer
2007-10-18  1:02               ` Josh Boyer
2007-10-18  1:26               ` Benjamin Herrenschmidt
2007-10-18  1:26                 ` Benjamin Herrenschmidt
2007-10-18  1:19             ` Benjamin Herrenschmidt
2007-10-18  1:19               ` Benjamin Herrenschmidt
2007-10-17 23:14           ` [PATCH] fix EMAC driver for proper napi_synchronize API Benjamin Herrenschmidt
2007-10-17 23:14             ` Benjamin Herrenschmidt
2007-10-18  0:21             ` Jeff Garzik
2007-10-18  0:21               ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-10-16  5:40 [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi poll Benjamin Herrenschmidt
2007-10-16  5:40 ` Benjamin Herrenschmidt

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=47157EA4.1000500@garzik.org \
    --to=jeff@garzik.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.