DragonFly kernel List (threaded) for 2007-09
DragonFly BSD
DragonFly kernel List (threaded) for 2007-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Question(s) kernel


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Sep 2007 11:48:19 -0700 (PDT)

:Hi
:
:I have been browsing the Dragonfly kernel code and two questions came up=
::
:
:(1) if a user process causes many "lwkt_sendmsg", either by directly  =
:
:invoking it or through
:     some table based system call. Could this lead to memory exhaustion =
:in  =
:
:the kernel by flooding
:     the target port and eventually crash the system?

    Theoretically if the message is being allocated dynamically, but
    lwkt_sendmsg() is only used in a few fairly restricted situations.
    Most of the hot-path messaging uses lwkt_domsg(), which is synchronous,
    or a facility will pre-allocate a message for signaling purposes and
    only allows one to be in transit at any given moment.

:(2) http://fxr.watson.org/fxr/source/netinet/if_ether.c?v=3DDFBSD#L832
:   "lwkt_domsg(rtable_portfn(0), &msg.netmsg.nm_lmsg, 0);"
:   Is this always using cpu 0 ? And if, why?
:
:Thank you for your answers or pointers to previous posts I missed :-)
:
:Dominic

    This code is adding the ARP information to the route table.  Because
    the route table is per-cpu the message must be chained to all the cpus
    starting with cpu 0.  It's just easier to do it that way, ARP does
    not require a high performance algorithm and once the BGL is removed
    from that path the overhead will be distributed evenly across all cpus.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]