From: David Miller <davem@davemloft.net>
To: xiaosuo@gmail.com
Cc: eric.dumazet@gmail.com, therbert@google.com, eparis@redhat.com,
netdev@vger.kernel.org
Subject: Re: BUG: using smp_processor_id() in preemptible [00000000] code: avahi-daemon: caller is netif_rx
Date: Thu, 15 Apr 2010 00:57:26 -0700 (PDT) [thread overview]
Message-ID: <20100415.005726.205428265.davem@davemloft.net> (raw)
In-Reply-To: <u2o412e6f7f1004150047nc9250ffuaef68be066a7575c@mail.gmail.com>
From: Changli Gao <xiaosuo@gmail.com>
Date: Thu, 15 Apr 2010 15:47:26 +0800
> On Thu, Apr 15, 2010 at 3:37 PM, David Miller <davem@davemloft.net> wrote:
>> From: Changli Gao <xiaosuo@gmail.com>
>> Date: Thu, 15 Apr 2010 15:30:44 +0800
>>
>>> Should netif_rx() be used only when preemption is disabled? If not,
>>> netif_rx_ni() should be used instead.?
>>
>> netif_rx() must be invoked from a hardware or software interrupt,
>> which implies preemption disabled.
>>
>> In netif_rx_ni(), the "ni" means "not interrupt".
>>
>
> yea, I know netif_rx_ni()'s meaning. It means that the following
> changes aren't necessary.
>
> #else
> - cpu = smp_processor_id();
> + ret = enqueue_to_backlog(skb, get_cpu());
> + put_cpu();
>
Why? If we are in an interrupt (either soft or hard) then
smp_processor_id() is stable, and valid.
Changli, I find it very frustrating to communicate with you, you are
very terse in your descriptions and analysis and you make many simple
errors that would be avoided if you spent more time thinking about
things before sending your emails. :-/
Instead of just showing some pseudo patch, state WHY it is needed.
Talk about the execution state of environment and what rules or other
things are being violated which must be corrected.
next prev parent reply other threads:[~2010-04-15 7:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 19:20 BUG: using smp_processor_id() in preemptible [00000000] code: avahi-daemon: caller is netif_rx Eric Paris
2010-04-12 19:40 ` Eric Dumazet
2010-04-12 20:54 ` Tom Herbert
2010-04-13 7:14 ` Eric Dumazet
2010-04-15 7:14 ` David Miller
2010-04-15 7:30 ` Changli Gao
2010-04-15 7:37 ` David Miller
2010-04-15 7:47 ` Changli Gao
2010-04-15 7:57 ` David Miller [this message]
2010-04-15 8:27 ` Changli Gao
2010-04-15 8:33 ` David Miller
2010-04-15 8:58 ` Eric Dumazet
2010-04-15 8:49 ` Eric Dumazet
2010-04-15 9:02 ` David Miller
2010-04-15 10:29 ` Eric Dumazet
2010-04-15 13:16 ` Eric Dumazet
2010-04-15 19:07 ` Eric Dumazet
2010-04-15 19:13 ` [PATCH] ip: Fix ip_dev_loopback_xmit() Eric Dumazet
2010-04-15 21:26 ` David Miller
2010-04-16 0:03 ` Changli Gao
2010-04-16 0:15 ` David Miller
2010-04-16 0:19 ` Changli Gao
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=20100415.005726.205428265.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eparis@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=xiaosuo@gmail.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 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.