Ocean.Ma | 19 Apr 09:58 2010

BUG: using smp_processor_id() in preemptible [00000000] code: arping/9681

Hey, guys

         Have you ever met the following complaining messages while your
restarting your network services( by the command of "service network
restart").

         The environment: 

Linux 2.6.27.39 SMP PREEMPT

NIC: Intel 82599

Driver: 2.0.72.4-NAPI

Thanks a lot!

BUG: using smp_processor_id() in preemptible [00000000] code:
arping/9681

caller is ixgbe_select_queue+0x35/0x60 [ixgbe]

Pid: 9681, comm: arping Not tainted 2.6.27.39-grsec #1

Call Trace:

 [<ffffffff8041e174>] debug_smp_processor_id+0xd4/0xe0

 [<ffffffffa0080985>] ixgbe_select_queue+0x35/0x60 [ixgbe]

 [<ffffffff8060a07e>] dev_queue_xmit+0x5e/0x5d0
(Continue reading)

Zhang, Guanghua | 19 Apr 10:01 2010
Picon

Re: using smp_processor_id() in preemptible [00000000] code: arping/9681

Can you use multiple Rx Queue now?

________________________________
From: Ocean.Ma <at> Emerson.com [mailto:Ocean.Ma <at> Emerson.com]
Sent: 2010年4月19日 15:58
To: e1000-devel <at> lists.sourceforge.net
Cc: Ronciak, John; Zhang, Guanghua
Subject: BUG: using smp_processor_id() in preemptible [00000000] code: arping/9681

Hey, guys
         Have you ever met the following complaining messages while your restarting your network services( by the
command of “service network restart”).
         The environment:
Linux 2.6.27.39 SMP PREEMPT
NIC: Intel 82599
Driver: 2.0.72.4-NAPI
Thanks a lot!
BUG: using smp_processor_id() in preemptible [00000000] code: arping/9681
caller is ixgbe_select_queue+0x35/0x60 [ixgbe]
Pid: 9681, comm: arping Not tainted 2.6.27.39-grsec #1

Call Trace:
 [<ffffffff8041e174>] debug_smp_processor_id+0xd4/0xe0
 [<ffffffffa0080985>] ixgbe_select_queue+0x35/0x60 [ixgbe]
 [<ffffffff8060a07e>] dev_queue_xmit+0x5e/0x5d0
 [<ffffffff806b31d3>] packet_sendmsg+0x273/0x2b0
 [<ffffffff805fb12b>] sock_sendmsg+0xfb/0x1d0
 [<ffffffff8024c1f0>] autoremove_wake_function+0x0/0x30
 [<ffffffff806f1b3f>] _spin_lock_irqsave+0x1f/0x50
 [<ffffffff80416cf1>] __up_read+0x21/0xc0
(Continue reading)

Ko, Stephen S | 19 Apr 21:51 2010
Picon

Re: BUG: using smp_processor_id() in preemptible [00000000] code: arping/9681

Hi Ocean,

Questions:

1. Have you tried latest 2.6 kernel?
2. Could you please attach your:
-	.config
-	lspci -vvv
-	dmesg

Thanks,
Stephen

-----Original Message-----
From: Ocean.Ma <at> Emerson.com [mailto:Ocean.Ma <at> Emerson.com] 
Sent: Monday, April 19, 2010 12:58 AM
To: e1000-devel <at> lists.sourceforge.net
Cc: Ronciak, John; Zhang, Guanghua
Subject: [E1000-devel] BUG: using smp_processor_id() in preemptible [00000000] code: arping/9681

Hey, guys

         Have you ever met the following complaining messages while your
restarting your network services( by the command of "service network
restart").

         The environment: 

Linux 2.6.27.39 SMP PREEMPT

(Continue reading)

Ocean.Ma | 20 Apr 06:19 2010

Re: BUG: using smp_processor_id() in preemptible[00000000] code: arping/9681

Checking https://bugzilla.kernel.org/show_bug.cgi?id=12518  This problem
seems have been submitted as a bug of preempt kernel debugging function
of debug_smp_processor_id() in kernel 2.6.28/29. A patch will fix the
issue

diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c
index 0f8fc22..4689cb0 100644
--- a/lib/smp_processor_id.c
+++ b/lib/smp_processor_id.c
 <at>  <at>  -22,7 +22,7  <at>  <at>  notrace unsigned int debug_smp_processor_id(void)
      * Kernel threads bound to a single CPU can safely use
      * smp_processor_id():
      */
-    if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu)))
+    if (cpumask_equal(&current->cpus_allowed, cpumask_of(this_cpu)))
         goto out;

     /*

Unfortunately I have to use 2.6.27.39, and the above way does not work
for me, though I can turn off the warning by removing
CONFIG_DEBUG_PREEMPT in .config.

Best Regards,
Ocean 

-----Original Message-----
From: Ma, Ocean [NETPWR/EMBCO/CN] 
Sent: Tuesday, April 20, 2010 12:00 PM
To: 'Ko, Stephen S'; e1000-devel <at> lists.sourceforge.net
(Continue reading)

Stephen Hemminger | 22 Apr 23:54 2010

Re: BUG: using smp_processor_id() in preemptible[00000000] code: arping/9681

On Tue, 20 Apr 2010 12:19:43 +0800
<Ocean.Ma <at> Emerson.com> wrote:

> Checking https://bugzilla.kernel.org/show_bug.cgi?id=12518  This problem
> seems have been submitted as a bug of preempt kernel debugging function
> of debug_smp_processor_id() in kernel 2.6.28/29. A patch will fix the
> issue
> 

That is the wrong way to fix the issue.

The proper way is to use raw_smp_processor_id() instead.

In the IXGBE driver, it is mapping the current processor id to the transmit
queue if flow director is in use. Well the code there might get preempted
and run on another CPU, and the cpu id might change. But this is should
be okay in this case because it will only cause the packet to go out a different
queue.

Messing around with the  core smp_processor_id code is not the right answer.
--

-- 

------------------------------------------------------------------------------
_______________________________________________
E1000-devel mailing list
E1000-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

(Continue reading)

Ocean.Ma | 20 Apr 06:00 2010

Re: BUG: using smp_processor_id() in preemptible[00000000] code: arping/9681

Stephen
Thanks a lot for your reply.
1. I have not tried the latest 2.6 kernel yet.
2. the stuffs attached.

Best Regards,
Ocean  

-----Original Message-----
From: Ko, Stephen S [mailto:stephen.s.ko <at> intel.com] 
Sent: Tuesday, April 20, 2010 3:52 AM
To: Ma, Ocean [NETPWR/EMBCO/CN]; e1000-devel <at> lists.sourceforge.net
Cc: Ronciak, John; Zhang, Guanghua
Subject: RE: [E1000-devel] BUG: using smp_processor_id() in
preemptible[00000000] code: arping/9681

Hi Ocean,

Questions:

1. Have you tried latest 2.6 kernel?
2. Could you please attach your:
-	.config
-	lspci -vvv
-	dmesg

Thanks,
Stephen

-----Original Message-----
(Continue reading)


Gmane