mbox series

[0/2] ALSA: memalloc: Fix for Xen PV and non-IOMMU systems

Message ID 20230124092744.27370-1-tiwai@suse.de (mailing list archive)
Headers show
Series ALSA: memalloc: Fix for Xen PV and non-IOMMU systems | expand

Message

Takashi Iwai Jan. 24, 2023, 9:27 a.m. UTC
Hi,

this is a patch series to address the recent regression on Xen PV (and
possibly non-IOMMU) systems about the SG-buffer memory allocation.
We switched to use dma_alloc_noncontiguous() as hoped it handling
everything right, but it turned out that this doesn't work always.
So this is one step back, use the explicit SG-buffer with
dma_alloc_coherent() calls, but in a bit more optimized ways, and also
applying only for those systems.


Takashi

===

Takashi Iwai (2):
  ALSA: memalloc: Explicit SG-allocations for Xen PV and non-IOMMU
    systems
  ALSA: memalloc: Use coherent DMA allocation for fallback again

 sound/core/memalloc.c | 68 +++++++++++++++++++++++++++++++++----------
 1 file changed, 53 insertions(+), 15 deletions(-)

Comments

Takashi Iwai Jan. 25, 2023, 3:29 p.m. UTC | #1
On Tue, 24 Jan 2023 10:27:42 +0100,
Takashi Iwai wrote:
> 
> Hi,
> 
> this is a patch series to address the recent regression on Xen PV (and
> possibly non-IOMMU) systems about the SG-buffer memory allocation.
> We switched to use dma_alloc_noncontiguous() as hoped it handling
> everything right, but it turned out that this doesn't work always.
> So this is one step back, use the explicit SG-buffer with
> dma_alloc_coherent() calls, but in a bit more optimized ways, and also
> applying only for those systems.

It seems that the second patch causes a problem; at least I see casual
Oopses on my system after using the patch.  Let's scratch.

I'll resubmit the fix.  Marek, could you try that later and report
back if it still works and doesn't break things again?


thanks,

Takashi
Marek Marczykowski-Górecki Jan. 25, 2023, 3:33 p.m. UTC | #2
On Wed, Jan 25, 2023 at 04:29:19PM +0100, Takashi Iwai wrote:
> On Tue, 24 Jan 2023 10:27:42 +0100,
> Takashi Iwai wrote:
> > 
> > Hi,
> > 
> > this is a patch series to address the recent regression on Xen PV (and
> > possibly non-IOMMU) systems about the SG-buffer memory allocation.
> > We switched to use dma_alloc_noncontiguous() as hoped it handling
> > everything right, but it turned out that this doesn't work always.
> > So this is one step back, use the explicit SG-buffer with
> > dma_alloc_coherent() calls, but in a bit more optimized ways, and also
> > applying only for those systems.
> 
> It seems that the second patch causes a problem; at least I see casual
> Oopses on my system after using the patch.  Let's scratch.
> 
> I'll resubmit the fix.  Marek, could you try that later and report
> back if it still works and doesn't break things again?

Sure, just cc me.