Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Russell King <rmk+alsa@arm.linux.org.uk>
Cc: Jaroslav Kysela <perex@suse.cz>,
	Alsa Devel list <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] 1/3 Implement generic device DMA mapping support
Date: Tue, 02 Mar 2004 15:09:15 +0100	[thread overview]
Message-ID: <s5h8yijfiic.wl@alsa2.suse.de> (raw)
In-Reply-To: <s5hznb0foar.wl@alsa2.suse.de>

At Mon, 01 Mar 2004 18:51:56 +0100,
I wrote:
> 
> At Mon, 1 Mar 2004 17:45:17 +0000,
> Russell King wrote:
> > 
> > On Mon, Mar 01, 2004 at 04:41:00PM +0100, Takashi Iwai wrote:
> > > At Sun, 29 Feb 2004 22:38:20 +0000,
> > > Russell King wrote:
> > > > 
> > > > This is the first shot at this - I've tested it on ARM, covering both
> > > > ISA ALSA devices on a PCI machine, and driver model devices on a non-
> > > > PCI, non-ISA machine.  However, it needs more testing.  Can people
> > > > on alsa-devel please test these patches.
> > > > 
> > > > This patch adds support for the generic device/driver model to ALSA
> > > > for the sole purpose of supporting their DMA mapping functionality.
> > > > 
> > > > This patch changes snd_malloc_sgbuf_pages() to use this dma mapping
> > > > functionality.
> > > 
> > > thanks for the patch.  using struct device is nice for
> > > generalization.
> > > 
> > > after a short glance, the only drawback i found is that you disabled
> > > the single pci page allocation hack for i386.  this was needed to
> > > cover the non-atomic page allocation.
> > > for example, sb live needs to allocate more than 100MB single pages
> > > for the wavetable data.  the allocation with GFP_ATOMIC can fail
> > > easily in such a case, althogh there is enough memory after swapping.
> > > maybe we can leave this function as another...
> > 
> > I think you've assumed that:
> > 
> > +       res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, GFP_KERNEL);
> > 
> > in snd_malloc_dev_pages() uses GFP_ATOMIC.  Please look closer.
> 
> ah, yes, then it's fine.  thanks.

i was too fast to confirm that -- it turned out that this doesn't
help.

since dma_alloc_coherent() is just a wrapper to pci_alloc_consistent()
on x86, GFP_KERNEL is ignored.  instead, GFP_ATOMIC is used always.
sigh...

IOW, the large page allocation problem i described doesn't exist (on
x86, at least).  only the GFP_KERNEL allocation of single pages is
missing.


Takashi


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

  parent reply	other threads:[~2004-03-02 14:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-29 22:38 [PATCH] 1/3 Implement generic device DMA mapping support Russell King
2004-02-29 22:42 ` [PATCH] 2/3 " Russell King
2004-02-29 22:43   ` [PATCH] 3/3 " Russell King
2004-03-01 15:41 ` [PATCH] 1/3 " Takashi Iwai
2004-03-01 15:38   ` Jaroslav Kysela
2004-03-01 17:45   ` Russell King
2004-03-01 17:51     ` Takashi Iwai
2004-03-01 18:22       ` Russell King
2004-03-01 18:34         ` Takashi Iwai
2004-03-01 18:44           ` Takashi Iwai
2004-03-02 15:23           ` Takashi Iwai
2004-03-02 14:09       ` Takashi Iwai [this message]
2004-03-02 14:26         ` Russell King
2004-03-02 14:38           ` Takashi Iwai
2004-03-02 14:55             ` Russell King

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=s5h8yijfiic.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=perex@suse.cz \
    --cc=rmk+alsa@arm.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox