Re: [Nouveau] kernel spew from nouveau/ swiotlb

2018-05-10 Thread Mike Galbraith
On Thu, 2018-05-10 at 17:31 +0200, Mike Galbraith wrote:
> On Thu, 2018-05-10 at 10:31 -0400, Jerome Glisse wrote:
> > 
> > Could you bisect ? I would love to point finger upstream to the DMA
> > folk who made changes to that API without testing with GPU.
> 
> Rummaging a bit, it might be...
> 

(unsend, whack duplicate line, munge, send;)

> nouveau_bo_new()
> ...
> ttm_dma_pool_alloc_new_pages()
>   dma_alloc_attrs()
> ops->alloc() == x86_swiotlb_alloc_coherent()
> x86_swiotlb_alloc_coherent() flags |= __GFP_NOWARN;
>   swiotlb_alloc_coherent(..flags)
> swiotlb_alloc_coherent(..flags) attrs = (flags & __GFP_NOWARN) ? 
> DMA_ATTR_NO_WARN : 0;
>   swiotlb_alloc_buffer(..attrs)
*  swiotlb_tbl_map_single(..0) passed 0 vs attrs, gripeage follows

Or something like that.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] kernel spew from nouveau/ swiotlb

2018-05-10 Thread Mike Galbraith
On Thu, 2018-05-10 at 10:31 -0400, Jerome Glisse wrote:
> 
> Could you bisect ? I would love to point finger upstream to the DMA
> folk who made changes to that API without testing with GPU.

Rummaging a bit, it might be...

nouveau_bo_new()
...
ttm_dma_pool_alloc_new_pages()
  dma_alloc_attrs()
ops->alloc() == x86_swiotlb_alloc_coherent()
x86_swiotlb_alloc_coherent() flags |= __GFP_NOWARN;
  swiotlb_alloc_coherent(..flags)
swiotlb_alloc_coherent(..flags) attrs = (flags & __GFP_NOWARN) ? 
DMA_ATTR_NO_WARN : 0;
  swiotlb_alloc_buffer(..attr)
swiotlb_alloc_buffer(..0)  <== hm, pass zero instead of attr?
  swiotlb_tbl_map_single() gripeage

...that?

-Mike
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] kernel spew from nouveau/ swiotlb

2018-05-10 Thread Jerome Glisse
> Greetings,
> 
> When box is earning its keep, nouveau/swiotlb grumble.. a LOT.  The
> below is from master.today.
> 
> [12594.640959] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12594.693000] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12594.713787] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12594.743413] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12594.796740] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12607.000774] swiotlb_tbl_map_single: 54 callbacks suppressed
> [12607.000776] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12607.347941] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> [12608.677038] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152
> bytes)
> homer:/novell/ssh # dmesg|grep 'swiotlb buffer is full'|wc -l
> 2052
> homer:/novell/ssh # dmesg|grep 'callbacks suppressed'|wc -l
> 171
> 
> lib/swiotlb.c:
>  573 not_found:
>  574 spin_unlock_irqrestore(&io_tlb_lock, flags);
>  575 if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit())
>  576 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd
>  bytes)\n", size);
> 
> Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies?
> 

Could you bisect ? I would love to point finger upstream to the DMA
folk who made changes to that API without testing with GPU.

Cheers,
Jérôme
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] kernel spew from nouveau/ swiotlb

2018-05-10 Thread Mike Galbraith
On Thu, 2018-05-10 at 11:10 +0200, Mike Galbraith wrote:
> Greetings,
> 
> When box is earning its keep, nouveau/swiotlb grumble.. a LOT.  The
> below is from master.today.
> 
> [12594.640959] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12594.693000] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12594.713787] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12594.743413] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12594.796740] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12607.000774] swiotlb_tbl_map_single: 54 callbacks suppressed
> [12607.000776] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12607.347941] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> [12608.677038] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 
> bytes)
> homer:/novell/ssh # dmesg|grep 'swiotlb buffer is full'|wc -l
> 2052
> homer:/novell/ssh # dmesg|grep 'callbacks suppressed'|wc -l
> 171
> 
> lib/swiotlb.c:
>  573 not_found:
>  574 spin_unlock_irqrestore(&io_tlb_lock, flags);
>  575 if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit())
>  576 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd 
> bytes)\n", size);
> 
> Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies?

Or should ttm perhaps always use the one on hand?  (seems to work)

---
 drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
@@ -342,7 +342,7 @@ static struct dma_page *__ttm_dma_alloc_
if (!d_page)
return NULL;
 
-   if (pool->type & IS_HUGE)
+   if (1 || pool->type & IS_HUGE)
attrs = DMA_ATTR_NO_WARN;
 
vaddr = dma_alloc_attrs(pool->dev, pool->size, &d_page->dma,
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] kernel spew from nouveau/ swiotlb

2018-05-10 Thread Mike Galbraith
Greetings,

When box is earning its keep, nouveau/swiotlb grumble.. a LOT.  The
below is from master.today.

[12594.640959] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12594.693000] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12594.713787] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12594.743413] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12594.796740] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12607.000774] swiotlb_tbl_map_single: 54 callbacks suppressed
[12607.000776] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12607.347941] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
[12608.677038] nouveau :01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
homer:/novell/ssh # dmesg|grep 'swiotlb buffer is full'|wc -l
2052
homer:/novell/ssh # dmesg|grep 'callbacks suppressed'|wc -l
171

lib/swiotlb.c:
 573 not_found:
 574 spin_unlock_irqrestore(&io_tlb_lock, flags);
 575 if (!(attrs & DMA_ATTR_NO_WARN) && printk_ratelimit())
 576 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd 
bytes)\n", size);

Does nouveau perhaps want one of those DMA_ATTR_NO_WARN thingies?

-Mike
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau