public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* Nodes with no memory
@ 2008-11-21 23:50 Dave Hansen
  2008-11-22  0:49 ` Nathan Lynch
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Hansen @ 2008-11-21 23:50 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: mjw, Nathan Lynch, Paul Mackerras

I was handed off a bug report about a blade not booting with a, um
"newer" kernel.  After turning on some debugging messages, I got this
ominous message:

        node 1
        NODE_DATA() = c000000000000000

Which obviously comes from here:

arch/powerpc/mm/numa.c

        for_each_online_node(nid) {
                unsigned long start_pfn, end_pfn;
                unsigned long bootmem_paddr;
                unsigned long bootmap_pages;

                get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);

                /* Allocate the node structure node local if possible */
                NODE_DATA(nid) = careful_allocation(nid,
                                        sizeof(struct pglist_data),
                                        SMP_CACHE_BYTES, end_pfn);
                NODE_DATA(nid) = __va(NODE_DATA(nid));
                memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
		...

careful_allocation() returns a NULL physical address, but we go ahead
and run __va() on it, stick it in NODE_DATA(), and memset it.  Yay!

I seem to recall that we fixed some issues with memoryless nodes a few
years ago, like around the memory hotplug days, but I don't see the
patches anywhere.

I'm thinking that we need to at least fix careful_allocation() to oops
and not return NULL, or check to make sure all it callers check its
return code.  Plus,  we probably also need to ensure that all ppc code
doing for_each_online_node() does not assume a valid NODE_DATA() for all
those nodes.

Any other thoughts?

I'll have a patch for the above issue sometime soon. 

-- Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-22  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 23:50 Nodes with no memory Dave Hansen
2008-11-22  0:49 ` Nathan Lynch
2008-11-22  1:17   ` Dave Hansen
2008-11-22  8:58     ` Milton Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox