Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Pekka J Enberg <penberg@cs.helsinki.fi>,
	ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ALSA: remove magic cast (0/6)
Date: Tue, 15 Jun 2004 11:38:55 +0200	[thread overview]
Message-ID: <s5hzn75b1ow.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0406142003570.1795@pnote.perex-int.cz>

At Mon, 14 Jun 2004 20:18:31 +0200 (CEST),
Jaroslav wrote:
> 
> On Mon, 14 Jun 2004, Takashi Iwai wrote:
> 
> > > This patch remove snd_magic_cast from the kernel.  It's on top of the
> > > kcalloc() patch and was compile-tested with allyesconfig.
> > 
> > Thanks for the patch.
> > 
> > Did you already make a patch to remove hidden_kmalloc and
> > hidden_vmalloc wrappers, or do I miss it?  They are also suprefluous.
> > 
> > Jaroslav, what do you think about removing kmalloc/vmalloc wrappers
> > and magic stuffs from the kernel tree?
> > 
> > For me, it's ok to remove them from the linux kernel tree
> > (ie. alsa-kernel tree).  I agree that they are not needed for the
> > matured drivers.  For the experimental drivers, We can provide another
> > type check mechanism in alsa-driver tree locally.
> 
> I think that we need to separate the patch:
> 
> 1) removal of own memory pool (check for memory leaks)
> 2) magic stuff
> 
> The structure mistakes usually ends with an oops, but the memory leaks 
> cannot be detected easy inside the kernel.

IMO, the memory leak check should be better in slab rather than in
ALSA wrapper.  I understand that has annoyed people.

Having ALSA-specific isn't always nice, for example, we have to have
kfree() and kfree_nocheck(), and this has triggered some bugs.

About vmalloc(), we need to reconsider the memory check, too.  Many
routines assume that the vmalloc data is aligned to the page, but the
hidden header breaks this.


> I don't like too much the idea to remove the own memory pool in the debug
> mode. It helped me in past numerous times and I think that ALSA is one
> from the clean subsystems in this area. I don't understand the kernel
> developers - there is no replacement. Yes, it's good only for debugging,
> but why not make debugging easier for other developers as well with
> proposing a general solution?

Agreed.  The memory leak check is useful.
A general solution would be better...


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND

  reply	other threads:[~2004-06-15  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200406141555.i5EFtD7g013906@melkki.cs.helsinki.fi>
     [not found] ` <s5hk6yadspp.wl@alsa2.suse.de>
2004-06-14 18:18   ` [PATCH] ALSA: remove magic cast (0/6) Jaroslav Kysela
2004-06-15  9:38     ` Takashi Iwai [this message]
     [not found]     ` <courier.40CE9975.00001489@courier.cs.helsinki.fi>
2004-06-21 17:16       ` Takashi Iwai
     [not found]         ` <courier.40D7C8C5.00001480@courier.cs.helsinki.fi>
2004-06-22 16:38           ` Takashi Iwai

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=s5hzn75b1ow.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=penberg@cs.helsinki.fi \
    --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