Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 2015 17:00:03 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Adrian Chadd <adrian.chadd@gmail.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:  <20150831000003.GJ33167@funkthat.com>
In-Reply-To: <CAJ-VmonvrvpXDoqfsEffGSdnRkEL4w-6eBebwkWHXd8Hea-C3g@mail.gmail.com>
References:  <55DDE9B8.4080903@freebsd.org> <20150828184800.GE33167@funkthat.com> <CAFOYbcm55rJ2ZLyp0J8nkMcd2zCsTjS7GcbE1ZOJ7uXH91q7Bg@mail.gmail.com> <CAJ-VmonvrvpXDoqfsEffGSdnRkEL4w-6eBebwkWHXd8Hea-C3g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

> So - I'm all for doing it with a fast interrupt handler and a fast
> taskqueue. As long as we don't run things to completion and
> re-schedule the taskqueue (so other things on that core get network
> processing) then I'm okay.
> 
> (I kinda want us to have NAPI at some point...)

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150831000003.GJ33167>