Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1198678

Re: [SHDCI] Heavy (thousands) DMA leaks

From Jiri Slaby <jslaby@suse.cz>
Newsgroups linux.kernel
Subject Re: [SHDCI] Heavy (thousands) DMA leaks
Date 2015-08-03 11:40 +0200
Message-ID <pTknV-7ws-41@gated-at.bofh.it> (permalink)
References <pRStI-2Ml-21@gated-at.bofh.it> <pTknT-7ws-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

On 08/03/2015, 11:30 AM, Chen Bough wrote:
> I carefully review my patch, all the DMA memory mapped in sdhci_pre_req() is unmapped in sdhci_post_req.

I suspect 'host_cookie' or 'next' handling is bad somewhere. But I don't
know...

> Can you provide the method of your testing DMA leaks?

boot kernel with CONFIG_DMA_API_DEBUG
insert the card
mount it
rsync from the card ~200 MB
umount it
unload the sdhci driver
the leak warning is reported

I am not sure whether suspend-resume is needed after the first step.

> You said over 4000 leaked mappings during one card transfer, if true, 
> We can't map any dma memory after some sd transfer, do you meet this?

Yes, I see:
sdhci-pci 0000:02:00.0: swiotlb buffer is full (sz: 65536 bytes)
after some time. The driver falls back to non-DMA transfers after that.
It also generates a warning about that:
WARNING: CPU: 0 PID: 0 at drivers/mmc/host/sdhci.c:857
sdhci_prepare_data+0x8ec/0x900 [sdhci]()

thanks,
-- 
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[SHDCI] Heavy (thousands) DMA leaks Jiri Slaby <jslaby@suse.cz> - 2015-07-30 11:40 +0200
  RE: [SHDCI] Heavy (thousands) DMA leaks Chen Bough <Haibo.Chen@freescale.com> - 2015-08-03 11:40 +0200
    Re: [SHDCI] Heavy (thousands) DMA leaks Jiri Slaby <jslaby@suse.cz> - 2015-08-03 11:40 +0200

csiph-web