Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 2015 17:24:48 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        John-Mark Gurney <jmg@funkthat.com>
Cc:        Jack Vogel <jfvogel@gmail.com>, Sean Bruno <sbruno@freebsd.org>,  "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: Network card interrupt handling
Message-ID:  <CAJ-Vmo=iBHMMzg-Hqg05OqkSto1mCAr4%2Btp8M-80ju57WFOktg@mail.gmail.com>
In-Reply-To: <20150831000003.GJ33167@funkthat.com>
References:  <55DDE9B8.4080903@freebsd.org> <20150828184800.GE33167@funkthat.com> <CAFOYbcm55rJ2ZLyp0J8nkMcd2zCsTjS7GcbE1ZOJ7uXH91q7Bg@mail.gmail.com> <CAJ-VmonvrvpXDoqfsEffGSdnRkEL4w-6eBebwkWHXd8Hea-C3g@mail.gmail.com> <20150831000003.GJ33167@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 August 2015 at 17:00, John-Mark Gurney <jmg@funkthat.com> wrote:
> Adrian Chadd wrote this message on Fri, Aug 28, 2015 at 12:41 -0700:
>> [snip]
>>
>> Well, the other big reason for doing it deferred like this is to avoid
>> network based deadlocks because you're being fed packets faster than
>> you can handle them. If you never yield, you stop other NIC
>> processing.
>
> You snipped the part of me asking isn't the interrupt thread just the
> same interruptable context as the task queue?  Maybe the priority is
> different, but that can be adjusted to be the same and still save the
> context switch...
>
> There is no break/moderation in the taskqueue, as it'll just enqueue
> itself, and when the task queue breaks out, it'll just immediately run
> itself, since it has a dedicated thread to itself... So, looks like
> you get the same spinning behavior...
>
>> People used to do run-to-completion and then complained when this
>> happened, so polling was a thing.
>
> Maybe when using PCI shared interrupts, but we are talking about PCIe
> MSI-X unshared interrupts.

Well, try it and see what happens. You can still get network livelock
and starvation of other interfaces with ridiculously high pps if you
never yield. :P



-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=iBHMMzg-Hqg05OqkSto1mCAr4%2Btp8M-80ju57WFOktg>