netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Raghavendra Koushik <raghavendra.koushik@s2io.com>
Cc: ravinandan.arakali@s2io.com,
	"'Francois Romieu'" <romieu@fr.zoreil.com>,
	netdev@oss.sgi.com, leonid.grossman@s2io.com,
	rapuru.sriram@s2io.com
Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix
Date: Fri, 15 Oct 2004 14:53:46 -0400	[thread overview]
Message-ID: <41701CBA.7010108@pobox.com> (raw)
In-Reply-To: <200410141644.i9EGi839024175@guinness.s2io.com>

Raghavendra Koushik wrote:
> Hi Jeff,
> 
> My comments inline.
> 
> 
>>-----Original Message-----
>>From: Jeff Garzik [mailto:jgarzik@pobox.com]
>>Sent: Thursday, October 14, 2004 8:00 AM
>>To: ravinandan.arakali@s2io.com
>>Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com;
>>raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com
>>Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix
>>
>>Comments on patch #7:
>>
>>1) Can you prove that put_lock is really necessary, and not covered by
>>other methods of synchronization?  Typically the preferred model is that
>>your RX process requires _no_ spinlocks, and instead you use the net
>>stack API to ensure when your RX process is, and is not, running.
>>
> 
> <KSK>
> 	Lets say, CPU0 after processing s2io_isr, schedules s2io_tasklet.
> The tasklet in turn calls fill_rx_buffer which will replenish skbs into Rx
> descriptors and start modifying the put index of the Rx ring, at the same
> time if there is another Rx interrupt being processed (rx_intr_handler) on
> CPU1, then it will try to read put index of the ring which can result in
> synchronization problem. So I created this new variable put_pos to track the
> absolute value of the put index and make sure all its accesses are between
> spin locks. The same problem cannot happen if NAPI is used since the
> s2io_poll and fill_rx_buffer calls are serialized.


Have you actually benchmarked this on SMP?

It seems to me that you pay a penalty cross-CPU traffic with this scheme?

	Jeff

      reply	other threads:[~2004-10-15 18:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14  1:16 [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix Ravinandan Arakali
2004-10-14 15:00 ` Jeff Garzik
2004-10-14 16:44   ` Raghavendra Koushik
2004-10-15 18:53     ` Jeff Garzik [this message]

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=41701CBA.7010108@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=leonid.grossman@s2io.com \
    --cc=netdev@oss.sgi.com \
    --cc=raghavendra.koushik@s2io.com \
    --cc=rapuru.sriram@s2io.com \
    --cc=ravinandan.arakali@s2io.com \
    --cc=romieu@fr.zoreil.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).