public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>,
	jayakumar.alsa@gmail.com, perex@suse.cz, mj@ucw.cz,
	alsa-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [Alsa-devel] Re: [PATCH 2.6.13.1 1/1] CS5535 AUDIO ALSA driver
Date: Thu, 29 Sep 2005 15:21:43 +0200	[thread overview]
Message-ID: <s5hpsqsdn6g.wl%tiwai@suse.de> (raw)
In-Reply-To: <20050921083109.GA27254@infradead.org>

At Wed, 21 Sep 2005 09:31:09 +0100,
Christoph Hellwig wrote:
> 
> On Tue, Sep 20, 2005 at 05:23:09PM -0700, Andrew Morton wrote:
> > > I'm not sure what to do. I'd be happy to take them out. But I woudn't
> > > mind leaving them in if that's what alsa convention is.
> > 
> > I'd be inclined to stick with the alsa style.  That's just an fyi if you
> > plan on working in other places.
> 
> I'd _really_ prefer to fix all of alsa.  Alsa is so full of wrappers
> and multiple names for the same thing that's it's almost impossibly
> for a normal kernel developer to fix anythign in there.

Oh I guess you're referring to the messy memory stuff in ALSA code?

(Or you mean about the foo_t style?  Then it would be easy to fix, and
 I'd appreciate if someone takes this job :)

Basically I agree with all your suggestions - hacks have been there
simply as workarounds.  They should be removed.

The following are in WIP on my local tree:

- Merge of dma_alloc_coherent() hacks for pages <32bit to kernel core
  (for i386 and ppc)

- PageReserve and mmaps:
  dma_mmap_coherent() will be used in all architectures instead of
  vma nopage callback.  Of course, dma_mmap_coherent() should be
  ported to all archs.

- Removal of the common allocator in sound/core/memalloc.c
  Instead, each driver has alloc_buffer() and free_buffer()
  callbacks. 

  (The reason to have callbacks is that the buffers can be allocated in
   3 places: by the pre-allocator, by proc control and at each open /
   hw_params setup.)


What I'm still considering are:

- The "right" way to allocate/mmap coherent SG-buffers.
- A common API for mmap vmalloc buffers.
- Subsystem or module-wide check of memory leaks in slab
  (the notorious kmalloc wrapper)

Please let me know if you have any good solutions, comments or
suggestions for the above.


thanks,

Takashi

  reply	other threads:[~2005-09-29 13:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-19  6:39 [PATCH 2.6.13.1 1/1] CS5535 AUDIO ALSA driver jayakumar.alsa
2005-09-20 22:28 ` Andrew Morton
2005-09-21  0:03   ` jayakumar alsa
2005-09-21  0:23     ` Andrew Morton
2005-09-21  8:31       ` Christoph Hellwig
2005-09-29 13:21         ` Takashi Iwai [this message]
2005-12-06 17:42           ` [Alsa-devel] " Christoph Hellwig
2005-12-06 18:41             ` Takashi Iwai
2005-09-29 13:04       ` Takashi Iwai
2005-09-21  7:08   ` jayakumar alsa

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=s5hpsqsdn6g.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@osdl.org \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=hch@infradead.org \
    --cc=jayakumar.alsa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mj@ucw.cz \
    --cc=perex@suse.cz \
    /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