All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Alain Schroeder <alain@parkautomat.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Jan-Benedict Glaw <jbglaw@lug-owl.de>
Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code"
Date: Fri, 15 Oct 2004 18:35:03 -0400	[thread overview]
Message-ID: <1097879702.6737.7.camel@krustophenia.net> (raw)
In-Reply-To: <1097876587.4170.16.camel@marvin.home.parkautomat.net>

On Fri, 2004-10-15 at 17:43, Alain Schroeder wrote:
> I was getting these traces on a SMP host:

Your patch:

+       preempt_disable();
        netif_rx_ni(skb);
+       preempt_enable();

just wraps this code in preempt_disable/enable:

static inline int netif_rx_ni(struct sk_buff *skb)
{
       int err = netif_rx(skb);
       if (softirq_pending(smp_processor_id()))
               do_softirq();
       return err;
}

Isn't this considered an incorrect use of preempt_disable/enable?  My
reasoning is that if this was correct we would see preempt_dis/enable
sprinkled all over the code which it isn't.

Why do you have to call do_softirq like that?  I was under the
impression that you raise a softirq and it gets run later.

Lee


  parent reply	other threads:[~2004-10-15 23:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 21:43 tun.c patch to fix "smp_processor_id() in preemptible code" Alain Schroeder
2004-10-15 22:22 ` Herbert Xu
2004-10-15 22:35 ` Lee Revell [this message]
     [not found]   ` <200410172314.38597.vda@port.imtp.ilyichevsk.odessa.ua>
2004-10-19 18:31     ` Lee Revell
2004-10-19 21:35       ` Herbert Xu
2004-10-19 21:51         ` Lee Revell
2004-10-19 21:54           ` Herbert Xu
2004-10-19 22:10             ` Lee Revell
2004-10-19 22:33               ` David S. Miller
2004-10-19 22:42                 ` Lee Revell
2004-10-19 22:42                   ` David S. Miller
2004-10-19 22:51                     ` Lee Revell
2004-10-20  0:44                       ` 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=1097879702.6737.7.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=alain@parkautomat.net \
    --cc=jbglaw@lug-owl.de \
    --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 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.