mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] micro optimization of cache_estimate in slab.c
Date: Sun, 18 Dec 2005 19:27:38 +0200	[thread overview]
Message-ID: <84144f020512180927lc6492abpb28c047f9e0c535c@mail.gmail.com> (raw)
In-Reply-To: <1134894189.13138.208.camel@localhost.localdomain>

Hi Steven,

On 12/18/05, Steven Rostedt <rostedt@goodmis.org> wrote:
> +       do {
> +               x = 1;
> +               while ((x+i)*size + ALIGN(base+(x+i)*extra, align) <= wastage)
> +                       x <<= 1;
> +               i += (x >> 1);
> +       } while (x > 1);

The above is pretty hard to read. Perhaps we could give x and i better
names? Also, couldn't we move left part of the expression into a
separate static inline function for readability?

                              Pekka

  reply	other threads:[~2005-12-18 17:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-18  8:23 Steven Rostedt
2005-12-18 17:27 ` Pekka Enberg [this message]
2005-12-18 18:37   ` Steven Rostedt
2005-12-18 19:29     ` Luuk van der Duim
2005-12-19  7:43     ` Pekka J Enberg

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=84144f020512180927lc6492abpb28c047f9e0c535c@mail.gmail.com \
    --to=penberg@cs.helsinki.fi \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®