Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Nicolas GRAUX <jean-nicolas.graux@st.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	Vinod Koul <vkoul@kernel.org>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] dmaengine: pl08x: be fair when re-assigning physical channel
Date: Mon, 4 Mar 2019 10:37:45 +0000	[thread overview]
Message-ID: <8b3ca76d-5df4-d63a-5bf9-83bfbe1a694c@st.com> (raw)
In-Reply-To: <CACRpkdYAK1_2pFtz2EAssGq5D_NQKFHuLKpC-_tV-MHO+yQCHA@mail.gmail.com>

Hello Linus,

You are welcome ;)

On 04/03/2019 11:00 AM, Linus Walleij wrote:
> Hi Jean-Nicolas,
>
> thanks for your patch!
>
> You will have to resent the patch to the DMAengine list and the maintainer
> (Vinod).

Sure I will. Sorry for that mistake.

>
> Out of curiosity: what platform are you using this on?

That's for the STMicro STA1295/STA1385 SoCs which make use of several 
ARM amba peripherals as well as nomadik gpio/pinctrl, etc ...
Those machines are unfortunately not available upstream. I would like to 
allocate time for that but as you know,
such activity require to dedicate substantial time & human resource. And 
we failed to find enough time for that up to now.

>
> On Fri, Mar 1, 2019 at 5:18 PM Jean-Nicolas Graux
> <jean-nicolas.graux@st.com> wrote:
>
>> Current way we find a waiting virtual channel for the next transfer
>> at the time one physical channel becomes free is not really fair.
>>
>> More in details, in case there is more than one channel waiting at a time,
>> by just going through the arrays of memcpy and slave channels and stopping
>> as soon as state match waiting state, channels with high indexes can be
>> penalized.
>>
>> Whenever dma engine is substantially overloaded so that we constantly
>> get several channels waiting, channels with highest indexes might not
>> be served for a substantial time which in the worse case, might hang
>> task that wait for dma transfer to complete.
>>
>> This patch makes physical channel re-assignment more fair by storing
>> time in jiffies when a channel is put in waiting state. Whenever a
>> physical channel has to be re-assigned, this time is used to select
>> channel that is waiting for the longest time.
>>
>> Signed-off-by: Jean-Nicolas Graux <jean-nicolas.graux@st.com>
> That's a neat trick, look like a good idea. Please add some
> comment in the code in pl08x_phy_free() so it is clear
> what is going on for people reading the code, with that:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

I will.

Thanks for the review.

Regards. Jean-Nicolas.

>
> Yours,
> Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-03-04 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 16:18 [PATCH] dmaengine: pl08x: be fair when re-assigning physical channel Jean-Nicolas Graux
2019-03-04 10:00 ` Linus Walleij
2019-03-04 10:37   ` Jean Nicolas GRAUX [this message]
2019-03-04 12:05     ` Linus Walleij
2019-03-04 13:59       ` Jean Nicolas GRAUX
  -- strict thread matches above, loose matches on Subject: below --
2019-03-04 15:03 Jean-Nicolas Graux
2019-03-25  5:13 ` Vinod Koul
2019-03-25  8:15   ` Jean Nicolas GRAUX

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=8b3ca76d-5df4-d63a-5bf9-83bfbe1a694c@st.com \
    --to=jean-nicolas.graux@st.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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