public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, colpatch@us.ibm.com
Subject: Re: [PATCH 4/5] slab: extract slab order calculation to separate function
Date: Sat, 19 Nov 2005 13:25:00 +0100	[thread overview]
Message-ID: <437F199C.9040505@colorfullife.com> (raw)
In-Reply-To: <iq5uuh.o9kcui.7v9w5djupiovhrqo6are97fi6.beaver@cs.helsinki.fi>

Pekka Enberg wrote:

>This patch moves the ugly loop that determines the 'optimal' size (page
>order) of cache slabs from kmem_cache_create() to a separate function
>and cleans it up a bit.
>
>Thanks to Matthew Wilcox for the help with this patch.
>
>Signed-off-by: Matthew Dobson <colpatch@us.ibm.com>
>Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
>  
>
Looks good, just two minor points:

>+static inline size_t calculate_slab_order(kmem_cache_t *cachep, size_t size,
>+					  size_t align, gfp_t flags)
>  
>
Unnecessary inline, see my previous mail for the explanation.

>+	} else
>+		left_over = calculate_slab_order(cachep, size, align, flags);
>  
>

I usually add braces in this case: If braces are necessary for either 
the if or the else-clause, then I add braces to both parts.

Could be applied as is, or I could write a patch with both changes.
Andrew - what do you prefer?

--
    Manfred

  parent reply	other threads:[~2005-11-19 12:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 17:20 [PATCH 1/5] slab: rename obj_reallen to obj_size Pekka Enberg
2005-11-18 17:20 ` [PATCH 2/5] slab: remove unused align parameter from alloc_percpu Pekka Enberg
2005-11-18 17:20   ` [PATCH 3/5] slab: extract slabinfo header printing to separate function Pekka Enberg
2005-11-18 17:20     ` [PATCH 4/5] slab: extract slab order calculation " Pekka Enberg
2005-11-18 17:20       ` [PATCH 5/5] slab: fix code formatting Pekka Enberg
2005-11-19 12:25       ` Manfred Spraul [this message]
2005-11-19 17:33         ` [PATCH 4/5] slab: extract slab order calculation to separate function Andrew Morton
2005-11-19 12:11     ` [PATCH 3/5] slab: extract slabinfo header printing " Manfred Spraul
2005-11-19 12:20       ` Pekka Enberg
2005-11-19 12:00   ` [PATCH 2/5] slab: remove unused align parameter from alloc_percpu Manfred Spraul
2005-11-19 11:57 ` [PATCH 1/5] slab: rename obj_reallen to obj_size Manfred Spraul
2005-11-19 12:04   ` Pekka Enberg
2005-11-19 12:34     ` Manfred Spraul
2005-11-19 12:37       ` Pekka Enberg
2005-11-19 12:17   ` Pekka 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=437F199C.9040505@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@osdl.org \
    --cc=colpatch@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.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