Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1267297

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller
Date 2015-11-11 17:30 +0100
Message-ID <qtGrx-592-57@gated-at.bofh.it> (permalink)
References <qttaV-4YI-1@gated-at.bofh.it> <qtCHh-2HY-23@gated-at.bofh.it> <qtDjZ-3bH-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Måns Rullgård <mans@mansr.com>
Date: Wed, 11 Nov 2015 13:04:07 +0000

> Måns Rullgård <mans@mansr.com> writes:
> 
>> David Miller <davem@davemloft.net> writes:
>>
>>> From: Måns Rullgård <mans@mansr.com>
>>> Date: Wed, 11 Nov 2015 00:40:09 +0000
>>>
>>>> When the DMA complete interrupt arrives, the next chain should be
>>>> kicked off as quickly as possible, and I don't see why that would
>>>> benefit from being done in napi context.
>>>
>>> NAPI isn't about low latency, it's about fairness and interrupt
>>> mitigation.
>>>
>>> You probably don't even realize that all of the TX SKB freeing you do
>>> in the hardware interrupt handler end up being actually processed by a
>>> scheduled software interrupt anyways.
>>>
>>> So you are gaining almost nothing by not doing TX completion in NAPI
>>> context, whereas by doing so you would be gaining a lot including
>>> more simplified locking or even the ability to do no locking at all.
>>
>> TX completion is separate from restarting the DMA, and moving that to
>> NAPI may well be a good idea.  Should I simply napi_schedule() if the
>> hardware indicates TX is complete and do the cleanup in the NAPI poll
>> function?
> 
> I tried that, and throughput (as measured by iperf3) dropped by 2%.
> Maybe I did something wrong.

Did you fix all the locking in that change?

Since all of your TX handling runs in software interrupt context, you
can stop using IRQ locking and use BH locking driver-wide instead.

And actually, no locking is really needed for TX processing.  With
proper memory barriers and properly crafter queue state tests, you
can run completely lockless.

Again, look at example drivers.  I know, for example, that
drivers/net/ethernet/broadcom/tg3.c runs TX lockless.  You'll
see that tg3_tx() takes no locks at all.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller Francois Romieu <romieu@fr.zoreil.com> - 2015-11-11 00:40 +0100
  Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 01:50 +0100
    Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 03:20 +0100
      Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 13:30 +0100
        Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 14:10 +0100
          Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller Eric Dumazet <eric.dumazet@gmail.com> - 2015-11-11 14:40 +0100
            Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 14:50 +0100
              Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller Eric Dumazet <eric.dumazet@gmail.com> - 2015-11-11 15:10 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 15:20 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 15:40 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller Eric Dumazet <eric.dumazet@gmail.com> - 2015-11-11 15:50 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller Eric Dumazet <eric.dumazet@gmail.com> - 2015-11-11 15:50 +0100
          Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 17:30 +0100
            Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 19:30 +0100
              Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 20:10 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 20:20 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 20:20 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 20:30 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 20:30 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 20:40 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 20:50 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 21:50 +0100
                Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller Måns Rullgård <mans@mansr.com> - 2015-11-11 20:30 +0100
              Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 20:10 +0100
        Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800  Ethernet controller David Miller <davem@davemloft.net> - 2015-11-11 17:30 +0100

csiph-web