From: Francois Romieu <romieu@fr.zoreil.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: "Paul E. McKenney" <paulmck@us.ibm.com>,
linux-kernel@vger.kernel.org, dipankar@in.ibm.com,
antonb@au1.ibm.com, davej@codemonkey.org.uk, hpa@zytor.com,
len.brown@intel.com, andmike@us.ibm.com, rth@twiddle.net,
rusty@au1.ibm.com, schwidefsky@de.ibm.com, jgarzik@pobox.com
Subject: Re: [RFC,PATCH 3/4] Change synchronize_kernel to _rcu and _sched
Date: Sun, 10 Apr 2005 00:39:46 +0200 [thread overview]
Message-ID: <20050409223946.GA11809@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0504092039280.20335-100000@dbl.q-ag.de>
Manfred Spraul <manfred@colorfullife.com> :
[...]
> I always thought that all callers of dev->hard_start_xmit() acquire
> dev->xmit_lock before calling hard_start_xmit().
>
> Is that assumption wrong? I think I even rely on that in one of my
> drivers.
Afaik, no, it is right.
This part of the r8169 driver handles the window starting where qdisc_run()
tests netif_queue_stopped() to the spin_trylock(&dev->xmit_lock) in
qdisc_restart: the lock is not taken and dev->hard_start_xmit() will happen
in the near future ("near" or "preempt safe near" is not relevant here).
The driver must wait for the late newcomer to do its whole work before
it can release the Tx ring, whence the former synchronize_kernel().
r8169_down() looks a bit baroque because it can race with the irq handler
or dev->poll() or the recovery timer and none of those spin_locks either.
I may have missed something though. Feel free to educate.
--
Ueimor
prev parent reply other threads:[~2005-04-09 22:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-03 6:31 Paul E. McKenney
2005-04-07 23:16 ` Francois Romieu
2005-04-08 1:09 ` Paul E. McKenney
2005-04-09 8:56 ` Manfred Spraul
2005-04-09 12:20 ` Francois Romieu
2005-04-09 18:42 ` Manfred Spraul
2005-04-09 22:39 ` Francois Romieu [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=20050409223946.GA11809@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=andmike@us.ibm.com \
--cc=antonb@au1.ibm.com \
--cc=davej@codemonkey.org.uk \
--cc=dipankar@in.ibm.com \
--cc=hpa@zytor.com \
--cc=jgarzik@pobox.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=paulmck@us.ibm.com \
--cc=rth@twiddle.net \
--cc=rusty@au1.ibm.com \
--cc=schwidefsky@de.ibm.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
all inboxes | Powered by JetHome®