All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: emu10k1 driver can't allocate memory
       [not found] <CAHYJk3R0aS84KYLXFtWmxaHWQG+vdy3xSmXpVO+vN8w7ov2XSQ@mail.gmail.com>
@ 2012-05-29  9:57 ` Takashi Iwai
  2012-06-27 13:41   ` Thomas Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-05-29  9:57 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: alsa-devel

At Sun, 20 May 2012 03:04:14 +0200,
Mikael Magnusson wrote:
> 
> Hi, (please CC me on replies, not subscribed)
> 
> I recently upgraded to 3.3.6 from 2.6.33.15 (yeah, I know). Since then
> I noticed sometimes sounds were sometimes missing, then I noticed
> thousands of these in dmesg,
> [37280.283484] max memory size is 0x7fffffff (addr = 0x1d5d70071038000)!!

I guess you are enabling IOMMU?  I guess it translates the address
somehow in a way emu10k1 doesn't like.
There are really little changes in emu10k1 driver itself, so if the
kernel upgrade changes the behavior, it must be in the core part such
like IOMMU handling.

Try to boot without iommu and see whether it changes the behavior
again.


Takashi

> [37280.283486] emu: failure page = 32
> I also checked asfxload -M output, right after boot it shows all the
> synth memory free as you would expect, but after a while of usage, it
> is close to 0 (around 50KiB or so). Trying to run a simple program
> that writes to /dev/audio fails with
> write(3</dev/audio>,
> "\32\21\t\3\0\0\4\n\23\34&/6:;94,#\31\17\10\2\0\0\4\v\24\36(07"...,
> 4096) = -1 ENOMEM (Cannot allocate memory)
> You can also note the output from asfxload -M dropping rapidly while
> the program is making sound before it fails. Native alsa apps seem to
> fare slightly better as the memory decrease caused by them is actually
> returned when they close the device again.
> 
> Loading and unloading soundfonts seem to work as normal, the memory is
> returned when the soundfont is unloaded afaict. (I have the patch
> applied that makes it possible to load soundfonts (changes the DMA32
> zone to 2GB). I don't think this is the cause of my problem since the
> given addresses are way way outside the 4GB range as well.)
> 
> Note that even well before the reported memory is at 0, apps randomly
> fail to open the sound output and are silent. Curiously espeak when
> successful doesn't cause a decrease in available memory, but when it
> fails, it causes about 100KiB drop.
> 
> I can't (don't dare) bisect because this is my production machine, but
> I can test patches, or check the major releases between 2.6.33 and
> 3.3.6 if you have no idea what causes this.
> 
> I'm not the only one with the problem either,
> http://www.google.com/search?nfpr=1&tbs=li:1&q=emu%3A+failure+page+%3D+32+max+memory+size+is+0x7fffffff
> 
> -- 
> Mikael Magnusson
> 

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

* Re: emu10k1 driver can't allocate memory
  2012-05-29  9:57 ` emu10k1 driver can't allocate memory Takashi Iwai
@ 2012-06-27 13:41   ` Thomas Richter
  2012-06-27 14:00     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Richter @ 2012-06-27 13:41 UTC (permalink / raw)
  To: alsa-devel

T
> > Hi, (please CC me on replies, not subscribed)
> > 
> > I recently upgraded to 3.3.6 from 2.6.33.15 (yeah, I know). Since then
> > I noticed sometimes sounds were sometimes missing, then I noticed
> > thousands of these in dmesg,
> > [37280.283484] max memory size is 0x7fffffff (addr = 0x1d5d70071038000)!!
> 
> I guess you are enabling IOMMU?  I guess it translates the address
> somehow in a way emu10k1 doesn't like.
> There are really little changes in emu10k1 driver itself, so if the
> kernel upgrade changes the behavior, it must be in the core part such
> like IOMMU handling.
> 
> Try to boot without iommu and see whether it changes the behavior
> again.

This is *not* a IOMMU configuration issue. It is an issue of where the
emu10k1 allows DMA, and what the kernel does about it. If you have more
than 2GB of memory, and the system runs out of 16MB ISA space, you see
exactly this happening.

There is a kernel patch for this:

https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456

Greetings,

Thomas

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

* Re: emu10k1 driver can't allocate memory
  2012-06-27 13:41   ` Thomas Richter
@ 2012-06-27 14:00     ` Takashi Iwai
  2012-06-27 15:07       ` Thomas Richter
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2012-06-27 14:00 UTC (permalink / raw)
  To: Thomas Richter; +Cc: alsa-devel

At Wed, 27 Jun 2012 13:41:03 +0000 (UTC),
Thomas Richter wrote:
> 
> T
> > > Hi, (please CC me on replies, not subscribed)
> > > 
> > > I recently upgraded to 3.3.6 from 2.6.33.15 (yeah, I know). Since then
> > > I noticed sometimes sounds were sometimes missing, then I noticed
> > > thousands of these in dmesg,
> > > [37280.283484] max memory size is 0x7fffffff (addr = 0x1d5d70071038000)!!
> > 
> > I guess you are enabling IOMMU?  I guess it translates the address
> > somehow in a way emu10k1 doesn't like.
> > There are really little changes in emu10k1 driver itself, so if the
> > kernel upgrade changes the behavior, it must be in the core part such
> > like IOMMU handling.
> > 
> > Try to boot without iommu and see whether it changes the behavior
> > again.
> 
> This is *not* a IOMMU configuration issue. It is an issue of where the
> emu10k1 allows DMA, and what the kernel does about it. If you have more
> than 2GB of memory, and the system runs out of 16MB ISA space, you see
> exactly this happening.
> 
> There is a kernel patch for this:
> 
> https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456

Did you see the address value in the above original report?  It's the
address returned from dma_alloc_coherent().  Certainly the same
problem won't happen on 2GB memory system without IOMMU.  It's a
completely different thing.


Takashi

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

* Re: emu10k1 driver can't allocate memory
  2012-06-27 14:00     ` Takashi Iwai
@ 2012-06-27 15:07       ` Thomas Richter
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Richter @ 2012-06-27 15:07 UTC (permalink / raw)
  To: alsa-devel

Takashi Iwai <tiwai <at> suse.de> writes:


> > There is a kernel patch for this:
> > 
> > https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456
> 
> Did you see the address value in the above original report?  It's the
> address returned from dma_alloc_coherent().  Certainly the same
> problem won't happen on 2GB memory system without IOMMU.  It's a
> completely different thing.

Thanks, I guess you are right - especially in so far as the mentioned 
patch seem to have been applied by the OP already.

So long,
Thomas

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

end of thread, other threads:[~2012-06-27 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAHYJk3R0aS84KYLXFtWmxaHWQG+vdy3xSmXpVO+vN8w7ov2XSQ@mail.gmail.com>
2012-05-29  9:57 ` emu10k1 driver can't allocate memory Takashi Iwai
2012-06-27 13:41   ` Thomas Richter
2012-06-27 14:00     ` Takashi Iwai
2012-06-27 15:07       ` Thomas Richter

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.