using get_system_info() - obtaining system load averages
Julian Elischer
julian at elischer.org
Tue Jan 10 19:24:45 PST 2006
kamal kc wrote:
>
>actually the thing is , i have put some code in the
>bridge.c
>routine that attempts to compress/decompress ip
>packets.
>
>i don't know if it was a good idea since i am just a
>beginner
>in programming in the kernel and have a little
>knowledge
>regarding it.
>
>after i put my code i got a very high amount
>of interrupts (irq 21: xl1 interrupts) that overloads
>the
>cpu withing seconds if i pump about 4Mbps traffic
>through it.
>
>so i thought as a temp solution that i could turn off
>the
>compression if ever the cpu gets overloaded and that's
>it.
>
>But after a second thought-->
> the very idea of putting the large compression
>routine
>in the bridge code now seems awkward to me. since the
>compression
>takes time and putting the code in the bridge may be
>causing high interrupts i now think if i can do the
>compression
>stuffs in separate thread/process than in the bridge
>process itself.
>
>but right now i don't know how do i create a separate
>process/thread,
>what are the routines that i need to implement for
>this..
>and also how to dispatch control from the bridge
>process to a new
>process without blocking. i am looking into these
>stuffs and
>hope i find something from the sources but it is
>getting really
>difficult ...
>
>maybe you people could have something to say, any
>advice
>on whether i am doing the right stuffs would be
>greatly
>helpful to me ..
>
>
>
you could bridge through a userland process using netgraph.
I've done it.. it does work. (doing other things than compression)
check out netgraph bridging..
More information about the freebsd-hackers
mailing list