dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vkoul@kernel.org>, Vignesh Raghavendra <vigneshr@ti.com>
Cc: <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<dan.j.williams@intel.com>, <grygorii.strashko@ti.com>
Subject: Re: [PATCH for-next 1/4] dmaengine: ti: k3-udma: Use ktime/usleep_range based TX completion check
Date: Tue, 11 Feb 2020 12:13:51 +0200	[thread overview]
Message-ID: <f6f6b1ca-03ee-c2f0-ffeb-c274e787706c@ti.com> (raw)
In-Reply-To: <20200128124403.GV2841@vkoul-mobl>



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

  reply	other threads:[~2020-02-11 10:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 13:21 [PATCH for-next 0/4] dmaengine: ti: k3-udma: Updates for next Peter Ujfalusi
2020-01-27 13:21 ` [PATCH for-next 1/4] dmaengine: ti: k3-udma: Use ktime/usleep_range based TX completion check Peter Ujfalusi
2020-01-28 11:48   ` Vinod Koul
2020-01-28 12:05     ` Vignesh Raghavendra
2020-01-28 12:44       ` Vinod Koul
2020-02-11 10:13         ` Peter Ujfalusi [this message]
2020-01-27 13:21 ` [PATCH for-next 2/4] dmaengine: ti: k3-udma: Workaround for RX teardown with stale data in peer Peter Ujfalusi
2020-01-27 13:21 ` [PATCH for-next 3/4] dmaengine: ti: k3-udma: Move the TR counter calculation to helper function Peter Ujfalusi
2020-01-27 13:21 ` [PATCH for-next 4/4] dmaengine: ti: k3-udma: Use the TR counter helper for slave_sg and cyclic Peter Ujfalusi
2020-01-28 10:15 ` [PATCH for-next 0/4] dmaengine: ti: k3-udma: Updates for next Peter Ujfalusi
2020-01-28 11:50   ` Vinod Koul
2020-01-28 12:37     ` Peter Ujfalusi
2020-01-30 13:19       ` Peter Ujfalusi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f6f6b1ca-03ee-c2f0-ffeb-c274e787706c@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).