From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
To: Jens Axboe <axboe@suse.de>
Cc: Robert Love <rml@novell.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] [PATCH] kmem_alloc (generic wrapper for kmalloc and vmalloc)
Date: Wed, 10 Nov 2004 18:03:20 +0100 [thread overview]
Message-ID: <419249D8.1030100@gmx.net> (raw)
In-Reply-To: <20041110075450.GB5602@suse.de>
Jens Axboe wrote:
> On Wed, Nov 10 2004, Robert Love wrote:
>
>>On Wed, 2004-11-10 at 06:19 +0100, Carl-Daniel Hailfinger wrote:
>>
>>>it seems there is a bunch of drivers which want to allocate memory as
>>>efficiently as possible in a wide range of allocation sizes. XFS and
>>>NTFS seem to be examples. Implement a generic wrapper to reduce code
>>>duplication.
>>>Functions have the my_ prefixes to avoid name clash with XFS.
>>
>>No, no, no. A good patch would be fixing places where you see this.
>>
>>Code needs to conscientiously decide to use vmalloc over kmalloc. The
>>behavior is different and the choice needs to be explicit.
>
> Plus, you cannot use vfree() from interrupt context. This patch is a bad
> idea.
OK, so how should I allocate memory for 512 struct loop_device's?
Because of its odd size (304 bytes) it seems that if I use kmalloc
seperately for each struct, I'd waste 208 bytes per allocation. 68%
overhead would be a step backwards. Or am I missing something here?
Regards,
Carl-Daniel
next prev parent reply other threads:[~2004-11-10 17:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 5:19 Carl-Daniel Hailfinger
2004-11-10 6:03 ` Robert Love
2004-11-10 6:31 ` Carl-Daniel Hailfinger
2004-11-10 6:57 ` Robert Love
2004-11-10 7:10 ` Nick Piggin
2004-11-10 13:36 ` Geert Uytterhoeven
2004-11-10 7:54 ` Jens Axboe
2004-11-10 17:03 ` Carl-Daniel Hailfinger [this message]
2004-11-10 17:17 ` Roland Dreier
2004-11-10 17:54 ` Adam Heath
2004-11-10 18:04 ` Jens Axboe
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=419249D8.1030100@gmx.net \
--to=c-d.hailfinger.kernel.2004@gmx.net \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@novell.com \
/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
Powered by JetHome