From: Thomas Gleixner <tglx@linutronix.de>
To: Vikas Shivappa <vikas.shivappa@linux.intel.com>
Cc: vikas.shivappa@intel.com, x86@kernel.org,
linux-kernel@vger.kernel.org, hpa@zytor.com,
peterz@infradead.org, ravi.v.shankar@intel.com,
tony.luck@intel.com, fenghua.yu@intel.com, eranian@google.com,
davidcc@google.com, ak@linux.intel.com,
sai.praneeth.prakhya@intel.com
Subject: Re: [PATCH 3/3] x86/intel_rdt/cqm: Improve limbo list processing
Date: Mon, 14 Aug 2017 11:45:45 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1708141037030.1865@nanos> (raw)
In-Reply-To: <1502304395-7166-4-git-send-email-vikas.shivappa@linux.intel.com>
On Wed, 9 Aug 2017, Vikas Shivappa wrote:
> @@ -426,6 +426,9 @@ static int domain_setup_mon_state(struct rdt_resource *r, struct rdt_domain *d)
> GFP_KERNEL);
> if (!d->rmid_busy_llc)
> return -ENOMEM;
> + INIT_DELAYED_WORK(&d->cqm_limbo, cqm_handle_limbo);
> + if (has_busy_rmid(r, d))
> + cqm_setup_limbo_handler(d);
This is beyond silly. d->rmid_busy_llc is allocated a few lines above. How
would a bit be set here?
> }
> if (is_mbm_total_enabled()) {
> tsize = sizeof(*d->mbm_total);
> @@ -536,11 +539,25 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r)
> list_del(&d->list);
> if (is_mbm_enabled())
> cancel_delayed_work(&d->mbm_over);
> +
> + if (is_llc_occupancy_enabled() &&
> + has_busy_rmid(r, d))
What is that line break helping here and why can't you just unconditionally
cancel the work?
> + cancel_delayed_work(&d->cqm_limbo);
> +
> kfree(d);
> - } 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);
> + return;
> + }
> +
> + if (r == &rdt_resources_all[RDT_RESOURCE_L3]) {
> + if (is_mbm_enabled() && cpu == d->mbm_work_cpu) {
> + cancel_delayed_work(&d->mbm_over);
> + mbm_setup_overflow_handler(d);
I think this is the wrong approach. If the timer is about to fire you
essentially double the interval. So you better flush the work, which will
reschedule it if needed.
> + }
> + if (is_llc_occupancy_enabled() && cpu == d->mbm_work_cpu &&
That want's to be d->cbm_work_cpu, right?
> + has_busy_rmid(r, d)) {
> + cancel_delayed_work(&d->cqm_limbo);
> + cqm_setup_limbo_handler(d);
See above.
Thanks,
tglx
next prev parent reply other threads:[~2017-08-14 9:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 18:46 [PATCH 0/3 V3] Cqm3 based on resctrl fs with MBM support Vikas Shivappa
2017-08-09 18:46 ` [PATCH 1/3] x86/intel_rdt/cqm: Add fix to clear the default RMID during hotcpu Vikas Shivappa
2017-08-14 9:52 ` [tip:x86/cache] x86/intel_rdt/cqm: Clear " tip-bot for Vikas Shivappa
2017-08-09 18:46 ` [PATCH 2/3] x86/intel_rdt: Modify the intel_pqr_state for better performance Vikas Shivappa
2017-08-14 9:52 ` [tip:x86/cache] " tip-bot for Vikas Shivappa
2017-08-09 18:46 ` [PATCH 3/3] x86/intel_rdt/cqm: Improve limbo list processing Vikas Shivappa
2017-08-14 9:45 ` Thomas Gleixner [this message]
2017-08-14 19:16 ` Shivappa Vikas
2017-08-14 21:17 ` Shivappa Vikas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1708141037030.1865@nanos \
--to=tglx@linutronix.de \
--cc=ak@linux.intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=fenghua.yu@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.v.shankar@intel.com \
--cc=sai.praneeth.prakhya@intel.com \
--cc=tony.luck@intel.com \
--cc=vikas.shivappa@intel.com \
--cc=vikas.shivappa@linux.intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®