[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] RT Ethernet
On Thu, 9 Sep 1999, Michael M. Morrison wrote:
> It appears (from several messages) that we are not supposed to be doing any
> dev_alloc_skb()'s if they are eventually calling kmalloc(). The funny thing
> is that the machine has been running constantly for the past 3 days with no
> errors at all, and has been dev_alloc'ing skb's 800 times per second. I
> will look into changing this in our code, however.
This is because these dev_alloc_skb() et al. functions are designed to be
called from the interrupt, thus are almost real time. I think there is no
problem with them blocking, because they get memory from a small pool which
is always kept free (about 200-1000 KB). The only problem I can predict is
when standard Linux kernel calls dev_alloc_skb(), it executes cli(), but this
is only soft cli(), then the RT interrupt or timer comes and you call this
function again. It is not very probable, but crashes once a month are very
hard to debug. I would recompile the kernel, replacing cli() at al. in the
network code you are using with with their RT Linux hard equivalents.
Or just let standard kernel use the code compiled with -D__RT__ and
link your module statically with the code compiled without this flag (thus
using all hard cli() et al.). Or some other tricks like that. Or use some
semaphores..
In my opinion the network code in standard Linux is already very close
to real-time. The only problem is some other parts of kernel disabling
interrupts. One thing you should do first then is using hdparm with -u flag
to enable interrupts during HD access.
Recompiling the whole linux/net and linux/drivers/net subdirectories without
-D__RT__ flag and testing it would make very interesting experiment :-)
Of course then the network drivers should request RT interrupts. May be it
would be reasonable to invent __MAKE_RT__ flag to define all interrupt/timer
related constructs standard kernel is using as their RT equivalents?
--
Tomek
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/