public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: David Rientjes <rientjes@google.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Christoph Lameter <cl@linux.com>,
	linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [git pull] m68k SLUB fix for 2.6.39
Date: Fri, 29 Apr 2011 22:43:22 +0200	[thread overview]
Message-ID: <BANLkTimT4899xDF99Fj37u_CgnkeBzoFzQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1104281437010.21665@chino.kir.corp.google.com>

On Thu, Apr 28, 2011 at 23:41, David Rientjes <rientjes@google.com> wrote:
> On Thu, 28 Apr 2011, James Bottomley wrote:
>
>> > Since 4a5fa3590f09 ([PARISC] slub: fix panic with DISCONTIGMEM) from
>> > 2.6.39-rc4, you can't actually select slub on m68k without CONFIG_ADVANCED
>> > and CONFIG_SINGLE_MEMORY_CHUNK because it otherwises defaults to
>> > discontigmem.
>> >
>> > James tested hppa64 with my N_NORMAL_MEMORY fix and found that it turned
>> > an SMP box into UP.  If you've tested slub on m68k without regressions,
>> > then perhaps you'd like to add a "|| M68K" to CONFIG_SLUB?
>>
>> To be honest, I really don't see that fixing it.  As soon as you
>> allocate memory beyond range zero, you move onto a non-zero node as far
>> as slub is concerned, and that will oops.
>>
>
> Possible nodes are represented in slub with N_NORMAL_MEMORY, so the
> kmem_cache_node structures are allocated and initialized based on this
> nodemask.  As long as the memory ranges map to nodes set in the nodemask,
> this should be fine.
>
>> I think what the N_NORMAL_MEMORY patch did is just make it take a whiile
>> before you start allocating from that range.  Try executing a memory
>> balloon on the platform; that was how we first demonstrated the problem
>> on parisc.
>>
>
> With parisc, you encountered an oops in add_partial() because the
> kmem_cache_node structure for the memory range returned by page_to_nid()
> was not allocated.  init_kmem_cache_nodes() takes care of this for all
> memory ranges set in N_NORMAL_MEMORY.
>
> Adding Christoph and Pekka to the cc if there is additional concerns about
> slub on this architecture.

My ARAnyM instance has

System Memory:	276480K
	 14 MB at 0x00000000 (ST-RAM)
	256 MB at 0x01000000 (alternate RAM)

and 137800KIB of swap, and survived the following program just fine:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char *argv[])
{
    size_t size = 1048576;
    size_t total = 0;
    void *p;

    while (size) {
	p = malloc(size);
	if (!p) {
	    printf("Failed to allocate %zu bytes\n", size);
	    size /= 2;
	}
	memset(p, 0xaa, size);
	total += size;
	printf("Using %zu / 0x%zx bytes of memory\n", total, total);
    }

    printf("Finished!\n");
    return 0;
}

i.e. the OOM-killer just killed the program after it consumed all
available virtual
memory:

Out of memory: Kill process 1727 (malloctest) score 854 or sacrifice child
Killed process 1727 (malloctest) total-vm:361160kB, anon-rss:224164kB,
file-rss:0kB
malloctest: page allocation failure. order:0, mode:0x84d0

So SLUB really seems to work now.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2011-04-29 20:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 18:02 [git pull] m68k SLUB fix for 2.6.39 Geert Uytterhoeven
2011-04-28 21:25 ` David Rientjes
2011-04-28 21:34   ` James Bottomley
2011-04-28 21:41     ` David Rientjes
2011-04-29 20:43       ` Geert Uytterhoeven [this message]
2011-04-29 23:35         ` Michael Schmitz
2011-05-03 22:40         ` David Rientjes
2011-05-04 13:59           ` Christoph Lameter
2011-05-04 19:03             ` David Rientjes
2011-05-04 15:02       ` James Bottomley
2011-05-04 19:07         ` David Rientjes
2011-05-09 22:24           ` James Bottomley
2011-05-11  0:08             ` [patch] slub: Revert "[PARISC] slub: fix panic with DISCONTIGMEM" David Rientjes
2011-05-11  7:27               ` Geert Uytterhoeven

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=BANLkTimT4899xDF99Fj37u_CgnkeBzoFzQ@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=James.Bottomley@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.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