linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <clameter@sgi.com>,
	linux-mm@kvack.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: Slab: Remove kmem_cache_t
Date: Tue, 28 Nov 2006 23:08:37 -0800	[thread overview]
Message-ID: <20061128230837.48fcc34f.akpm@osdl.org> (raw)
In-Reply-To: <456D2B8E.4060802@yahoo.com.au>

On Wed, 29 Nov 2006 17:41:18 +1100
Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> > Well, you'd just do
> > 
> > 	extern struct kmem_cache *wozzle;
> > 
> > because you "know" that struct kmem_cache == kmem_cache_t.  The compiler
> > will swallow it all.
> > 
> > Do I need to explain how much that sucks?
> > 
> 
> Well the only code that is doing this is presumably some slab internal
> stuff. And that does "know" that struct kmem_cache == kmem_cache_t.
> Actually, once struct kmem_cache gets moved into slab.h, I would be
> interested to know what remaining forward dependencies are needed at
> all. Christoph?
> 
> To be clear: this won't be some random driver or subsystem code (or
> even anything outside of mm/slab.c, hopefully) that is doing this,
> will it? 

Yes, it will.

Any module which calls kmem_cache_create() needs to save its return value
into some storage.  That storage has type `struct kmem_cache *', or
kmem_cache_t *.

And, btw, in neither case does that kmem_cache_create() caller need to know
what's inside `struct kmem_cache'.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-11-29  7:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29  2:49 Christoph Lameter
2006-11-29  3:06 ` Andrew Morton
2006-11-29  4:06 ` Nick Piggin
2006-11-29  3:32   ` Christoph Lameter
2006-11-29  4:42     ` Nick Piggin
2006-11-29  3:48       ` Nick Piggin
2006-11-29  4:06       ` Andrew Morton
2006-11-29  4:38         ` Linus Torvalds
2006-11-29  5:51           ` Nick Piggin
2006-11-29 15:48             ` Linus Torvalds
2006-11-30  1:40               ` Nick Piggin
2006-11-30  1:59                 ` Linus Torvalds
2006-11-30  2:14                   ` Nick Piggin
2006-11-30  2:37                     ` Linus Torvalds
2006-11-30  2:51                       ` Nick Piggin
2006-11-29  6:21           ` Nick Piggin
2006-11-29 16:11             ` Linus Torvalds
2006-11-29  5:41         ` Nick Piggin
2006-11-29  6:24           ` Andrew Morton
2006-11-29  6:41             ` Nick Piggin
2006-11-29  7:08               ` Andrew Morton [this message]
2006-11-29  7:23                 ` Nick Piggin
2006-11-29  7:41                   ` Andrew Morton
2006-11-29  8:04                     ` Nick Piggin
2006-11-29 16:23                       ` Linus Torvalds
2006-11-30  1:44                         ` Nick Piggin
2006-11-29 19:16               ` Christoph Lameter
2006-11-29  8:50 ` Peter Zijlstra
2006-11-29 19:27   ` Christoph Lameter

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=20061128230837.48fcc34f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@osdl.org \
    /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