From: Robert Olsson <Robert.Olsson@data.slu.se>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com, "David S. Miller" <davem@redhat.com>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: [PATCH] tg3 locking update (with NAPI overtones)
Date: Thu, 28 Nov 2002 11:12:52 +0100 [thread overview]
Message-ID: <15845.60452.201159.295984@robur.slu.se> (raw)
In-Reply-To: <3DE406AE.2000908@pobox.com>
Jeff Garzik writes:
> * When net drivers move TX completion from interrupt to dev->poll(),
> this allows the rethinking of some traditional locking, namely
> eliminating a lock in dev->start_xmit() that most drivers implement
> these days.
Yes.
>
> tg3_tx_timeout: net stack already holds dev->xmit_lock. tx_lock GC'd.
For tx_timout and other timer/async work there may exist a scheduled poll
to which we have to sync. Something like this could be done. Ideas comes
from dev->close.
/*
* Synchronize and disable poll
*/
while (test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
}
.
.
/* Enable */
clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
Cheers.
--ro
prev parent reply other threads:[~2002-11-28 10:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 23:41 [PATCH] tg3 locking update (with NAPI overtones) Jeff Garzik
2002-11-26 23:51 ` David S. Miller
2002-11-27 0:53 ` Jeff Garzik
2002-11-27 7:40 ` Ben Greear
2002-11-28 2:48 ` Jeff Garzik
2002-11-28 10:12 ` Robert Olsson [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=15845.60452.201159.295984@robur.slu.se \
--to=robert.olsson@data.slu.se \
--cc=davem@redhat.com \
--cc=jgarzik@pobox.com \
--cc=kuznet@ms2.inr.ac.ru \
--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 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).