mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ardelean, Alexandru" <Alex.Ardelean@analog.com>
To: "andy.shevchenko@gmail.com" <andy.shevchenko@gmail.com>,
	"vkoul@kernel.org" <vkoul@kernel.org>
Cc: "keescook@chromium.org" <keescook@chromium.org>,
	"bhole_prashant_q7@lab.ntt.co.jp"
	<bhole_prashant_q7@lab.ntt.co.jp>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"khandual@linux.vnet.ibm.com" <khandual@linux.vnet.ibm.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH] lib/scatterlist: introduce sg_nents_for_dma() helper
Date: Wed, 27 Feb 2019 12:26:07 +0000	[thread overview]
Message-ID: <26f1c0d1a7d98a6a41301d58e53bd9abc1d2f5c9.camel@analog.com> (raw)
In-Reply-To: <CAHp75VdgwM_ybfymh28iqxu2qOfzZo79VOF+XE+brj70Aji6YQ@mail.gmail.com>

On Wed, 2019-02-27 at 11:46 +0200, Andy Shevchenko wrote:
> [External]
> 
> 
> +Cc Vinod
> 
> On Wed, Feb 27, 2019 at 11:45 AM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > 
> > On Wed, Feb 27, 2019 at 10:51 AM Alexandru Ardelean
> > <alexandru.ardelean@analog.com> wrote:
> > > 
> > > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > 
> > > Sometimes the user needs to split each entry on the mapped scatter
> > > list
> > > due to DMA length constrains. This helper returns a number of
> > > entities
> > > assuming that each of them is not bigger than supplied maximum
> > > length.
> > > 
> > > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > 
> > Hmm... Usually we don't accept generic API without users.
> > Do you have any use case in mind?

Yep: this one:
https://patchwork.kernel.org/patch/10814527/

But, I can rework this patch to work without the helper.

> > 
> > > Patch was sent in 2016 initially to the DMA engine sub-system.
> > > Link:
> > >   https://patchwork.kernel.org/patch/9389821/
> > > This was part of a larger series:
> > >   
> > > https://patchwork.kernel.org/project/linux-dmaengine/list/?q=sg_nents_for_dma&archive=both&series=&submitter=&delegate=&state=*
> > > 
> > > I'm not sure if this is supposed to go into DMAEngine or
> > > lib/scatterlist.
> > > It doesn't look like lib/scatterlist is managed by DMAEngine, so (by
> > > using
> > > the `get_maintainers.pl` script) I'm sending this patch to this group
> > > of
> > > parties.
> > 
> > The problem the patch tried to solve is much deeper and correct
> > solution should be more generic, i.e.
> > each channel should provide a set of parameters, such as DMA segment
> > size, to the users (via DMA engine API) and users should prepare the
> > SG list according to the limits of the channel.
> > In that case we don't need to re-split/re-allocate given SG list at
> > all, which would simplify DMA slave drivers and their users.
> > 

I don't think I managed to follow [or find] the full length of that
discussion. Or, the conclusion wasn't that obvious to me, from what I
found.
I assumed this may have been dropped/forgotten.

In any case, I am fine with just reworking.

> > We discussed this topic back in 2016 with Vinod on LPC, but seems it's
> > not critical to solve. My case is to improve DMA performance for 8250
> > UART.
> > 
> > --
> > With Best Regards,
> > Andy Shevchenko
> 
> 
> 
> --
> With Best Regards,
> Andy Shevchenko

  reply	other threads:[~2019-02-27 12:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27  8:50 Alexandru Ardelean
2019-02-27  9:45 ` Andy Shevchenko
2019-02-27  9:46   ` Andy Shevchenko
2019-02-27 12:26     ` Ardelean, Alexandru [this message]
2019-02-27 14:15       ` Andy Shevchenko
2019-02-28 12:02         ` Ardelean, Alexandru
2019-02-28 14:26         ` Christoph Hellwig

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=26f1c0d1a7d98a6a41301d58e53bd9abc1d2f5c9.camel@analog.com \
    --to=alex.ardelean@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bhole_prashant_q7@lab.ntt.co.jp \
    --cc=john.fastabend@gmail.com \
    --cc=keescook@chromium.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®