From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
To: Robert Love <rml@novell.com>
Cc: 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 07:31:52 +0100 [thread overview]
Message-ID: <4191B5D8.3090700@gmx.net> (raw)
In-Reply-To: <1100066597.18601.124.camel@localhost>
Robert Love schrieb:
> On Wed, 2004-11-10 at 06:19 +0100, Carl-Daniel Hailfinger wrote:
>
>>Hi,
>>
>>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.
Yes, but what do you suggest for the following problem:
alloc(max_loop*sizeof(struct loop_device))
where sizeof(struct loop_device)==304 and 1<=max_loop<=16384
For the smallest allocation (304 bytes) vmalloc is clearly wasteful
and for the largest allocation (~ 5 MBytes) kmalloc doesn't work.
Regards,
Carl-Daniel
next prev parent reply other threads:[~2004-11-10 6:31 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 [this message]
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
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=4191B5D8.3090700@gmx.net \
--to=c-d.hailfinger.kernel.2004@gmx.net \
--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