All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Galbraith <efault-Mmb7MZpHnFY@public.gmane.org>
To: nouveau <nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: Christian Koenig <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
	Roger He <Hongbo.He-5C7GfCeVMHo@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [patch] swiotlb: fix ignored DMA_ATTR_NO_WARN request
Date: Sat, 12 May 2018 09:11:00 +0200	[thread overview]
Message-ID: <1526109060.20556.1.camel@gmx.de> (raw)
In-Reply-To: <1526051730.23162.3.camel-Mmb7MZpHnFY@public.gmane.org>

To conclude to this snail like thread (/me=walking wounded), with the
v4.16.8 hunk below, traces showing that swiotlb_alloc_coherent() was
being asked to not bother warning started showing up after the box had
been flogged for a while.

Whatever finally happens with swiotlb (seems to be in flux), other
folks meeting annoying gripeage can find bandaids in the interim.

The End

v4.16.8 !DMA_DIRECT_OPS
Xorg-3105  [001] ....  2156.711471: swiotlb_alloc_coherent+0xa7/0x1e0: yup
Xorg-3105  [001] ....  2156.711497: <stack trace>
 => ttm_dma_populate+0x23c/0x310 [ttm]
 => ttm_tt_bind+0x31/0x60 [ttm]
 => ttm_bo_handle_move_mem+0x527/0x580 [ttm]
 => ttm_bo_validate+0xfb/0x110 [ttm]
 => ttm_bo_init_reserved+0x289/0x450 [ttm]
 => ttm_bo_init+0x77/0xd0 [ttm]
 => nouveau_bo_new+0x3fc/0x5e0 [nouveau]
 => nouveau_gem_new+0x66/0x110 [nouveau]
 => nouveau_gem_ioctl_new+0x48/0xc0 [nouveau]
 => drm_ioctl_kernel+0x66/0xb0 [drm]
 => drm_ioctl+0x2a4/0x360 [drm]
 => nouveau_drm_ioctl+0x50/0xb0 [nouveau]
 => do_vfs_ioctl+0x92/0x5e0
 => SyS_ioctl+0x3b/0x70
 => do_syscall_64+0x74/0x1a0
 => entry_SYSCALL_64_after_hwframe+0x3d/0xa2

--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -28,10 +28,8 @@ void *x86_swiotlb_alloc_coherent(struct
 	 * swiotlb_alloc_coherent() will print a warning when the DMA
 	 * memory allocation ultimately failed.
 	 */
-	flags |= __GFP_NOWARN;
-
-	vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags,
-					   attrs);
+	vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle,
+					   flags | __GFP_NOWARN, attrs);
 	if (vaddr)
 		return vaddr;
 
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

WARNING: multiple messages have this Message-ID (diff)
From: Mike Galbraith <efault@gmx.de>
To: nouveau <nouveau@lists.freedesktop.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Ben Skeggs <bskeggs@redhat.com>,
	Christian Koenig <christian.koenig@amd.com>,
	Roger He <Hongbo.He@amd.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [patch] swiotlb: fix ignored DMA_ATTR_NO_WARN request
Date: Sat, 12 May 2018 09:11:00 +0200	[thread overview]
Message-ID: <1526109060.20556.1.camel@gmx.de> (raw)
In-Reply-To: <1526051730.23162.3.camel@gmx.de>

To conclude to this snail like thread (/me=walking wounded), with the
v4.16.8 hunk below, traces showing that swiotlb_alloc_coherent() was
being asked to not bother warning started showing up after the box had
been flogged for a while.

Whatever finally happens with swiotlb (seems to be in flux), other
folks meeting annoying gripeage can find bandaids in the interim.

The End

v4.16.8 !DMA_DIRECT_OPS
Xorg-3105  [001] ....  2156.711471: swiotlb_alloc_coherent+0xa7/0x1e0: yup
Xorg-3105  [001] ....  2156.711497: <stack trace>
 => ttm_dma_populate+0x23c/0x310 [ttm]
 => ttm_tt_bind+0x31/0x60 [ttm]
 => ttm_bo_handle_move_mem+0x527/0x580 [ttm]
 => ttm_bo_validate+0xfb/0x110 [ttm]
 => ttm_bo_init_reserved+0x289/0x450 [ttm]
 => ttm_bo_init+0x77/0xd0 [ttm]
 => nouveau_bo_new+0x3fc/0x5e0 [nouveau]
 => nouveau_gem_new+0x66/0x110 [nouveau]
 => nouveau_gem_ioctl_new+0x48/0xc0 [nouveau]
 => drm_ioctl_kernel+0x66/0xb0 [drm]
 => drm_ioctl+0x2a4/0x360 [drm]
 => nouveau_drm_ioctl+0x50/0xb0 [nouveau]
 => do_vfs_ioctl+0x92/0x5e0
 => SyS_ioctl+0x3b/0x70
 => do_syscall_64+0x74/0x1a0
 => entry_SYSCALL_64_after_hwframe+0x3d/0xa2

--- a/arch/x86/kernel/pci-swiotlb.c
+++ b/arch/x86/kernel/pci-swiotlb.c
@@ -28,10 +28,8 @@ void *x86_swiotlb_alloc_coherent(struct
 	 * swiotlb_alloc_coherent() will print a warning when the DMA
 	 * memory allocation ultimately failed.
 	 */
-	flags |= __GFP_NOWARN;
-
-	vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle, flags,
-					   attrs);
+	vaddr = dma_generic_alloc_coherent(hwdev, size, dma_handle,
+					   flags | __GFP_NOWARN, attrs);
 	if (vaddr)
 		return vaddr;
 

  parent reply	other threads:[~2018-05-12  7:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  9:10 kernel spew from nouveau/ swiotlb Mike Galbraith
2018-05-10  9:10 ` Mike Galbraith
     [not found] ` <1525943427.8013.11.camel-Mmb7MZpHnFY@public.gmane.org>
2018-05-10 10:28   ` Mike Galbraith
2018-05-10 10:28     ` Mike Galbraith
     [not found]     ` <1525948096.29445.4.camel-Mmb7MZpHnFY@public.gmane.org>
2018-05-11  7:13       ` Mike Galbraith
2018-05-11  7:13         ` Mike Galbraith
     [not found]         ` <1526022830.6288.3.camel-Mmb7MZpHnFY@public.gmane.org>
2018-05-11 15:15           ` [patch] swiotlb: fix ignored DMA_ATTR_NO_WARN request Mike Galbraith
2018-05-11 15:15             ` Mike Galbraith
     [not found]             ` <1526051730.23162.3.camel-Mmb7MZpHnFY@public.gmane.org>
2018-05-12  7:11               ` Mike Galbraith [this message]
2018-05-12  7:11                 ` Mike Galbraith
2018-05-10 14:31   ` kernel spew from nouveau/ swiotlb Jerome Glisse
2018-05-10 14:31     ` [Nouveau] " Jerome Glisse
     [not found]     ` <474293973.18773550.1525962696189.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-05-10 15:31       ` Mike Galbraith
2018-05-10 15:31         ` [Nouveau] " Mike Galbraith
2018-05-10 16:30         ` Mike Galbraith

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=1526109060.20556.1.camel@gmx.de \
    --to=efault-mmb7mzphnfy@public.gmane.org \
    --cc=Hongbo.He-5C7GfCeVMHo@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=hch-jcswGhMUV9g@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.