[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6f6b1ca-03ee-c2f0-ffeb-c274e787706c@ti.com>
Date: Tue, 11 Feb 2020 12:13:51 +0200
From: Peter Ujfalusi <peter.ujfalusi@...com>
To: Vinod Koul <vkoul@...nel.org>,
Vignesh Raghavendra <vigneshr@...com>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<dan.j.williams@...el.com>, <grygorii.strashko@...com>
Subject: Re: [PATCH for-next 1/4] dmaengine: ti: k3-udma: Use
ktime/usleep_range based TX completion check
On 28/01/2020 14.44, Vinod Koul wrote:
> On 28-01-20, 17:35, Vignesh Raghavendra wrote:
>
>>>> + /* Transfer is incomplete, store current residue and time stamp */
>>>> if (peer_bcnt < bcnt) {
>>>> uc->tx_drain.residue = bcnt - peer_bcnt;
>>>> - uc->tx_drain.jiffie = jiffies;
>>>> + uc->tx_drain.tstamp = ktime_get();
>>>
>>> Any reason why ktime_get() is better than jiffies..?
>>
>> Resolution of jiffies is 4ms. ktime_t is has better resolution (upto ns
>> scale). With jiffies, I observed that code was either always polling DMA
>> progress counters (which affects HW data transfer speed) or sleeping too
>> long, both causing performance loss. Switching to ktime_t provides
>> better prediction of how long transfer takes to complete.
>
> Thanks for explanation, i think it is good info to add in changelog.
It turns out that this patch causes lockup with UART stress testing.
The strange thing is that we have identical patch in production with
4.19 without issues.
I'll send two series for UDMA update as we have found a way to induce a
kernel crash with experimental UART patches.
One with patches as must bug fixes for 5.6 and another one with lower
priority fixes.
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists