diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2012-10-25 08:16:43 -0400 |
---|---|---|
committer | Mel Gorman <mgorman@suse.de> | 2012-12-11 09:42:45 -0500 |
commit | cbee9f88ec1b8dd6b58f25f54e4f52c82ed77690 (patch) | |
tree | d4cfbcfa3e89742216cd792d4aa914356406b532 /mm/huge_memory.c | |
parent | a720094ded8cbb303111035be91858011d2eac71 (diff) |
mm: numa: Add fault driven placement and migration
NOTE: This patch is based on "sched, numa, mm: Add fault driven
placement and migration policy" but as it throws away all the policy
to just leave a basic foundation I had to drop the signed-offs-by.
This patch creates a bare-bones method for setting PTEs pte_numa in the
context of the scheduler that when faulted later will be faulted onto the
node the CPU is running on. In itself this does nothing useful but any
placement policy will fundamentally depend on receiving hints on placement
from fault context and doing something intelligent about it.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index d79f7a55bf6f..ee8133794a56 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -1046,6 +1046,7 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1046 | */ | 1046 | */ |
1047 | split_huge_page(page); | 1047 | split_huge_page(page); |
1048 | put_page(page); | 1048 | put_page(page); |
1049 | |||
1049 | return 0; | 1050 | return 0; |
1050 | 1051 | ||
1051 | clear_pmdnuma: | 1052 | clear_pmdnuma: |
@@ -1060,8 +1061,10 @@ clear_pmdnuma: | |||
1060 | 1061 | ||
1061 | out_unlock: | 1062 | out_unlock: |
1062 | spin_unlock(&mm->page_table_lock); | 1063 | spin_unlock(&mm->page_table_lock); |
1063 | if (page) | 1064 | if (page) { |
1064 | put_page(page); | 1065 | put_page(page); |
1066 | task_numa_fault(numa_node_id(), HPAGE_PMD_NR); | ||
1067 | } | ||
1065 | return 0; | 1068 | return 0; |
1066 | } | 1069 | } |
1067 | 1070 | ||