public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: mroos@linux.ee, David Miller <davem@davemloft.net>,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: slab hang on boot
Date: Mon, 14 May 2007 17:15:18 -0700	[thread overview]
Message-ID: <20070514171518.fdca9f8c.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0705141642350.13606@schroedinger.engr.sgi.com>

On Mon, 14 May 2007 16:46:17 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> -#define KMALLOC_SHIFT_HIGH 25
> +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) =< 25 ? \
> +				MAX_ORDER + PAGE_SHIFT - 1 : 25)

Would prefer to see a lot more parentheses in there.  Who knows what the arch
is using for MAX_ORDER and PAGE_SHIFT.

>  #if !defined(CONFIG_MMU) || NR_CPUS > 512 || MAX_NUMNODES > 256
>  #define KMALLOC_SHIFT_HIGH 20
> @@ -86,6 +87,9 @@ static inline int kmalloc_index(int size
>  	 */
>  	WARN_ON_ONCE(size == 0);
>  
> +	if (size >= (1UL << KMALLOC_SHIFT_HIGH))
> +		return -1;
> +

`size' is `int'.  Deliberately comparing it to an unsigned long seems
unpointful.

Arguably, `size' should be size_t.

  reply	other threads:[~2007-05-15  0:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.SOC.4.64.0705142133190.17204@math>
2007-05-14 22:11 ` slab hang on boot David Miller
2007-05-14 23:46   ` Christoph Lameter
2007-05-15  0:15     ` Andrew Morton [this message]
2007-05-15 23:33     ` Andrew Morton
2007-05-15 23:45       ` Christoph Lameter
2007-05-15 23:56         ` Andrew Morton
2007-05-16  0:14           ` David Miller
2007-05-16  0:29             ` Andrew Morton
2007-05-16  0:38               ` David Miller
2007-05-16  1:00                 ` Christoph Lameter
2007-05-16  1:03                   ` David Miller
2007-05-16  6:43                     ` David Miller
2007-05-16  0:51               ` Christoph Lameter
2007-05-16  0:50           ` Christoph Lameter

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=20070514171518.fdca9f8c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=sparclinux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox