LKML Archive on lore.kernel.org
 help / color / Atom feed
* DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
@ 2019-08-14 14:50 Corentin Labbe
  2019-08-14 17:49 ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Corentin Labbe @ 2019-08-14 14:50 UTC (permalink / raw)
  To: bskeggs, airlied, daniel, hch, m.szyprowski, robin.murphy
  Cc: dri-devel, nouveau, linux-kernel, iommu

Hello

Since lot of release (at least since 4.19), I hit the following error message:
DMA-API: cacheline tracking ENOMEM, dma-debug disabled

After hitting that, I try to check who is creating so many DMA mapping and see:
cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
      6 ahci
    257 e1000e
      6 ehci-pci
   5891 nouveau
     24 uhci_hcd

Does nouveau having this high number of DMA mapping is normal ?

Regards

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
  2019-08-14 14:50 DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ? Corentin Labbe
@ 2019-08-14 17:49 ` Daniel Vetter
  2019-08-15 13:35   ` Christoph Hellwig
  2019-08-16 14:31   ` Corentin Labbe
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2019-08-14 17:49 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: bskeggs, airlied, daniel, hch, m.szyprowski, robin.murphy,
	dri-devel, nouveau, linux-kernel, iommu

On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote:
> Hello
> 
> Since lot of release (at least since 4.19), I hit the following error message:
> DMA-API: cacheline tracking ENOMEM, dma-debug disabled
> 
> After hitting that, I try to check who is creating so many DMA mapping and see:
> cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
>       6 ahci
>     257 e1000e
>       6 ehci-pci
>    5891 nouveau
>      24 uhci_hcd
> 
> Does nouveau having this high number of DMA mapping is normal ?

Yeah seems perfectly fine for a gpu.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
  2019-08-14 17:49 ` Daniel Vetter
@ 2019-08-15 13:35   ` Christoph Hellwig
  2019-08-15 13:50     ` Robin Murphy
  2019-08-16 14:31   ` Corentin Labbe
  1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2019-08-15 13:35 UTC (permalink / raw)
  To: Corentin Labbe, bskeggs, airlied, hch, m.szyprowski,
	robin.murphy, dri-devel, nouveau, linux-kernel, iommu

On Wed, Aug 14, 2019 at 07:49:27PM +0200, Daniel Vetter wrote:
> On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote:
> > Hello
> > 
> > Since lot of release (at least since 4.19), I hit the following error message:
> > DMA-API: cacheline tracking ENOMEM, dma-debug disabled
> > 
> > After hitting that, I try to check who is creating so many DMA mapping and see:
> > cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
> >       6 ahci
> >     257 e1000e
> >       6 ehci-pci
> >    5891 nouveau
> >      24 uhci_hcd
> > 
> > Does nouveau having this high number of DMA mapping is normal ?
> 
> Yeah seems perfectly fine for a gpu.

That is a lot and apparently overwhelm the dma-debug tracking.  Robin
rewrote this code in Linux 4.21 to work a little better, so I'm curious
why this might have changes in 4.19, as dma-debug did not change at
all there.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
  2019-08-15 13:35   ` Christoph Hellwig
@ 2019-08-15 13:50     ` Robin Murphy
  0 siblings, 0 replies; 6+ messages in thread
From: Robin Murphy @ 2019-08-15 13:50 UTC (permalink / raw)
  To: Christoph Hellwig, Corentin Labbe, bskeggs, airlied,
	m.szyprowski, dri-devel, nouveau, linux-kernel, iommu

On 15/08/2019 14:35, Christoph Hellwig wrote:
> On Wed, Aug 14, 2019 at 07:49:27PM +0200, Daniel Vetter wrote:
>> On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote:
>>> Hello
>>>
>>> Since lot of release (at least since 4.19), I hit the following error message:
>>> DMA-API: cacheline tracking ENOMEM, dma-debug disabled
>>>
>>> After hitting that, I try to check who is creating so many DMA mapping and see:
>>> cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
>>>        6 ahci
>>>      257 e1000e
>>>        6 ehci-pci
>>>     5891 nouveau
>>>       24 uhci_hcd
>>>
>>> Does nouveau having this high number of DMA mapping is normal ?
>>
>> Yeah seems perfectly fine for a gpu.
> 
> That is a lot and apparently overwhelm the dma-debug tracking.  Robin
> rewrote this code in Linux 4.21 to work a little better, so I'm curious
> why this might have changes in 4.19, as dma-debug did not change at
> all there.

FWIW, the cacheline tracking entries are a separate thing from the 
dma-debug entries that I rejigged - judging by those numbers there 
should still be plenty of free dma-debug entries, but for some reason it 
has failed to extend the radix tree :/

Robin.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
  2019-08-14 17:49 ` Daniel Vetter
  2019-08-15 13:35   ` Christoph Hellwig
@ 2019-08-16 14:31   ` Corentin Labbe
  2019-08-16 18:45     ` Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Corentin Labbe @ 2019-08-16 14:31 UTC (permalink / raw)
  To: bskeggs, airlied, hch, m.szyprowski, robin.murphy, dri-devel,
	nouveau, linux-kernel, iommu

On Wed, Aug 14, 2019 at 07:49:27PM +0200, Daniel Vetter wrote:
> On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote:
> > Hello
> > 
> > Since lot of release (at least since 4.19), I hit the following error message:
> > DMA-API: cacheline tracking ENOMEM, dma-debug disabled
> > 
> > After hitting that, I try to check who is creating so many DMA mapping and see:
> > cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
> >       6 ahci
> >     257 e1000e
> >       6 ehci-pci
> >    5891 nouveau
> >      24 uhci_hcd
> > 
> > Does nouveau having this high number of DMA mapping is normal ?
> 
> Yeah seems perfectly fine for a gpu.

Note that it never go down and when I terminate my X session, it stays the same.
So without any "real" GPU work, does it is still normal to have so many active mapping ?

For example, when doing some transfer, the ahci mapping number changes and then always go down to 6.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ?
  2019-08-16 14:31   ` Corentin Labbe
@ 2019-08-16 18:45     ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2019-08-16 18:45 UTC (permalink / raw)
  To: Corentin Labbe
  Cc: Ben Skeggs, Dave Airlie, Christoph Hellwig, Marek Szyprowski,
	Robin Murphy, dri-devel, Nouveau Dev, Linux Kernel Mailing List,
	list@263.net:IOMMU DRIVERS, Joerg Roedel, iommu

On Fri, Aug 16, 2019 at 4:31 PM Corentin Labbe
<clabbe.montjoie@gmail.com> wrote:
> On Wed, Aug 14, 2019 at 07:49:27PM +0200, Daniel Vetter wrote:
> > On Wed, Aug 14, 2019 at 04:50:33PM +0200, Corentin Labbe wrote:
> > > Hello
> > >
> > > Since lot of release (at least since 4.19), I hit the following error message:
> > > DMA-API: cacheline tracking ENOMEM, dma-debug disabled
> > >
> > > After hitting that, I try to check who is creating so many DMA mapping and see:
> > > cat /sys/kernel/debug/dma-api/dump | cut -d' ' -f2 | sort | uniq -c
> > >       6 ahci
> > >     257 e1000e
> > >       6 ehci-pci
> > >    5891 nouveau
> > >      24 uhci_hcd
> > >
> > > Does nouveau having this high number of DMA mapping is normal ?
> >
> > Yeah seems perfectly fine for a gpu.
>
> Note that it never go down and when I terminate my X session, it stays the same.
> So without any "real" GPU work, does it is still normal to have so many active mapping ?

Might just be the dma_alloc cache. It should go down under memory
pressure I think. Otherwise might also be a leak.

> For example, when doing some transfer, the ahci mapping number changes and then always go down to 6.

gpu drivers tend to cache everything, all the time ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 14:50 DMA-API: cacheline tracking ENOMEM, dma-debug disabled due to nouveau ? Corentin Labbe
2019-08-14 17:49 ` Daniel Vetter
2019-08-15 13:35   ` Christoph Hellwig
2019-08-15 13:50     ` Robin Murphy
2019-08-16 14:31   ` Corentin Labbe
2019-08-16 18:45     ` Daniel Vetter

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox