mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH] NOHZ: local_softirq_pending with tickless plip
       [not found] <Pine.LNX.4.64.0705161415350.10041@artax.karlin.mff.cuni.cz>
@ 2007-05-17 10:52 ` Thomas Gleixner
  2007-05-17 13:05   ` Mikulas Patocka
                     ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Thomas Gleixner @ 2007-05-17 10:52 UTC (permalink / raw)
  To: Mikulas Patocka; +Cc: Ingo Molnar, LKML, David Miller

On Wed, 2007-05-16 at 15:00 +0200, Mikulas Patocka wrote:
> Hi
> 
> On one of my machines with tickless kernel and plip I get messages :

I bet this is a machine a P4 with Hyperthreading enabled ?

> NOHZ: local_softirq_pending 08
> 
> always when using plip (on other machine with tickless kernel and plip I 
> get no errors). Thebug happens both on 2.6.21 and 2.6.22-rc1
> 
> This patch fixes that. Note that plip calls netif_rx neither from hardware 
> interrupt nor from ksoftirqd, so there is no one who would wake 
> ksoftirqd then. netif_tx calls only 
> __raise_softirq_irqoff(NET_RX_SOFTIRQ), which sets softirq bit, but 
> doesn't wake ksoftirqd.

Dave, 

can we please get rid of __raise_softirq_irqoff() at all ? These micro
optimizations are causing more trouble than they are worth.

	tglx

> Mikulas
> 
> Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz
> 
> --- linux-2.6.22-rc1/net/core/dev.c_	Fri May 18 07:51:01 2007
> +++ linux-2.6.22-rc1/net/core/dev.c	Fri May 18 07:51:06 2007
> @@ -1117,7 +1117,7 @@
>   		dev->quota += dev->weight;
>   	else
>   		dev->quota = dev->weight;
> -	__raise_softirq_irqoff(NET_RX_SOFTIRQ);
> +	raise_softirq_irqoff(NET_RX_SOFTIRQ);
>   	local_irq_restore(flags);
>   }
>   EXPORT_SYMBOL(__netif_rx_schedule);



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] NOHZ: local_softirq_pending with tickless plip
  2007-05-17 10:52 ` [PATCH] NOHZ: local_softirq_pending with tickless plip Thomas Gleixner
@ 2007-05-17 13:05   ` Mikulas Patocka
  2007-05-17 20:29   ` David Miller
  2007-05-19 21:34   ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Mikulas Patocka @ 2007-05-17 13:05 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Ingo Molnar, LKML, David Miller

>> Hi
>>
>> On one of my machines with tickless kernel and plip I get messages :
>
> I bet this is a machine a P4 with Hyperthreading enabled ?

No, it's single Pentium 2. I have other Pentium MMX using plip, where I 
don't get these error messages, I don't know why.

Mikulas

>> NOHZ: local_softirq_pending 08
>>
>> always when using plip (on other machine with tickless kernel and plip I
>> get no errors). Thebug happens both on 2.6.21 and 2.6.22-rc1
>>
>> This patch fixes that. Note that plip calls netif_rx neither from hardware
>> interrupt nor from ksoftirqd, so there is no one who would wake
>> ksoftirqd then. netif_tx calls only
>> __raise_softirq_irqoff(NET_RX_SOFTIRQ), which sets softirq bit, but
>> doesn't wake ksoftirqd.
>
> Dave,
>
> can we please get rid of __raise_softirq_irqoff() at all ? These micro
> optimizations are causing more trouble than they are worth.
>
> 	tglx
>
>> Mikulas
>>
>> Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz
>>
>> --- linux-2.6.22-rc1/net/core/dev.c_	Fri May 18 07:51:01 2007
>> +++ linux-2.6.22-rc1/net/core/dev.c	Fri May 18 07:51:06 2007
>> @@ -1117,7 +1117,7 @@
>>   		dev->quota += dev->weight;
>>   	else
>>   		dev->quota = dev->weight;
>> -	__raise_softirq_irqoff(NET_RX_SOFTIRQ);
>> +	raise_softirq_irqoff(NET_RX_SOFTIRQ);
>>   	local_irq_restore(flags);
>>   }
>>   EXPORT_SYMBOL(__netif_rx_schedule);
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] NOHZ: local_softirq_pending with tickless plip
  2007-05-17 10:52 ` [PATCH] NOHZ: local_softirq_pending with tickless plip Thomas Gleixner
  2007-05-17 13:05   ` Mikulas Patocka
@ 2007-05-17 20:29   ` David Miller
  2007-05-19 21:34   ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-05-17 20:29 UTC (permalink / raw)
  To: tglx; +Cc: mikulas, mingo, linux-kernel

From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 17 May 2007 12:52:11 +0200

> On Wed, 2007-05-16 at 15:00 +0200, Mikulas Patocka wrote:
> > Hi
> > 
> > On one of my machines with tickless kernel and plip I get messages :
> 
> I bet this is a machine a P4 with Hyperthreading enabled ?
> 
> > NOHZ: local_softirq_pending 08
> > 
> > always when using plip (on other machine with tickless kernel and plip I 
> > get no errors). Thebug happens both on 2.6.21 and 2.6.22-rc1
> > 
> > This patch fixes that. Note that plip calls netif_rx neither from hardware 
> > interrupt nor from ksoftirqd, so there is no one who would wake 
> > ksoftirqd then. netif_tx calls only 
> > __raise_softirq_irqoff(NET_RX_SOFTIRQ), which sets softirq bit, but 
> > doesn't wake ksoftirqd.
> 
> Dave, 
> 
> can we please get rid of __raise_softirq_irqoff() at all ? These micro
> optimizations are causing more trouble than they are worth.

Actually I think this is pointing out a bug, in that plip is not
invoking things in the proper context, which will likely cause
other problems :-)

I'll put this on my TODO list and look into this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] NOHZ: local_softirq_pending with tickless plip
  2007-05-17 10:52 ` [PATCH] NOHZ: local_softirq_pending with tickless plip Thomas Gleixner
  2007-05-17 13:05   ` Mikulas Patocka
  2007-05-17 20:29   ` David Miller
@ 2007-05-19 21:34   ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-05-19 21:34 UTC (permalink / raw)
  To: tglx; +Cc: mikulas, mingo, linux-kernel

From: Thomas Gleixner <tglx@linutronix.de>
Date: Thu, 17 May 2007 12:52:11 +0200

> On Wed, 2007-05-16 at 15:00 +0200, Mikulas Patocka wrote:
> > Hi
> > 
> > On one of my machines with tickless kernel and plip I get messages :
> 
> I bet this is a machine a P4 with Hyperthreading enabled ?
> 
> > NOHZ: local_softirq_pending 08
> > 
> > always when using plip (on other machine with tickless kernel and plip I 
> > get no errors). Thebug happens both on 2.6.21 and 2.6.22-rc1
> > 
> > This patch fixes that. Note that plip calls netif_rx neither from hardware 
> > interrupt nor from ksoftirqd, so there is no one who would wake 
> > ksoftirqd then. netif_tx calls only 
> > __raise_softirq_irqoff(NET_RX_SOFTIRQ), which sets softirq bit, but 
> > doesn't wake ksoftirqd.
> 
> Dave, 
> 
> can we please get rid of __raise_softirq_irqoff() at all ? These micro
> optimizations are causing more trouble than they are worth.

I looked some more and really I think this is a bug in plip,
netif_rx() should only be invoked from software or hardware
interrupts.

If you look, the function invoking netif_rx() is called plip_bh() and
indeed I believe with that kind of funtion name it did run from
software interrupts (of BH's as they used to be called) at one point
but someone changed it over to execute from a workqueue for some
reason.

We really shouldn't punish all callers of netif_rx() just because
one call site doesn't invoke it in the correct context.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-19 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.64.0705161415350.10041@artax.karlin.mff.cuni.cz>
2007-05-17 10:52 ` [PATCH] NOHZ: local_softirq_pending with tickless plip Thomas Gleixner
2007-05-17 13:05   ` Mikulas Patocka
2007-05-17 20:29   ` David Miller
2007-05-19 21:34   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®