Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234894
b: refs/heads/master
c: eb8c1e2
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Mar 2, 2011
1 parent 5a0030e commit b204f13
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 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: ce0033307f1b45e23e0c149f56ea4855eb4687ce
refs/heads/master: eb8c1e2c830fc25c93bc94e215ed387fe142a98d
11 changes: 10 additions & 1 deletion trunk/arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,12 @@ void __init numa_reset_distance(void)
{
size_t size = numa_distance_cnt * numa_distance_cnt * sizeof(numa_distance[0]);

/* numa_distance could be 1LU marking allocation failure, test cnt */
if (numa_distance_cnt)
memblock_x86_free_range(__pa(numa_distance),
__pa(numa_distance) + size);
numa_distance_cnt = 0;
numa_distance = NULL;
numa_distance = NULL; /* enable table creation */
}

static int __init numa_alloc_distance(void)
Expand Down Expand Up @@ -447,6 +448,14 @@ static int __init numa_alloc_distance(void)
* Set the distance from node @from to @to to @distance. If distance table
* doesn't exist, one which is large enough to accomodate all the currently
* known nodes will be created.
*
* If such table cannot be allocated, a warning is printed and further
* calls are ignored until the distance table is reset with
* numa_reset_distance().
*
* If @from or @to is higher than the highest known node at the time of
* table creation or @distance doesn't make sense, the call is ignored.
* This is to allow simplification of specific NUMA config implementations.
*/
void __init numa_set_distance(int from, int to, int distance)
{
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/x86/mm/numa_emulation.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,11 @@ void __init numa_emulation(struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
if (emu_nid_to_phys[i] == NUMA_NO_NODE)
emu_nid_to_phys[i] = 0;

/* transform distance table */
/*
* Transform distance table. numa_set_distance() ignores all
* out-of-bound distances. Just call it for every possible node
* combination.
*/
numa_reset_distance();
for (i = 0; i < MAX_NUMNODES; i++) {
for (j = 0; j < MAX_NUMNODES; j++) {
Expand Down

0 comments on commit b204f13

Please sign in to comment.