<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/cpu/intel_rdt_monitor.c, branch linux-4.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-05-19T11:16:44Z</updated>
<entry>
<title>x86/intel_rdt/mba_sc: Feedback loop to dynamically update mem bandwidth</title>
<updated>2018-05-19T11:16:44Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2018-04-20T22:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de73f38f768021610bd305cf74ef3702fcf6a1eb'/>
<id>urn:sha1:de73f38f768021610bd305cf74ef3702fcf6a1eb</id>
<content type='text'>
mba_sc is a feedback loop where we periodically read MBM counters and
try to restrict the bandwidth below a max value so the below is always
true:

  "current bandwidth(cur_bw) &lt; user specified bandwidth(user_bw)"

The frequency of these checks is currently 1s and we just tag along the
MBM overflow timer to do the updates. Doing it once in a second also
makes the calculation of bandwidth easy. The steps of increase or
decrease of bandwidth is the minimum granularity specified by the
hardware.

Although the MBA's goal is to restrict the bandwidth below a maximum,
there may be a need to even increase the bandwidth. Since MBA controls
the L2 external bandwidth where as MBM measures the L3 external
bandwidth, we may end up restricting some rdtgroups unnecessarily. This
may happen in the sequence where rdtgroup (set of jobs) had high
"L3 &lt;-&gt; memory traffic" in initial phases -&gt; mba_sc kicks in and reduced
bandwidth percentage values -&gt; but after some it has mostly "L2 &lt;-&gt; L3"
traffic. In this scenario mba_sc increases the bandwidth percentage when
there is lesser memory traffic.

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/1524263781-14267-7-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/mba_sc: Prepare for feedback loop</title>
<updated>2018-05-19T11:16:44Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2018-04-20T22:36:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba0f26d8529c2dfc9aa6d9e8a338180737f8c1be'/>
<id>urn:sha1:ba0f26d8529c2dfc9aa6d9e8a338180737f8c1be</id>
<content type='text'>
This is a preparatory patch for the mba feedback loop. Add support to
measure the "bandwidth in MBps" and the "delta bandwidth". Measure it by
reading the MBM IA32_QM_CTR MSRs and calculating the amount of "bytes"
moved. There is no user space interface for this and will only be used by
the feedback loop patch.

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: hpa@zytor.com
Link: https://lkml.kernel.org/r/1524263781-14267-6-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/cqm: Make integer rmid_limbo_count static</title>
<updated>2017-10-05T11:20:32Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2017-10-02T14:59:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fd88b60e11b7d81b2c944c1b45834c4a6aa0157'/>
<id>urn:sha1:5fd88b60e11b7d81b2c944c1b45834c4a6aa0157</id>
<content type='text'>
rmid_limbo_count is local to the source and does not need to be in global
scope, so make it static.

Cleans up sparse warning:
symbol 'rmid_limbo_count' was not declared. Should it be static?

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: kernel-janitors@vger.kernel.org
Link: https://lkml.kernel.org/r/20171002145931.27479-1-colin.king@canonical.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/cqm: Improve limbo list processing</title>
<updated>2017-08-16T10:05:41Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-08-16T01:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=24247aeeabe99eab13b798ccccc2dec066dd6f07'/>
<id>urn:sha1:24247aeeabe99eab13b798ccccc2dec066dd6f07</id>
<content type='text'>
During a mkdir, the entire limbo list is synchronously checked on each
package for free RMIDs by sending IPIs. With a large number of RMIDs (SKL
has 192) this creates a intolerable amount of work in IPIs.

Replace the IPI based checking of the limbo list with asynchronous worker
threads on each package which periodically scan the limbo list and move the
RMIDs that have:

	llc_occupancy &lt; threshold_occupancy

on all packages to the free list.

mkdir now returns -ENOSPC if the free list and the limbo list ere empty or
returns -EBUSY if there are RMIDs on the limbo list and the free list is
empty.

Getting rid of the IPIs also simplifies the data structures and the
serialization required for handling the lists.

[ tglx: Rewrote changelog ... ]

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Link: http://lkml.kernel.org/r/1502845243-20454-3-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/mbm: Fix MBM overflow handler during CPU hotplug</title>
<updated>2017-08-16T10:05:41Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-08-16T01:00:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbc4615e0b7df5e21d0991adb4b2798508354924'/>
<id>urn:sha1:bbc4615e0b7df5e21d0991adb4b2798508354924</id>
<content type='text'>
When a CPU is dying, the overflow worker is canceled and rescheduled on a
different CPU in the same domain. But if the timer is already about to
expire this essentially doubles the interval which might result in a non
detected overflow.

Cancel the overflow worker and reschedule it immediately on a different CPU
in same domain. The work could be flushed as well, but that would
reschedule it on the same CPU.

[ tglx: Rewrote changelog once again ]

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Link: http://lkml.kernel.org/r/1502845243-20454-2-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/mbm: Handle counter overflow</title>
<updated>2017-08-01T20:41:29Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-07-25T21:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e33026831bdb5f051499fec6a606f79fe1f94cc8'/>
<id>urn:sha1:e33026831bdb5f051499fec6a606f79fe1f94cc8</id>
<content type='text'>
Set up a delayed work queue for each domain that will read all
the MBM counters of active RMIDs once per second to make sure
that they don't wrap around between reads from users.

[Tony: Added the initializations for the work structure and completed
the patch]

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-29-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/mbm: Add mbm counter initialization</title>
<updated>2017-08-01T20:41:29Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-07-25T21:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4de1dfdd726537e2a78b55759fc646d9b0a0be8'/>
<id>urn:sha1:a4de1dfdd726537e2a78b55759fc646d9b0a0be8</id>
<content type='text'>
MBM counters are monotonically increasing counts representing the total
memory bytes at a particular time. In order to calculate total_bytes for
an rdtgroup, we store the value of the counter when we create an
rdtgroup or when a new domain comes online.

When the total_bytes(all memory controller bytes) or local_bytes(local
memory controller bytes) file in "mon_data" is read it shows the
total bytes for that rdtgroup since its creation. User can snapshot this
at different time intervals to obtain bytes/second.

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-28-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/mbm: Basic counting of MBM events (total and local)</title>
<updated>2017-08-01T20:41:28Z</updated>
<author>
<name>Tony Luck</name>
</author>
<published>2017-07-25T21:14:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9f52425ba303d91c8370719e91d7e578bfdf309f'/>
<id>urn:sha1:9f52425ba303d91c8370719e91d7e578bfdf309f</id>
<content type='text'>
Check CPUID bits for whether each of the MBM events is supported.
Allocate space for each RMID for each counter in each domain to save
previous MSR counter value and running total of data.
Create files in each of the monitor directories.

Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-27-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/cqm: Add mount,umount support</title>
<updated>2017-08-01T20:41:27Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-07-25T21:14:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4af4a88e0c9246990f95c88eeba781265f27c58e'/>
<id>urn:sha1:4af4a88e0c9246990f95c88eeba781265f27c58e</id>
<content type='text'>
Add monitoring support during mount and unmount. Since root directory is
a "ctrl_mon" directory which can control and monitor resources create
the "mon_groups" directory which can hold monitor groups and a
"mon_data" directory which would hold all monitoring data like the rest
of resource groups.

The mount succeeds if either of monitoring or control/allocation is
enabled. If only monitoring is enabled user can still create monitor
groups under the "/sys/fs/resctrl/mon_groups/" and any mkdir under root
would fail. If only control/allocation is enabled all of the monitoring
related directories/files would not exist and resctrl would work in
legacy mode.

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-23-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
<entry>
<title>x86/intel_rdt/cqm: Add mon_data</title>
<updated>2017-08-01T20:41:26Z</updated>
<author>
<name>Vikas Shivappa</name>
</author>
<published>2017-07-25T21:14:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d89b7379015fc561060a4094676d143e6ed264e7'/>
<id>urn:sha1:d89b7379015fc561060a4094676d143e6ed264e7</id>
<content type='text'>
Add a mon_data directory for the root rdtgroup and all other rdtgroups.
The directory holds all of the monitored data for all domains and events
of all resources being monitored.

The mon_data itself has a list of directories in the format
mon_&lt;domain_name&gt;_&lt;domain_id&gt;. Each of these subdirectories contain one
file per event in the mode "0444". Reading the file displays a snapshot
of the monitored data for the event the file represents.

For ex, on a 2 socket Broadwell with llc_occupancy being
monitored the mon_data contents look as below:

$ ls /sys/fs/resctrl/p1/mon_data/
mon_L3_00
mon_L3_01

Each domain directory has one file per event:
$ ls /sys/fs/resctrl/p1/mon_data/mon_L3_00/
llc_occupancy

To read current llc_occupancy of ctrl_mon group p1
$ cat /sys/fs/resctrl/p1/mon_data/mon_L3_00/llc_occupancy
33789096

[This patch idea is based on Tony's sample patches to organise data in a
per domain directory and have one file per event (and use the fp-&gt;priv to
store mon data bits)]

Signed-off-by: Vikas Shivappa &lt;vikas.shivappa@linux.intel.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: ravi.v.shankar@intel.com
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
Cc: peterz@infradead.org
Cc: eranian@google.com
Cc: vikas.shivappa@intel.com
Cc: ak@linux.intel.com
Cc: davidcc@google.com
Cc: reinette.chatre@intel.com
Link: http://lkml.kernel.org/r/1501017287-28083-20-git-send-email-vikas.shivappa@linux.intel.com

</content>
</entry>
</feed>
