From: Mark-PK Tsai via iommu <iommu@lists.linux-foundation.org>
To: <robin.murphy@arm.com>
Cc: mathieu.poirier@linaro.org, yj.chiang@mediatek.com,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux-foundation.org,
linux-mediatek@lists.infradead.org, mark-pk.tsai@mediatek.com,
matthias.bgg@gmail.com, hch@lst.de,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/2] dma-mapping, remoteproc: Fix dma_mem leak after rproc_shutdown
Date: Mon, 23 May 2022 20:27:23 +0800 [thread overview]
Message-ID: <20220523122723.32602-1-mark-pk.tsai@mediatek.com> (raw)
In-Reply-To: <6f1f48e2-a54d-58d6-8946-853cffeb55df@arm.com>
> >> Sigh. In theory drivers should never declare coherent memory like
> >> this, and there has been some work to fix remoteproc in that regard.
> >>
> >> But I guess until that is merged we'll need somthing like this fix.
> >
> > Hi,
> >
> > Thanks for your comment.
> > As I didn't see other fix of this issue, should we use this patch
> > before the remoteproc work you mentioned is merged?
>
> TBH I think it would be better "fixed" with a kmemleak_ignore() and a
> big comment, rather than adding API cruft for something that isn't a
> real problem. I'm quite sure that no real-world user is unbinding
> remoteproc drivers frequently enough that leaking a 48-byte allocation
> each time has any practical significance.
>
Actually we stop 2 remote processors using the same remoteproc driver
when system suspend or screen off on our arm64 platform.
And the 48-byte slab allocation will be aligned up to 128 bytes on arm64.
So the leak can be significant in our use case especially
in stress test...
We really don't want to ignore it. Maybe there're other way to fix
it without adding APIs?
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2022-05-23 12:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 6:24 [PATCH 0/2] dma-mapping, remoteproc: Fix dma_mem leak after rproc_shutdown Mark-PK Tsai via iommu
2022-04-22 6:24 ` [PATCH 1/2] dma-mapping: Add dma_release_coherent_memory to DMA API Mark-PK Tsai via iommu
2022-04-22 6:24 ` [PATCH 2/2] remoteproc: Fix dma_mem leak after rproc_shutdown Mark-PK Tsai via iommu
2022-04-23 17:46 ` [PATCH 0/2] dma-mapping, " Christoph Hellwig
2022-05-23 10:15 ` Mark-PK Tsai via iommu
2022-05-23 10:24 ` Robin Murphy
2022-05-23 12:27 ` Mark-PK Tsai via iommu [this message]
2022-06-22 16:25 ` Mathieu Poirier
2022-06-23 5:42 ` Christoph Hellwig
2022-06-24 16:48 ` Mathieu Poirier
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=20220523122723.32602-1-mark-pk.tsai@mediatek.com \
--to=iommu@lists.linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mark-pk.tsai@mediatek.com \
--cc=mathieu.poirier@linaro.org \
--cc=matthias.bgg@gmail.com \
--cc=robin.murphy@arm.com \
--cc=yj.chiang@mediatek.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