mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dan Williams" <dan.j.williams@intel.com>
To: "Guennadi Liakhovetski" <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org,
	linux-fbdev-devel@lists.sourceforge.net, adaplas@gmail.com,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH 1/4 v2] dmaengine: add a tx_free method to struct dma_async_tx_descriptor
Date: Thu, 11 Dec 2008 09:43:05 -0700	[thread overview]
Message-ID: <e9c3a7c20812110843p32d768c1k8e119d23b12a5fd0@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0812111639540.6881@axis700.grange>

On Thu, Dec 11, 2008 at 8:55 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> How does the struct's size impact their cache utilisation then?

Increasing the size may push some fields across a cache-line boundary
leading to an additional cache-lines that need to
filled/kept-coherent/etc...  See pahole:
http://lwn.net/Articles/206805/

>
>> > And you mean, that increasing the size
>> > of the struct by one pointer and letting users explicitly free those
>> > descriptors when they want is worse than introducing a tasklet that will
>> > have to periodically scan the list of descriptors while other hot paths
>> > will move elements to and from this list, look for acked elements, lock
>> > the list and free those elements? Periodically, because although we have
>> > an event when to free them - on ioctl - there is no API to trigger that
>> > tasklet.
>>
>> There are a few events that trigger this: completion interrupt,
>> someone polls is_tx_complete, we run out of descriptors.
>
> Sorry, actually, it's not VIDIOC_DQBUF where we have to free buffer(s),
> it's VIDIOC_STREAMOFF. And in a normal case there are no more completion
> interrupts, no allocation requests, and noone is interested in
> is_tx_complete. Normally you would just get a dma_release_channel after
> that. Or, of course, the application may decide to restart capture, then
> we get requests, completions, etc. again. So, yes, I could do this, it
> just seems a bit unnatural to me.

Could the application tolerate another call to dma_request_channel
when it restarts?  I.e. just call dma_release_channel from the ioctl
to clean everything up and not worry about another free() mechanism?

Thanks,
Dan

  reply	other threads:[~2008-12-11 16:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 10:35 [PATCH 0/4 v2] i.MX31: dmaengine and framebuffer drivers Guennadi Liakhovetski
2008-12-10 10:36 ` [PATCH 1/4 v2] dmaengine: add a tx_free method to struct dma_async_tx_descriptor Guennadi Liakhovetski
2008-12-10 19:58   ` Dan Williams
2008-12-11  0:30     ` Guennadi Liakhovetski
2008-12-11  2:01       ` Dan Williams
2008-12-11 15:55         ` Guennadi Liakhovetski
2008-12-11 16:43           ` Dan Williams [this message]
2008-12-11 16:56             ` Guennadi Liakhovetski
2008-12-10 10:36 ` [PATCH 2/4 v2] i.MX31: Image Processing Unit DMA and IRQ drivers Guennadi Liakhovetski
2008-12-10 13:26   ` Dmitry Krivoschekov
2008-12-10 13:49     ` Guennadi Liakhovetski
2008-12-10 10:36 ` [PATCH 3/4 v2] i.MX31: framebuffer driver Guennadi Liakhovetski
2008-12-10 16:23   ` Herring Robert
2008-12-10 16:47     ` Guennadi Liakhovetski
2008-12-11  1:32       ` Herring Robert
2008-12-10 10:36 ` [PATCH 4/4 v2] i.MX31: platform bindings and initialisation for IPU and framebuffer drivers Guennadi Liakhovetski

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=e9c3a7c20812110843p32d768c1k8e119d23b12a5fd0@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=adaplas@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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®