lkml.org 
[lkml]   [2015]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller
Date
David Miller <davem@davemloft.net> writes:

> From: Måns Rullgård <mans@mansr.com>
> Date: Wed, 11 Nov 2015 19:35:05 +0000
>
>>> I don't think it's silly at all.
>>
>> I'm sure I read somewhere that the time spent spinning on a lock should
>> be kept as small as possible.
>>
>>> And unless you can measure it making a difference, don't knock the idea.
>>
>> I tried using netif_tx_lock() in the IRQ handler instead, and it locked
>> up solid. Clearly that was the wrong thing to do.
>
> Oh that's right, it's a BH lock not an IRQ one.
>
> Yet another argument for doing everything in ->poll(), thus making all
> operations outside of NAPI scheduling run in software interrupt
> context, and therefore being able to make use of the TXQ lock for
> this.

Well, I tried calling the DMA restart function from NAPI poll under
netif_tx_lock(). Now it works only as long as there is incoming
traffic.

--
Måns Rullgård
mans@mansr.com


\
 
 \ /
  Last update: 2015-11-11 22:01    [W:0.071 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site