Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583676
| From | Vikas Shivappa <vikas.shivappa@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/5] x86/intel_rdt: Update control registers only when user really modifies it |
| Date | 2017-02-17 20:50 +0100 |
| Message-ID | <tbWHw-8v1-11@gated-at.bofh.it> (permalink) |
| References | <tbWHv-8v1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When a schemata is updated, the values for all the domains and all
resources are entered. However, the values for each of them may not
change in many use cases as the user is only updating values for a
subset of resources and domains. The resource control values are updated
via QOS_MSRs which are per package. Change the update to QOS_MSRs to
happen only when the control value on the particular domain is updated.
Hence not sending IPIs on all domains when user updates the control
vals.
Signed-off-by: Vikas Shivappa <vikas.shivappa@linux.intel.com>
---
arch/x86/kernel/cpu/intel_rdt_schemata.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel_rdt_schemata.c b/arch/x86/kernel/cpu/intel_rdt_schemata.c
index f369cb8..14ba504 100644
--- a/arch/x86/kernel/cpu/intel_rdt_schemata.c
+++ b/arch/x86/kernel/cpu/intel_rdt_schemata.c
@@ -114,9 +114,16 @@ static int update_domains(struct rdt_resource *r, int closid)
msr_param.high = msr_param.low + 1;
msr_param.res = r;
+ /*
+ * Only update the domains that user has changed.
+ * There by avoiding unnecessary IPIs.
+ */
list_for_each_entry(d, &r->domains, list) {
- cpumask_set_cpu(cpumask_any(&d->cpu_mask), cpu_mask);
- d->cbm[msr_param.low] = r->tmp_cbms[idx++];
+ if (d->cbm[msr_param.low] != r->tmp_cbms[idx]) {
+ cpumask_set_cpu(cpumask_any(&d->cpu_mask), cpu_mask);
+ d->cbm[msr_param.low] = r->tmp_cbms[idx];
+ }
+ idx++;
}
cpu = get_cpu();
/* Update CBM on this cpu if it's in cpu_mask. */
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] x86/intel_rdt: Improvements/Fixes to RDT framework Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-02-17 20:50 +0100 [PATCH 1/5] x86/intel_rdt: Update control registers only when user really modifies it Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-02-17 20:50 +0100 [PATCH 5/5] x86/intel_rdt: hotcpu updates for RDT Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-02-17 20:50 +0100 [PATCH 3/5] x86/intel_rdt: Fail early on a resource with incorrect domains Vikas Shivappa <vikas.shivappa@linux.intel.com> - 2017-02-17 20:50 +0100
csiph-web