Re: [PATCH] alloc_memory_early() routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mike,

On 5/10/06, Mike Kravetz <[email protected]> wrote:
diff -Naupr linux-2.6.17-rc3-mm1/mm/slab.c linux-2.6.17-rc3-mm1.work3/mm/slab.c
--- linux-2.6.17-rc3-mm1/mm/slab.c      2006-05-03 22:19:16.000000000 +0000
+++ linux-2.6.17-rc3-mm1.work3/mm/slab.c        2006-05-09 21:38:23.000000000 +0000

[snip]

+void * __init alloc_memory_early_node(size_t size, gfp_t flags, int node)
+{
+       if (g_cpucache_up == FULL)
+               return kmalloc_node(size, flags, node);
+       else
+               return alloc_bootmem_node(NODE_DATA(node), size);
+}

I'd prefer you put this in mm/bootmem.c and added a

int slab_is_available(void)
{
      return g_cpucache_up == FULL;
}

to mm/slab.c instead.

                                              Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux