public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@codeblueprint.co.uk>
To: Kanaka Juvva <kanaka.d.juvva@linux.intel.com>
Cc: kanaka.d.juvva@intel.com, glenn.p.williamson@intel.com,
	matt.fleming@intel.com, will.auld@intel.com, andi@firstfloor.org,
	linux-kernel@vger.kernel.org, tony.luck@intel.com,
	peterz@infradead.org, tglx@linutronix.de, tj@kernel.org,
	x86@kernel.org, mingo@redhat.com, hpa@zytor.com,
	vikas.shivappa@intel.com
Subject: Re: [PATCH v3 2/2] perf,x86: skip intel_cqm_stable if CMT is not present in a CPU model
Date: Thu, 20 Aug 2015 11:41:51 +0100	[thread overview]
Message-ID: <20150820104151.GA2567@codeblueprint.co.uk> (raw)
In-Reply-To: <20150818170900.GG3233@codeblueprint.co.uk>

On Tue, 18 Aug, at 06:09:01PM, Matt Fleming wrote:
> 
> You can only skip the stabilization if there are no CMT RMIDs on the
> limbo lru at all.

I need to provide a little more detail here...

There are actually 3 cases you need to consider when you make the MBM
changes to intel_cqm_rmid_stabilize(),

  1. RMIDs on the limbo lru are *only* CMT
  2. RMIDs on the limbo lru are *only* MBM
  3. RMIDs on the limbo lru are a mixture of CMT *and* MBM

Case 1 is exactly what is supported today and so that functionality
needs to remain unchanged. For case 2 you can completely skip the SMP IPI
stabilization and move all RMIDs from the limbo lru to the free lru,
which is similar in spirit to your patch.

Case 3 is by far the most interesting. The simplest way to handle it
is to skip any MBM RMIDs on the limbo lru inside of the SMP IPI
callback, intel_cqm_stable().

But that's pretty suboptimal if you have lots of MBM RMIDs and few CMT
RMIDs on the limbo lru because you'd be iterating most of the entries
in the callback function for no reason - you'd just skip them.

Instead what I suggest you explore is removing each MBM RMID from the
limbo lru and putting it on a function-local list on the stack in
intel_cqm_rmid_stabilize(). Since you are guaranteed to be allowed to
put the MBM RMID on the free lru (we don't need to stabilize it, so
the stabilzation can't fail) there's no need to worry about error
cases or anything like that.

-- 
Matt Fleming, Intel Open Source Technology Center

      reply	other threads:[~2015-08-20 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08  7:36 [PATCH v3 2/2] perf,x86: skip intel_cqm_stable if CMT is not present in a CPU model Kanaka Juvva
2015-08-17 13:16 ` Matt Fleming
2015-08-18 17:09 ` Matt Fleming
2015-08-20 10:41   ` Matt Fleming [this message]

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=20150820104151.GA2567@codeblueprint.co.uk \
    --to=matt@codeblueprint.co.uk \
    --cc=andi@firstfloor.org \
    --cc=glenn.p.williamson@intel.com \
    --cc=hpa@zytor.com \
    --cc=kanaka.d.juvva@intel.com \
    --cc=kanaka.d.juvva@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=vikas.shivappa@intel.com \
    --cc=will.auld@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