From: Marcus Alanen <marcus@infa.abo.fi>
To: Nikita@Namesys.COM, Manfred Spraul <manfred@colorfullife.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH,RFC] faster kmalloc lookup
Date: Mon, 28 Oct 2002 15:18:07 +0200 [thread overview]
Message-ID: <200210281318.PAA19085@infa.abo.fi> (raw)
In-Reply-To: <15805.13847.945978.673664@laputa.namesys.com>
>Most kmalloc calls get constant size argument (usually
>sizeof(something)). So, if switch() is used in stead of loop (and
>kmalloc made inline), compiler would be able to optimize away
>cache_sizes[] selection completely. Attached (ugly) patch does this.
Perhaps a compile-time test to check if the argument is
a constant, and only in that case call your new kmalloc, otherwise
a non-inline kmalloc call? With your current patch, a non-constant
size argument to kmalloc means that the function is inlined anyway,
leading to unnecessary bloat in the resulting image.
Marcus
next prev parent reply other threads:[~2002-10-28 13:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-26 19:22 Manfred Spraul
2002-10-26 22:30 ` Alan Cox
2002-10-27 10:08 ` Manfred Spraul
2002-10-27 13:29 ` Manfred Spraul
2002-10-28 13:05 ` Nikita Danilov
2002-10-28 13:18 ` Marcus Alanen [this message]
2002-10-28 13:26 ` Nikita Danilov
2002-10-28 16:03 ` Manfred Spraul
2002-10-31 9:35 ` Arjan van de Ven
2002-10-31 23:03 ` Manfred Spraul
[not found] <3DBAEB64.1090109@colorfullife.com.suse.lists.linux.kernel>
[not found] ` <1036056917.2872.0.camel@dhcp59-228.rdu.redhat.com.suse.lists.linux.kernel>
[not found] ` <3DC1B6D0.8050202@colorfullife.com.suse.lists.linux.kernel>
2002-11-01 8:03 ` Andi Kleen
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=200210281318.PAA19085@infa.abo.fi \
--to=marcus@infa.abo.fi \
--cc=Nikita@Namesys.COM \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.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