From: Jeff Garzik <jgarzik@pobox.com>
To: Ben Greear <greearb@candelatech.com>
Cc: Andi Kleen <ak@suse.de>, netdev@oss.sgi.com
Subject: Re: RFR: new SiS gige driver
Date: Wed, 13 Aug 2003 14:52:15 -0400 [thread overview]
Message-ID: <3F3A88DF.80205@pobox.com> (raw)
In-Reply-To: <3F353925.3030106@candelatech.com>
Ben Greear wrote:
> Jeff Garzik wrote:
>
>> Andi Kleen wrote:
>>
>>> * netif_stop_queue in hard_start_xmit is not protected against the
>>> interrupt by the spinlock. That's racy, isn't it?
>>
>>
>>
>> Shouldn't be, if done right. If the interrupt runs a TX completion
>> cycle, it will run the code
>> if (work_done && netif_queue_stopped(dev))
>> netif_wake_queue(dev)
>>
>
>> Since ->hard_start_xmit is guaranteed never to be called if the queue
>> is stopped, you also guaranteed that netif_wake_queue and
>> ->hard_start_xmit are mutually exclusive.
>
>
> Is this really guaranteed? What if the queue is stopped between the check
> to see if it's stopped and the call to hard_start_xmit?
Actually, a slight correction (something I forgot): the atomicity is
provided by the bitops already so the netif_queue_stopped check isn't
needed.
Jeff
prev parent reply other threads:[~2003-08-13 18:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-08 17:39 RFR: new SiS gige driver Jeff Garzik
2003-08-08 19:01 ` Stephen Hemminger
2003-08-09 6:39 ` David S. Miller
2003-08-09 14:15 ` Andi Kleen
2003-08-09 15:01 ` Jeff Garzik
2003-08-09 15:27 ` Andi Kleen
2003-08-11 1:07 ` Jeff Garzik
2003-08-09 18:10 ` Ben Greear
2003-08-13 18:52 ` 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=3F3A88DF.80205@pobox.com \
--to=jgarzik@pobox.com \
--cc=ak@suse.de \
--cc=greearb@candelatech.com \
--cc=netdev@oss.sgi.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 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.