diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 97c8d8321e044db900866eab0bb79058c8aad79c..b8dc141896b6ee036da70329295bcb9e2afc75cb 100644 --- a/arch/x86/kernel/cpu/intel_rdt.c +++ b/arch/x86/kernel/cpu/intel_rdt.c @@ -447,7 +447,7 @@ static int domain_setup_mon_state(struct rdt_resource *r, struct rdt_domain *d) if (is_mbm_enabled()) { INIT_DELAYED_WORK(&d->mbm_over, mbm_handle_overflow); - mbm_setup_overflow_handler(d); + mbm_setup_overflow_handler(d, MBM_OVERFLOW_INTERVAL); } return 0; @@ -540,7 +540,7 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r) } else if (r == &rdt_resources_all[RDT_RESOURCE_L3] && cpu == d->mbm_work_cpu && is_mbm_enabled()) { cancel_delayed_work(&d->mbm_over); - mbm_setup_overflow_handler(d); + mbm_setup_overflow_handler(d, 0); } } diff --git a/arch/x86/kernel/cpu/intel_rdt.h b/arch/x86/kernel/cpu/intel_rdt.h index 4040bf1a075cf3b37f31a024be1a7b476020a018..3e48693906031418223516aad9ca363f5f2585ef 100644 --- a/arch/x86/kernel/cpu/intel_rdt.h +++ b/arch/x86/kernel/cpu/intel_rdt.h @@ -422,7 +422,7 @@ void mkdir_mondata_subdir_allrdtgrp(struct rdt_resource *r, struct rdt_domain *d); void mon_event_read(struct rmid_read *rr, struct rdt_domain *d, struct rdtgroup *rdtgrp, int evtid, int first); -void mbm_setup_overflow_handler(struct rdt_domain *dom); +void mbm_setup_overflow_handler(struct rdt_domain *dom, unsigned long delay_ms); void mbm_handle_overflow(struct work_struct *work); #endif /* _ASM_X86_INTEL_RDT_H */ diff --git a/arch/x86/kernel/cpu/intel_rdt_monitor.c b/arch/x86/kernel/cpu/intel_rdt_monitor.c index d6bfdfd22abe87c5977fb41dc4928c045d55a804..8378785883dc2e03a638e4ed973cb7772aafe739 100644 --- a/arch/x86/kernel/cpu/intel_rdt_monitor.c +++ b/arch/x86/kernel/cpu/intel_rdt_monitor.c @@ -417,9 +417,9 @@ void mbm_handle_overflow(struct work_struct *work) mutex_unlock(&rdtgroup_mutex); } -void mbm_setup_overflow_handler(struct rdt_domain *dom) +void mbm_setup_overflow_handler(struct rdt_domain *dom, unsigned long delay_ms) { - unsigned long delay = msecs_to_jiffies(MBM_OVERFLOW_INTERVAL); + unsigned long delay = msecs_to_jiffies(delay_ms); int cpu; if (!static_branch_likely(&rdt_enable_key)) diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c index 86a69794d7e475dc58faf889204c7af883fe29f5..b529f93e8ed0990fc6c864dc2222646eaae9b51d 100644 --- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c +++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c @@ -1140,7 +1140,7 @@ static struct dentry *rdt_mount(struct file_system_type *fs_type, if (is_mbm_enabled()) { r = &rdt_resources_all[RDT_RESOURCE_L3]; list_for_each_entry(dom, &r->domains, list) - mbm_setup_overflow_handler(dom); + mbm_setup_overflow_handler(dom, MBM_OVERFLOW_INTERVAL); } goto out;