Skip to contentSkip to conversation

x86: mwait-idle improvements from Linux 4.10-rc

PATCH In review Jan Beulich 2 participants 4 messages Jan 4, 2017

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 x86/mwait-idle: add CPU model 0x4a (Atom Z34xx series)

Add CPU ID for Atom Z34xx processors. Datasheets indicate support for this, detailed information about potential quirks or limitations are missing, though. So we just reuse the definition from official BSP code.

[Linux commit: 5e7ec268fd48d63cfd0e3a9be6c6443f01673bd4]
xen/arch/x86/cpu/mwait-idle.c +39 -0
@@ -580,6 +580,40 @@ static const struct cpuidle_state atom_c
 	{}
 };
 
+static const struct cpuidle_state tangier_cstates[] = {
+	{
+		.name = "C1-TNG",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 1,
+		.target_residency = 4,
+	},
+	{
+		.name = "C4-TNG",
+		.flags = MWAIT2flg(0x30) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 100,
+		.target_residency = 400,
+	},
+	{
+		.name = "C6-TNG",
+		.flags = MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 140,
+		.target_residency = 560,
+	},
+	{
+		.name = "C7-TNG",
+		.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 1200,
+		.target_residency = 4000,
+	},
+	{
+		.name = "C9-TNG",
+		.flags = MWAIT2flg(0x64) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 10000,
+		.target_residency = 20000,
+	},
+	{}
+};
+
 static const struct cpuidle_state avn_cstates[] = {
 	{
 		.name = "C1-AVN",
@@ -800,6 +834,10 @@ static const struct idle_cpu idle_cpu_at
 	.state_table = atom_cstates,
 };
 
+static const struct idle_cpu idle_cpu_tangier = {
+	.state_table = tangier_cstates,
+};
+
 static const struct idle_cpu idle_cpu_lincroft = {
 	.state_table = atom_cstates,
 	.auto_demotion_disable_flags = ATM_LNC_C6_AUTO_DEMOTE,
@@ -889,6 +927,7 @@ static const struct x86_cpu_id intel_idl
 	ICPU(0x2d, snb),
 	ICPU(0x36, atom),
 	ICPU(0x37, byt),
+	ICPU(0x4a, tangier),
 	ICPU(0x4c, cht),
 	ICPU(0x3a, ivb),
 	ICPU(0x3e, ivt),

x86/mwait-idle: add CPU model 0x4a (Atom Z34xx series)

Add CPU ID for Atom Z34xx processors. Datasheets indicate support for this, detailed information about potential quirks or limitations are missing, though. So we just reuse the definition from official BSP code.

[Linux commit: 5e7ec268fd48d63cfd0e3a9be6c6443f01673bd4]
xen/arch/x86/cpu/mwait-idle.c +39 -0
@@ -580,6 +580,40 @@ static const struct cpuidle_state atom_c
 	{}
 };
 
+static const struct cpuidle_state tangier_cstates[] = {
+	{
+		.name = "C1-TNG",
+		.flags = MWAIT2flg(0x00),
+		.exit_latency = 1,
+		.target_residency = 4,
+	},
+	{
+		.name = "C4-TNG",
+		.flags = MWAIT2flg(0x30) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 100,
+		.target_residency = 400,
+	},
+	{
+		.name = "C6-TNG",
+		.flags = MWAIT2flg(0x52) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 140,
+		.target_residency = 560,
+	},
+	{
+		.name = "C7-TNG",
+		.flags = MWAIT2flg(0x60) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 1200,
+		.target_residency = 4000,
+	},
+	{
+		.name = "C9-TNG",
+		.flags = MWAIT2flg(0x64) | CPUIDLE_FLAG_TLB_FLUSHED,
+		.exit_latency = 10000,
+		.target_residency = 20000,
+	},
+	{}
+};
+
 static const struct cpuidle_state avn_cstates[] = {
 	{
 		.name = "C1-AVN",
@@ -800,6 +834,10 @@ static const struct idle_cpu idle_cpu_at
 	.state_table = atom_cstates,
 };
 
+static const struct idle_cpu idle_cpu_tangier = {
+	.state_table = tangier_cstates,
+};
+
 static const struct idle_cpu idle_cpu_lincroft = {
 	.state_table = atom_cstates,
 	.auto_demotion_disable_flags = ATM_LNC_C6_AUTO_DEMOTE,
@@ -889,6 +927,7 @@ static const struct x86_cpu_id intel_idl
 	ICPU(0x2d, snb),
 	ICPU(0x36, atom),
 	ICPU(0x37, byt),
+	ICPU(0x4a, tangier),
 	ICPU(0x4c, cht),
 	ICPU(0x3a, ivb),
 	ICPU(0x3e, ivt),

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

PATCH 2/2 x86/mwait-idle: add Knights Mill CPUID

In reply to Jan Beulich

Add Knights Mill (KNM) to the list of CPUIDs supported by mwait-idle.

[Linux commit: a2c1bc645e87346150516b3abf1933ed29d0f48b]
xen/arch/x86/cpu/mwait-idle.c +1 -0
@@ -946,6 +946,7 @@ static const struct x86_cpu_id intel_idl
 	ICPU(0x9e, skl),
 	ICPU(0x55, skx),
 	ICPU(0x57, knl),
+	ICPU(0x85, knl),
 	ICPU(0x5c, bxt),
 	ICPU(0x5f, dnv),
 	{}

x86/mwait-idle: add Knights Mill CPUID

Add Knights Mill (KNM) to the list of CPUIDs supported by mwait-idle.

[Linux commit: a2c1bc645e87346150516b3abf1933ed29d0f48b]
xen/arch/x86/cpu/mwait-idle.c +1 -0
@@ -946,6 +946,7 @@ static const struct x86_cpu_id intel_idl
 	ICPU(0x9e, skl),
 	ICPU(0x55, skx),
 	ICPU(0x57, knl),
+	ICPU(0x85, knl),
 	ICPU(0x5c, bxt),
 	ICPU(0x5f, dnv),
 	{}

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel