From: Robert Love <rml@novell.com>
To: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@gmx.net>
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 01:57:44 -0500 [thread overview]
Message-ID: <1100069864.18601.128.camel@localhost> (raw)
In-Reply-To: <4191B5D8.3090700@gmx.net>
On Wed, 2004-11-10 at 07:31 +0100, Carl-Daniel Hailfinger wrote:
> 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.
Stab in the dark: Break it into two separate loops?
Two loops would be faster than the branch on each alloc, too.
Even better: Re-architect so as not to need that mess at all?
Robert Love
next prev parent reply other threads:[~2004-11-10 6:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-10 5:19 [RFC] [PATCH] kmem_alloc (generic wrapper for kmalloc and vmalloc) 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 [this message]
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=1100069864.18601.128.camel@localhost \
--to=rml@novell.com \
--cc=c-d.hailfinger.kernel.2004@gmx.net \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.