* [PATCH] e1000 stop raw interrupts disabled nag from RT
@ 2007-03-01 2:54 Mark Huth
2007-03-01 3:18 ` Kok, Auke
0 siblings, 1 reply; 8+ messages in thread
From: Mark Huth @ 2007-03-01 2:54 UTC (permalink / raw)
To: netdev; +Cc: auke-jan.h.kok
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: netdev_e1000_stop_rt_interrupt_nagging.patch --]
[-- Type: text/x-patch, Size: 939 bytes --]
Current e1000_xmit_frame spews raw interrupt disabled nag messages when
used with RT kernel patches. This patch uses spin_trylock_irqsave,
which allows RT patches to properly manage the irq semantics.
Signed-off-by: Mark Huth <mhuth@mvista.com>
---
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 619c892..48f94ee 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3363,12 +3363,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
(adapter->hw.mac_type == e1000_82573))
e1000_transfer_dhcp_info(adapter, skb);
- local_irq_save(flags);
- if (!spin_trylock(&tx_ring->tx_lock)) {
+ if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags))
/* Collision - tell upper layer to requeue */
- local_irq_restore(flags);
return NETDEV_TX_LOCKED;
- }
/* need: count + 2 desc gap to keep tail from touching
* head, otherwise try next time */
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 2:54 [PATCH] e1000 stop raw interrupts disabled nag from RT Mark Huth
@ 2007-03-01 3:18 ` Kok, Auke
2007-03-01 4:59 ` Mark Huth
0 siblings, 1 reply; 8+ messages in thread
From: Kok, Auke @ 2007-03-01 3:18 UTC (permalink / raw)
To: Mark Huth; +Cc: netdev, auke-jan.h.kok, Jesse Brandeburg
Mark Huth wrote:
> Current e1000_xmit_frame spews raw interrupt disabled nag messages when
> used with RT kernel patches. This patch uses spin_trylock_irqsave,
> which allows RT patches to properly manage the irq semantics.
Looks OK with me on first sight, I'll keep it on my stack and push it upstream
after Jesse looks it over.
Which -RT paches make this pop up btw? I'd like to repro it.
Thanks,
Auke
> Signed-off-by: Mark Huth <mhuth@mvista.com>
> ---
> diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
> index 619c892..48f94ee 100644
> --- a/drivers/net/e1000/e1000_main.c
> +++ b/drivers/net/e1000/e1000_main.c
> @@ -3363,12 +3363,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
> (adapter->hw.mac_type == e1000_82573))
> e1000_transfer_dhcp_info(adapter, skb);
>
> - local_irq_save(flags);
> - if (!spin_trylock(&tx_ring->tx_lock)) {
> + if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags))
> /* Collision - tell upper layer to requeue */
> - local_irq_restore(flags);
> return NETDEV_TX_LOCKED;
> - }
>
> /* need: count + 2 desc gap to keep tail from touching
> * head, otherwise try next time */
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 3:18 ` Kok, Auke
@ 2007-03-01 4:59 ` Mark Huth
2007-03-01 16:55 ` Kok, Auke
0 siblings, 1 reply; 8+ messages in thread
From: Mark Huth @ 2007-03-01 4:59 UTC (permalink / raw)
To: Kok, Auke; +Cc: netdev, Jesse Brandeburg
Kok, Auke wrote:
> Mark Huth wrote:
>> Current e1000_xmit_frame spews raw interrupt disabled nag messages when
>> used with RT kernel patches. This patch uses spin_trylock_irqsave,
>> which allows RT patches to properly manage the irq semantics.
>
> Looks OK with me on first sight, I'll keep it on my stack and push it
> upstream after Jesse looks it over.
>
> Which -RT paches make this pop up btw? I'd like to repro it.
>
> Thanks,
>
> Auke
Auke,
Well, I'm not an expert on the realtime patches - but most any patch set
from Ingo seems to set this off - we've run through a bunch all the way
since 2.6.10. It's a standard warning to get drivers to not mess with
the processor interrupt function, since RT threads both the hard and
soft irqs, and except for rare instances, the drivers and critical
region protection no longer require the processor interrupt to be off.
The XX_irqsave functions get turned into pre-empt disable, which is
adequate for most things. But the local_irq_save is recognized and
warned, and then if it is really necessary it can be converted to an RT
varient that won't warn.
>
>
>
>
>> Signed-off-by: Mark Huth <mhuth@mvista.com>
>> ---
>> diff --git a/drivers/net/e1000/e1000_main.c
>> b/drivers/net/e1000/e1000_main.c
>> index 619c892..48f94ee 100644
>> --- a/drivers/net/e1000/e1000_main.c
>> +++ b/drivers/net/e1000/e1000_main.c
>> @@ -3363,12 +3363,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct
>> net_device *netdev)
>> (adapter->hw.mac_type == e1000_82573))
>> e1000_transfer_dhcp_info(adapter, skb);
>>
>> - local_irq_save(flags);
>> - if (!spin_trylock(&tx_ring->tx_lock)) {
>> + if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags))
>> /* Collision - tell upper layer to requeue */
>> - local_irq_restore(flags);
>> return NETDEV_TX_LOCKED;
>> - }
>>
>> /* need: count + 2 desc gap to keep tail from touching
>> * head, otherwise try next time */
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 4:59 ` Mark Huth
@ 2007-03-01 16:55 ` Kok, Auke
2007-03-01 17:11 ` Michal Schmidt
0 siblings, 1 reply; 8+ messages in thread
From: Kok, Auke @ 2007-03-01 16:55 UTC (permalink / raw)
To: Mark Huth; +Cc: Kok, Auke, netdev, Jesse Brandeburg, Ingo Molnar
Mark Huth wrote:
> Kok, Auke wrote:
>> Mark Huth wrote:
>>> Current e1000_xmit_frame spews raw interrupt disabled nag messages when
>>> used with RT kernel patches. This patch uses spin_trylock_irqsave,
>>> which allows RT patches to properly manage the irq semantics.
>> Looks OK with me on first sight, I'll keep it on my stack and push it
>> upstream after Jesse looks it over.
>>
>> Which -RT paches make this pop up btw? I'd like to repro it.
>>
>
> Well, I'm not an expert on the realtime patches - but most any patch set
> from Ingo seems to set this off - we've run through a bunch all the way
> since 2.6.10.
that's bizarre, and would imply that Ingo himself never spotted this in ages,
not to mention never tell us about it?
Ingo?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 16:55 ` Kok, Auke
@ 2007-03-01 17:11 ` Michal Schmidt
2007-03-01 17:29 ` Kok, Auke
2007-03-01 21:58 ` Mark Huth
0 siblings, 2 replies; 8+ messages in thread
From: Michal Schmidt @ 2007-03-01 17:11 UTC (permalink / raw)
To: Kok, Auke; +Cc: Mark Huth, netdev, Jesse Brandeburg, Ingo Molnar
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kok, Auke wrote:
> Mark Huth wrote:
>> Well, I'm not an expert on the realtime patches - but most any patch set
>> from Ingo seems to set this off - we've run through a bunch all the way
>> since 2.6.10.
>
> that's bizarre, and would imply that Ingo himself never spotted this in ages,
> not to mention never tell us about it?
Ingo's -rt patches have contained this change to e1000 for some time.
The code is perfectly fine as is for non-RT kernels, so maybe that's why
noone felt like telling you about it.
Michal
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org
iD8DBQFF5wlZabKV90ewf0QRAse3AJ979xur0u8X1DokSzaAMvLQCWPkXACfU9ss
xC05DAbFNAaFMLnQrzBKit0=
=I5mt
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 17:11 ` Michal Schmidt
@ 2007-03-01 17:29 ` Kok, Auke
2007-03-01 17:34 ` Michal Schmidt
2007-03-01 21:58 ` Mark Huth
1 sibling, 1 reply; 8+ messages in thread
From: Kok, Auke @ 2007-03-01 17:29 UTC (permalink / raw)
To: Michal Schmidt
Cc: Kok, Auke, Mark Huth, netdev, Jesse Brandeburg, Ingo Molnar
Michal Schmidt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kok, Auke wrote:
>> Mark Huth wrote:
>>> Well, I'm not an expert on the realtime patches - but most any patch set
>>> from Ingo seems to set this off - we've run through a bunch all the way
>>> since 2.6.10.
>> that's bizarre, and would imply that Ingo himself never spotted this in ages,
>> not to mention never tell us about it?
>
> Ingo's -rt patches have contained this change to e1000 for some time.
> The code is perfectly fine as is for non-RT kernels, so maybe that's why
> noone felt like telling you about it.
uhh, sure... while we are at it then, are there any more patches like this?
perhaps for e100? ixgb?
Cheers,
Auke
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 17:29 ` Kok, Auke
@ 2007-03-01 17:34 ` Michal Schmidt
0 siblings, 0 replies; 8+ messages in thread
From: Michal Schmidt @ 2007-03-01 17:34 UTC (permalink / raw)
To: Kok, Auke; +Cc: Mark Huth, netdev, Jesse Brandeburg, Ingo Molnar
Kok, Auke wrote:
> uhh, sure... while we are at it then, are there any more patches like this?
> perhaps for e100? ixgb?
A quick grep through the current RT patch shows there are no other
changes to e100, e1000, ixgb.
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] e1000 stop raw interrupts disabled nag from RT
2007-03-01 17:11 ` Michal Schmidt
2007-03-01 17:29 ` Kok, Auke
@ 2007-03-01 21:58 ` Mark Huth
1 sibling, 0 replies; 8+ messages in thread
From: Mark Huth @ 2007-03-01 21:58 UTC (permalink / raw)
To: Michal Schmidt; +Cc: Kok, Auke, netdev, Jesse Brandeburg, Ingo Molnar
Michal Schmidt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Kok, Auke wrote:
>
>> Mark Huth wrote:
>>
>>> Well, I'm not an expert on the realtime patches - but most any patch set
>>> from Ingo seems to set this off - we've run through a bunch all the way
>>> since 2.6.10.
>>>
>> that's bizarre, and would imply that Ingo himself never spotted this in ages,
>> not to mention never tell us about it?
>>
>
> Ingo's -rt patches have contained this change to e1000 for some time.
> The code is perfectly fine as is for non-RT kernels, so maybe that's why
> noone felt like telling you about it.
>
> Michal
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Red Hat - http://enigmail.mozdev.org
>
> iD8DBQFF5wlZabKV90ewf0QRAse3AJ979xur0u8X1DokSzaAMvLQCWPkXACfU9ss
> xC05DAbFNAaFMLnQrzBKit0=
> =I5mt
> -----END PGP SIGNATURE-----
>
Ah, tis true indeed. This only shows up when one brings a newer driver
forward after the RT patch has been applied. I guess you would need to
coordinate this with Ingo.
Thanks,
Mark Huth
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-03-01 21:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01 2:54 [PATCH] e1000 stop raw interrupts disabled nag from RT Mark Huth
2007-03-01 3:18 ` Kok, Auke
2007-03-01 4:59 ` Mark Huth
2007-03-01 16:55 ` Kok, Auke
2007-03-01 17:11 ` Michal Schmidt
2007-03-01 17:29 ` Kok, Auke
2007-03-01 17:34 ` Michal Schmidt
2007-03-01 21:58 ` Mark Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).