From: "David S. Miller" <davem@redhat•com>
To: "Feldman, Scott" <scott.feldman@intel•com>
Cc: jgarzik@pobox•com, akpm@osdl•org, netdev@oss•sgi.com, cramerj@intel•com
Subject: Re: Fw: Badness in local_bh_enable at kernel/softirq.c:119
Date: Tue, 30 Sep 2003 23:51:17 -0700 [thread overview]
Message-ID: <20030930235117.2346c711.davem@redhat.com> (raw)
In-Reply-To: <C6F5CF431189FA4CBAEC9E7DD5441E010222966E@orsmsx402.jf.intel.com>
On Tue, 30 Sep 2003 10:27:08 -0700
"Feldman, Scott" <scott.feldman@intel•com> wrote:
> At this point, I'm leaning towards removing the offending code in the
> timer callback now, and taking a step back to solve the bigger problem,
> either with a better locking scheme, or a new plan on how to flush the
> "stuck" work. We don't need kernel panics when you trip over the
> Ethernet cable! Sound like a plan?
Why do you even need to use IRQ locking here?
Your e1000 netdev->hard_start_xmit method doesn't need to do anything
special, why does this timer code? I suppose you need to synchronize
with e1000_clean_tx_irq() in the non-NAPI case right? If so, that's
not being accomplished by what your code is doing. If nobody else
takes that xmit_lock in an IRQ disabling manner, the e1000 timer code
doing so doesn't make any difference.
I have an idea for attacking the problem, once you figure out what
kind of locking you really need. Do whatever you need to do to
synchronize on the hardware side, but instead of directly freeing
the SKB, add each one to a list. A pointer to the head of this list
is stored on the stack of the timer routine, and passed down into
the TX purger.
Then at the top level you can drop all your locks, re-enable hw IRQs
and whatever else you need to do, then pass the SKBs in the list off
to dev_kfree_skb_irq() (this is the appropriate routine to call to
free an SKB from a timer handler, which runs in soft interrupt
context).
next prev parent reply other threads:[~2003-10-01 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-30 17:27 Fw: Badness in local_bh_enable at kernel/softirq.c:119 Feldman, Scott
2003-10-01 6:51 ` David S. Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-10-01 8:19 Feldman, Scott
2003-10-01 8:37 ` David S. Miller
2003-10-01 14:40 ` Randy.Dunlap
2003-09-29 21:36 Andrew Morton
2003-09-30 5:49 ` David S. Miller
2003-09-30 11:53 ` David S. Miller
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=20030930235117.2346c711.davem@redhat.com \
--to=davem@redhat$(echo .)com \
--cc=akpm@osdl$(echo .)org \
--cc=cramerj@intel$(echo .)com \
--cc=jgarzik@pobox$(echo .)com \
--cc=netdev@oss$(echo .)sgi.com \
--cc=scott.feldman@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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