public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "David S. Miller" <davem@redhat.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Problem with dev_kfree_skb_any() in 2.6.0
Date: Tue, 30 Dec 2003 17:14:18 +1100	[thread overview]
Message-ID: <1072764858.5079.2.camel@gaston> (raw)
In-Reply-To: <20031229205157.4c631f28.davem@redhat.com>

On Tue, 2003-12-30 at 15:51, David S. Miller wrote:

> There is one important detail not mentioned.
> 
> If we let the TX free occur in cpu IRQ disabled context, the
> BH to actually do the work will occur as some indeterminate
> time in the future after the top level IRQ spinlock release
> occurs.
> 
> Unlike local_bh_enable(), local_irq_enable() does not run
> softirq work.  Similarly when comparing IRQ handler return
> (which also runs softirq work if pending).

Ok, checked that with Rusty and it seems that scheduling the
softirq will wakeup softirqd when done from non-interrupt level,
so it should just work to call dev_kfree_skb_irq() from this
task context.

inline void raise_softirq_irqoff(unsigned int nr)
{
        __raise_softirq_irqoff(nr);
 
        /*
         * If we're in an interrupt or softirq, we're done
         * (this also catches softirq-disabled code). We will
         * actually run the softirq once we return from
         * the irq or softirq.
         *
         * Otherwise we wake up ksoftirqd to make sure we
         * schedule the softirq soon.
         */
        if (!in_interrupt())
                wakeup_softirqd();
}
 
So that should be ok to just call the _irq version in these
cases. Those aren't performance critical code path anyway,
it's power management when the machine is going to sleep in
this specific case in sungem, and close() codepath in
general.

Ben.




      parent reply	other threads:[~2003-12-30  6:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-27 23:17 Problem with dev_kfree_skb_any() in 2.6.0 Benjamin Herrenschmidt
2003-12-28  1:07 ` David S. Miller
2003-12-28  5:44   ` Benjamin Herrenschmidt
2003-12-30  4:09   ` Jeff Garzik
2003-12-30  4:51     ` David S. Miller
2003-12-30  5:15       ` Jeff Garzik
2003-12-30  6:01         ` David S. Miller
2003-12-30  6:12           ` Jeff Garzik
2003-12-30  6:13             ` David S. Miller
2003-12-30 17:43               ` Jeff Garzik
2004-01-01 20:42                 ` David S. Miller
2004-01-02  2:58                   ` Jeff Garzik
2004-01-06  3:54                     ` David S. Miller
2003-12-30  6:14       ` Benjamin Herrenschmidt [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=1072764858.5079.2.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=davem@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    /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