Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19773
b: refs/heads/master
c: 9391a3f
h: refs/heads/master
i:
  19771: 8de75f7
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Feb 5, 2006
1 parent a556ff5 commit 29380be
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00ac59adfca8f2f339beb0b67054e786c275553e
refs/heads/master: 9391a3f9c7f17bdd82adf9a98905450642cc8970
26 changes: 20 additions & 6 deletions trunk/arch/x86_64/mm/srat.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ static nodemask_t nodes_found __initdata;
static struct node nodes[MAX_NUMNODES] __initdata;
static u8 pxm2node[256] = { [0 ... 255] = 0xff };

/* Too small nodes confuse the VM badly. Usually they result
from BIOS bugs. */
#define NODE_MIN_SIZE (4*1024*1024)

static int node_to_pxm(int n);

int pxm_to_node(int pxm)
Expand Down Expand Up @@ -223,23 +227,33 @@ static int nodes_cover_memory(void)
return 1;
}

static void unparse_node(int node)
{
int i;
node_clear(node, nodes_parsed);
for (i = 0; i < MAX_LOCAL_APIC; i++) {
if (apicid_to_node[i] == node)
apicid_to_node[i] = NUMA_NO_NODE;
}
}

void __init acpi_numa_arch_fixup(void) {}

/* Use the information discovered above to actually set up the nodes. */
int __init acpi_scan_nodes(unsigned long start, unsigned long end)
{
int i;

if (acpi_numa <= 0)
return -1;

/* First clean up the node list */
for_each_node_mask(i, nodes_parsed) {
for (i = 0; i < MAX_NUMNODES; i++) {
cutoff_node(i, start, end);
if (nodes[i].start == nodes[i].end)
node_clear(i, nodes_parsed);
if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE)
unparse_node(i);
}

if (acpi_numa <= 0)
return -1;

if (!nodes_cover_memory()) {
bad_srat();
return -1;
Expand Down

0 comments on commit 29380be

Please sign in to comment.