From: Chao Peng <chao.p.peng@linux.intel.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: wei.liu2@citrix.com, Ian.Campbell@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
Xen-devel <xen-devel@lists.xen.org>,
Dongxiao Xu <dongxiao.xu@intel.com>,
JBeulich@suse.com
Subject: Re: [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities
Date: Tue, 7 Apr 2015 16:19:48 +0800 [thread overview]
Message-ID: <20150407081948.GB3404@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <20150404020423.22875.23590.stgit@Solace.station>
On Sat, Apr 04, 2015 at 04:14:15AM +0200, Dario Faggioli wrote:
> Hi Everyone,
>
> This RFC series is the outcome of an investigation I've been doing about
> whether we can take better advantage of features like Intel CMT (and of PSR
> features in general). By "take better advantage of" them I mean, for example,
> use the data obtained from monitoring within the scheduler and/or within
> libxl's automatic NUMA placement algorithm, or similar.
>
> I'm putting here in the cover letter a markdown document I wrote to better
> describe my findings and ideas (sorry if it's a bit long! :-D). You can also
> fetch it at the following links:
>
> * http://xenbits.xen.org/people/dariof/CMT-in-scheduling.pdf
> * http://xenbits.xen.org/people/dariof/CMT-in-scheduling.markdown
>
> See the document itself and the changelog of the various patches for details.
Very good summary and possible usage analysis. Most of the problems do
exist and some of them may be solved partially but some looks
unavoidable.
>
> The series includes one Chao's patch on top, as I found it convenient to build
> on top of it. The series itself is available here:
>
> git://xenbits.xen.org/people/dariof/xen.git wip/sched/icachemon
> http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/wip/sched/icachemon
>
> Thanks a lot to everyone that will read and reply! :-)
>
> Regards,
> Dario
> ---
>
> This is exactly what happens in the current implementation. Result looks as
> follows:
>
> [root@redbrick ~]# xl psr-cmt-attach 0
> [root@redbrick ~]# xl psr-cmt-attach 1
> Total RMID: 71
> Name ID Socket 0 Socket 1 Socket 2 Socket 3
> Total L3 Cache Size 46080 KB 46080 KB 46080 KB 46080 KB
> Domain-0 0 6768 KB 0 KB 0 KB 0 KB
> wheezy64 1 0 KB 144 KB 144 KB 0 KB
>
> Let's assume that RMID 1 (RMID 0 is reserved) is used for Domain-0 and RMID 2
> is used for wheezy64. Then:
>
> [root@redbrick ~]# xl psr-cmt-detach 0
> [root@redbrick ~]# xl psr-cmt-detach 1
>
> So now both RMID 1 and 2 are free to be reused. Now, let's issue the following
> commands:
>
> [root@redbrick ~]# xl psr-cmt-attach 1
> [root@redbrick ~]# xl psr-cmt-attach 0
>
> Which means that RMID 1 is now assigned to wheezy64, and RMID 2 is given to
> Domain-0. Here's the effect:
>
> [root@redbrick ~]# xl psr-cmt-show cache_occupancy
> Total RMID: 71
> Name ID Socket 0 Socket 1 Socket 2 Socket 3
> Total L3 Cache Size 46080 KB 46080 KB 46080 KB 46080 KB
> Domain-0 0 216 KB 144 KB 144 KB 0 KB
> wheezy64 1 7416 KB 0 KB 1872 KB 0 KB
>
> It looks quite likely that the 144KB occupancy on sockets 1 and 2, now being
> accounted to Domain-0, is really what has been allocated by domain wheezy64,
> before the RMID "switch". The same applies to the 7416KB on socket 0 now
> accounted to wheezy64, i.e., most of this is not accurate and was allocated
> there by Domain-0.
>
> This is only a simple example, others have been performed, restricting the
> affinity of the various domains involved in order to control on what socket
> cache load were to be expected, and all confirm the above reasoning.
>
> It is rather easy to appreciate that any kind of 'flushing' mechanism, to be
> triggered when reusing an RMID (if anything like that even exists!) would
> impact system performance (e.g., it is not an option in hot paths), but the
> situation outlined above needs to be fixed, before the mechanism could be
> considered usable and reliable enough to do anything on top of it.
As I know, no such 'flushing' mechanism available at present. One
possible software solution to lighten this issue is rotating the RMIDs
with algorithm like 'use oldest unused RMID first'.
Chao
next prev parent reply other threads:[~2015-04-07 8:19 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-04 2:14 [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities Dario Faggioli
2015-04-04 2:14 ` [RFC PATCH 1/7] x86: improve psr scheduling code Dario Faggioli
2015-04-06 13:48 ` Konrad Rzeszutek Wilk
2015-04-04 2:14 ` [RFC PATCH 2/7] Xen: x86: print max usable RMID during init Dario Faggioli
2015-04-06 13:48 ` Konrad Rzeszutek Wilk
2015-04-07 10:11 ` Dario Faggioli
2015-04-04 2:14 ` [RFC PATCH 3/7] xen: psr: reserve an RMID for each core Dario Faggioli
2015-04-06 13:59 ` Konrad Rzeszutek Wilk
2015-04-07 10:19 ` Dario Faggioli
2015-04-07 13:57 ` Konrad Rzeszutek Wilk
2015-04-07 8:24 ` Chao Peng
2015-04-07 10:07 ` Dario Faggioli
2015-04-08 13:28 ` George Dunlap
2015-04-08 14:03 ` Dario Faggioli
2015-04-04 2:14 ` [RFC PATCH 4/7] xen: libxc: libxl: report per-CPU cache occupancy up to libxl Dario Faggioli
2015-04-04 2:14 ` [RFC PATCH 5/7] xen: libxc: libxl: allow for attaching and detaching a CPU to CMT Dario Faggioli
2015-04-04 2:15 ` [RFC PATCH 6/7] xl: report per-CPU cache occupancy up to libxl Dario Faggioli
2015-04-04 2:15 ` [RFC PATCH 7/7] xl: allow for attaching and detaching a CPU to CMT Dario Faggioli
2015-04-07 8:19 ` Chao Peng [this message]
2015-04-07 9:51 ` [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities Dario Faggioli
2015-04-07 10:27 ` Andrew Cooper
2015-04-07 13:10 ` Dario Faggioli
2015-04-08 5:59 ` Chao Peng
2015-04-08 8:23 ` Dario Faggioli
2015-04-08 8:53 ` Andrew Cooper
2015-04-08 8:55 ` Chao Peng
2015-04-09 15:44 ` Meng Xu
2015-04-08 11:27 ` George Dunlap
2015-04-08 13:29 ` Dario Faggioli
2015-04-08 11:30 ` George Dunlap
2015-04-08 13:16 ` Dario Faggioli
2015-04-09 15:37 ` Meng Xu
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=20150407081948.GB3404@pengc-linux.bj.intel.com \
--to=chao.p.peng@linux.intel.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=dongxiao.xu@intel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.