提交 08d0f054 编写于 作者: K Kemeng Shi 提交者: Zheng Zengkai

acpi/numa: memorize pmem node from SRAT table

euleros inclusion
category: feature
feature: etmem
bugzilla: 48246

-------------------------------------------------

Driver dax_kmem will export pmem as a NUMA node. This patch will
record node consists of persistent memory for futher use.
Signed-off-by: NKemeng Shi <shikemeng@huawei.com>
Reviewed-by: louhongxiang <louhongxiang@huawei.com
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 51b8560b
...@@ -279,6 +279,9 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) ...@@ -279,6 +279,9 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma)
node_set(node, numa_nodes_parsed); node_set(node, numa_nodes_parsed);
if (ma->flags & ACPI_SRAT_MEM_NON_VOLATILE)
set_node_pmem(node);
pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s%s\n", pr_info("SRAT: Node %u PXM %u [mem %#010Lx-%#010Lx]%s%s\n",
node, pxm, node, pxm,
(unsigned long long) start, (unsigned long long) end - 1, (unsigned long long) start, (unsigned long long) end - 1,
......
...@@ -58,4 +58,7 @@ static inline int phys_to_target_node(u64 start) ...@@ -58,4 +58,7 @@ static inline int phys_to_target_node(u64 start)
} }
#endif #endif
void set_node_pmem(int nid);
int is_node_pmem(int nid);
#endif /* _LINUX_NUMA_H */ #endif /* _LINUX_NUMA_H */
...@@ -179,6 +179,8 @@ DEFINE_STATIC_KEY_FALSE(init_on_free); ...@@ -179,6 +179,8 @@ DEFINE_STATIC_KEY_FALSE(init_on_free);
#endif #endif
EXPORT_SYMBOL(init_on_free); EXPORT_SYMBOL(init_on_free);
nodemask_t numa_nodes_pmem;
static int __init early_init_on_alloc(char *buf) static int __init early_init_on_alloc(char *buf)
{ {
int ret; int ret;
...@@ -8882,3 +8884,13 @@ bool take_page_off_buddy(struct page *page) ...@@ -8882,3 +8884,13 @@ bool take_page_off_buddy(struct page *page)
return ret; return ret;
} }
#endif #endif
void set_node_pmem(int nid)
{
node_set(nid, numa_nodes_pmem);
}
int is_node_pmem(int nid)
{
return node_isset(nid, numa_nodes_pmem);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册