mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Nikita Danilov <Nikita@Namesys.COM>
Cc: Marcus Alanen <marcus@infa.abo.fi>,
	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 17:03:42 +0100	[thread overview]
Message-ID: <3DBD5FDE.6070604@colorfullife.com> (raw)
In-Reply-To: <15805.15113.459553.881857@laputa.namesys.com>

Nikita Danilov wrote:

>Marcus Alanen writes:
> > >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.
>
>Yes, exactly.
>  
>
I agree, I have an old patch that does that.

http://www.colorfullife.com/~manfred/slab/patch-km_div

Please ignore the part about fixed point division, it's not needed - the 
'div' instructions is now outside of the hot path.

The problem is that the -mm tree contains around 10 slab patches, I want 
to see them in Linus' tree before I add further patches.

--
    Manfred


  reply	other threads:[~2002-10-28 15:57 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
2002-10-28 13:26           ` Nikita Danilov
2002-10-28 16:03             ` Manfred Spraul [this message]
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=3DBD5FDE.6070604@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=Nikita@Namesys.COM \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus@infa.abo.fi \
    /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