From: Tejun Heo <tj@kernel.org>
To: Joerg Roedel <joro@8bytes.org>
Cc: Shuah Khan <shuah.kh@samsung.com>,
Eli Billauer <eli.billauer@gmail.com>,
devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
bhelgaas@google.com, linux-kernel@vger.kernel.org,
linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org,
discuss@x86-64.org
Subject: Re: [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single()
Date: Wed, 4 Jun 2014 10:04:08 -0400 [thread overview]
Message-ID: <20140604140408.GC5004@htj.dyndns.org> (raw)
In-Reply-To: <20140603233907.GB23880@8bytes.org>
Hello,
On Wed, Jun 04, 2014 at 01:39:07AM +0200, Joerg Roedel wrote:
> I fully agree with the points Shuah brought up here. I don't think it is
> a good idea to add this kind of resource management to runtime-allocated
> (and de-allocated) resources of device drivers.
>
> Also DMA handles are not something that could be garbage collected at
> driver unload time. They are a limited resource that may be used up at
> some point. And the whole point of a devm-API is that code can be
> simpler because we don't need to de-allocate everything on the
> error-path or at unload time, no?
Hmmm? Don't we have drivers which map dma buffers on device init and
release them on exit? For dynamic usages, its usefulness is limited
especially given that dynamic tracking of buffers usually would
involve tracking of other information too in addition to dma buffer
pointer themselves. If alloc on init and free on exit is a very rare
usage pattern, I have no objection against not adding devm interface
for dma mappings.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-06-04 14:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 7:01 [PATCH v2 0/4] devres: dma-mapping: Introducing new functions Eli Billauer
2014-06-01 7:01 ` [PATCH v2 1/4] dma-mapping: Add devm_ interface for dma_map_single() Eli Billauer
2014-06-03 21:24 ` Shuah Khan
2014-06-03 23:39 ` Joerg Roedel
2014-06-04 14:04 ` Tejun Heo [this message]
2014-06-04 14:12 ` Joerg Roedel
2014-06-04 14:14 ` Tejun Heo
2014-06-04 15:03 ` Eli Billauer
2014-06-04 21:25 ` Joerg Roedel
2014-06-06 11:45 ` Eli Billauer
2014-06-06 16:01 ` Greg KH
2014-06-06 16:21 ` Eli Billauer
2014-06-06 17:02 ` Shuah Khan
2014-06-07 11:23 ` Eli Billauer
2014-06-01 7:01 ` [PATCH v2 2/4] dma-mapping: Add devm_ interface for dma_map_single_attrs() Eli Billauer
2014-06-01 7:01 ` [PATCH v2 3/4] dma-mapping: pci: Add devm_ interface for pci_map_single Eli Billauer
2014-06-01 7:01 ` [PATCH v2 4/4] staging: xillybus: Use devm_ API for memory allocation and DMA mapping Eli Billauer
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=20140604140408.GC5004@htj.dyndns.org \
--to=tj@kernel.org \
--cc=bhelgaas@google.com \
--cc=devel@driverdev.osuosl.org \
--cc=discuss@x86-64.org \
--cc=eli.billauer@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=shuah.kh@samsung.com \
/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).