提交 f27fb08e 编写于 作者: K Keith Busch 提交者: Joseph Qi

ICX: acpi/hmat: Register performance attributes

commit 8d59f5a2ca765f65fd86db86f233678c3770819f upstream.

Save the best performance access attributes and register these with the
memory's node if HMAT provides the locality table. While HMAT does make
it possible to know performance for all possible initiator-target
pairings, we export only the local pairings at this time.
Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NKeith Busch <keith.busch@intel.com>
Tested-by: NBrice Goglin <Brice.Goglin@inria.fr>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NFan Du <fan.du@intel.com>
Signed-off-by: NJeffle Xu <jefflexu@linux.alibaba.com>
Acked-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Acked-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 76f37338
......@@ -2,7 +2,10 @@
config ACPI_HMAT
bool "ACPI Heterogeneous Memory Attribute Table Support"
depends on ACPI_NUMA
select HMEM_REPORTING
help
If set, this option has the kernel parse and report the
platform's ACPI HMAT (Heterogeneous Memory Attributes Table),
and register memory initiators with their targets.
register memory initiators with their targets, and export
performance attributes through the node's sysfs device if
provided.
......@@ -545,12 +545,20 @@ static __init void hmat_register_target_initiators(struct memory_target *target)
}
}
static __init void hmat_register_target_perf(struct memory_target *target)
{
unsigned mem_nid = pxm_to_node(target->memory_pxm);
node_set_perf_attrs(mem_nid, &target->hmem_attrs, 0);
}
static __init void hmat_register_targets(void)
{
struct memory_target *target;
list_for_each_entry(target, &targets, node)
list_for_each_entry(target, &targets, node) {
hmat_register_target_initiators(target);
hmat_register_target_perf(target);
}
}
static __init void hmat_free_structures(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册