From: Andrew Morton <akpm@digeo.com>
To: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Cc: linux-mm@kvack.org
Subject: Re: 2.5.70-bk4+: oops by mc -v /proc/bus/pci/00/00.0
Date: Sun, 1 Jun 2003 12:58:09 -0700 [thread overview]
Message-ID: <20030601125809.4e28453e.akpm@digeo.com> (raw)
In-Reply-To: <20030601143439.O626@nightmaster.csn.tu-chemnitz.de>
Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de> wrote:
>
> Hi Andrew,
>
> On Sat, May 31, 2003 at 07:54:14PM -0700, Andrew Morton wrote:
> > It's pretty lame. Really we need a proper vma constructor
> > somewhere.
>
> you mean sth. like this? (Just initialized the members, that I had useful
> defaults for.)
>
> ...
> vm_area_cachep = kmem_cache_create("vm_area_struct",
> sizeof(struct vm_area_struct), 0,
> - 0, NULL, NULL);
> + 0, init_vm_area_struct, NULL);
> if(!vm_area_cachep)
> panic("vma_init: Cannot alloc vm_area_struct SLAB cache");
>
Well not really. Yes, a slab-based ctor would be nice, but it requires that
all objects be kfreed in a "constructed" state. So a full audit/fixup of
all users is needed.
For now I was thinking more along the lines of
struct vma_struct alloc_vma(gfp_flags)
{
vma = kmem_cache_alloc();
memset(vma);
return vma;
}
And then deleting tons of open-coded init stuff elsewhere...
--
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:"aart@kvack.org"> aart@kvack.org </a>
next prev parent reply other threads:[~2003-06-01 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030531165523.GA18067@steel.home>
[not found] ` <20030531195414.10c957b7.akpm@digeo.com>
2003-06-01 12:34 ` Ingo Oeser
2003-06-01 19:58 ` Andrew Morton [this message]
2003-06-01 21:53 ` William Lee Irwin III
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=20030601125809.4e28453e.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-mm@kvack.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