Help: How to change interrupt assignment & adjust their priority fornetwork devices? - BSD

This is a discussion on Help: How to change interrupt assignment & adjust their priority fornetwork devices? - BSD ; Hi all, I have integrated a network application inside FreeBSD kernel which requires to perform a very high packet rate, ie in the region 1.3~1.4 million packets per second. It's all working fine & beautifully. The box has two network ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Help: How to change interrupt assignment & adjust their priority fornetwork devices?

  1. Help: How to change interrupt assignment & adjust their priority fornetwork devices?

    Hi all,

    I have integrated a network application inside FreeBSD kernel which
    requires to perform a very high packet rate, ie in the region 1.3~1.4
    million packets per second. It's all working fine & beautifully.

    The box has two network cards. One has dual network ports (em0, em1)
    and one has a single port (em2). The dual network ports card is used
    for the kernelised network application and the single port card is
    used for controlling the application. However, FreeBSD configures all
    network devices into the same interrupt, ie em0, em1, em2 into
    interrupt 16.

    My goal is to make em2 somehow much more responsive. So when there
    is a packet arrives at em2, the kernel will process that packet first
    even though there are high packets rate going through em0 & em1.

    My puzzles is: should I adjust the scheduler class, priority of
    kernel threads? Or making em0 & em1 into one interrupt and em2 to
    another and adjust their properties? Or the problem simply lies
    elsewhere?

    Many thanks in advance
    Joe




  2. Re: Help: How to change interrupt assignment & adjust their priority for network devices?

    Begin <411ec880-bd71-49b5-a9d3-180cf31d8c24@a1g2000hsb.googlegroups.com>
    On Tue, 27 May 2008 07:12:23 -0700 (PDT), Joe wrote:
    > The box has two network cards. One has dual network ports (em0, em1)
    > and one has a single port (em2). The dual network ports card is used
    > for the kernelised network application and the single port card is
    > used for controlling the application.
    >
    > However, FreeBSD configures all network devices into the same
    > interrupt, ie em0, em1, em2 into interrupt 16.


    Not true in the general case, eg. my box has two fxp-driven boards, and
    they're on lines 11 and 9, respectively.


    > My goal is to make em2 somehow much more responsive. So when there
    > is a packet arrives at em2, the kernel will process that packet first
    > even though there are high packets rate going through em0 & em1.


    You'll have to ask someone else how the assigning logic works exactly,
    but a reasonable start is to open up the box and put at least one of the
    cards in a different slot.

    Another thing to try is to use options DEVICE_POLLING (see POLLING(4)).
    In fact, that option was added exactly to evenly distribute processing
    load in such a scenario.


    I'm not sure you can squeeze much more out of the machinery, though. I
    expect you're using peecee-class hardware that is not optimized for this
    kind of thing.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

+ Reply to Thread