From: Marcelo Tosatti <mtosatti@redhat.com>
To: Chao Peng <chao.p.peng@linux.intel.com>, f@amt.cnet
Cc: Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, Luiz Capitulino <lcapitulino@redhat.com>,
Vikas Shivappa <vikas.shivappa@intel.com>,
Tejun Heo <tj@kernel.org>, Yu Fenghua <fenghua.yu@intel.com>
Subject: Re: [RFD] CAT user space interface revisited
Date: Tue, 24 Nov 2015 23:29:29 -0200 [thread overview]
Message-ID: <20151125012927.GA29177@amt.cnet> (raw)
In-Reply-To: <20151124212543.GA11303@amt.cnet>
On Tue, Nov 24, 2015 at 07:25:43PM -0200, Marcelo Tosatti wrote:
> On Tue, Nov 24, 2015 at 04:27:54PM +0800, Chao Peng wrote:
> > On Wed, Nov 18, 2015 at 10:01:54PM -0200, Marcelo Tosatti wrote:
> > > > tglx
> > >
> > > Again: you don't need to look into the MSR table and relate it
> > > to tasks if you store the data as:
> > >
> > > task group 1 = {
> > > reservation-1 = {size = 80Kb, type = data, socketmask = 0xffff},
> > > reservation-2 = {size = 100Kb, type = code, socketmask = 0xffff}
> > > }
> > >
> > > task group 2 = {
> > > reservation-1 = {size = 80Kb, type = data, socketmask = 0xffff},
> > > reservation-3 = {size = 200Kb, type = code, socketmask = 0xffff}
> > > }
> > >
> > > Task group 1 and task group 2 share reservation-1.
> >
> > Because there is only size but not CBM position info, I guess for
> > different reservations they will not overlap each other, right?
>
> Reservation 1 is shared between task group 1 and task group 2
> so the CBMs overlap (by 80Kb, rounded).
>
> > Personally I like this way of exposing minimal information to userspace.
> > I can think it working well except for one concern of losing flexibility:
> >
> > For instance, there is a box for which the full CBM is 0xfffff. After
> > cache reservation creating/freeing for a while we then have reservations:
> >
> > reservation1: 0xf0000
> > reservation2: 0x00ff0
> >
> > Now people want to request a reservation which size is 0xff, so how
> > will kernel do at this time? It could return just error or do some
> > moving/merging (e.g. for reservation2: 0x00ff0 => 0x0ff00) and then
> > satisfy the request. But I don't know if the moving/merging will cause
> > delay for tasks that is using it.
>
> Right, i was thinking of adding a "force" parameter.
>
> So, default behaviour of attach: do not merge.
> "force" behaviour of attach: move reservations around and merge if
> necessary.
To make the decision userspace would need the know that a merge can
be performed if particular reservations can be moved (that is, the
moveable property is per-reservation, depending on whether its ok
for the given app to cacheline fault or not).
Anyway, thats for later.
next prev parent reply other threads:[~2015-11-25 22:01 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 18:25 [RFD] CAT user space interface revisited Thomas Gleixner
2015-11-18 19:38 ` Luiz Capitulino
2015-11-18 19:55 ` Auld, Will
2015-11-18 22:34 ` Marcelo Tosatti
2015-11-19 0:34 ` Marcelo Tosatti
2015-11-19 8:35 ` Thomas Gleixner
2015-11-19 13:44 ` Luiz Capitulino
2015-11-20 14:15 ` Marcelo Tosatti
2015-11-19 8:11 ` Thomas Gleixner
2015-11-19 0:01 ` Marcelo Tosatti
2015-11-19 1:05 ` Marcelo Tosatti
2015-11-19 9:09 ` Thomas Gleixner
2015-11-19 20:59 ` Marcelo Tosatti
2015-11-20 7:53 ` Thomas Gleixner
2015-11-20 17:51 ` Marcelo Tosatti
2015-11-19 20:30 ` Marcelo Tosatti
2015-11-19 9:07 ` Thomas Gleixner
2015-11-24 8:27 ` Chao Peng
[not found] ` <20151124212543.GA11303@amt.cnet>
2015-11-25 1:29 ` Marcelo Tosatti [this message]
2015-11-24 7:31 ` Chao Peng
2015-11-24 23:06 ` Marcelo Tosatti
2015-12-22 18:12 ` Yu, Fenghua
2015-12-23 10:28 ` Marcelo Tosatti
2015-12-29 12:44 ` Thomas Gleixner
2015-12-31 19:22 ` Marcelo Tosatti
2015-12-31 22:30 ` Thomas Gleixner
2016-01-04 17:20 ` Marcelo Tosatti
2016-01-04 17:44 ` Marcelo Tosatti
2016-01-05 23:09 ` Thomas Gleixner
2016-01-06 12:46 ` Marcelo Tosatti
2016-01-06 13:10 ` Tejun Heo
2016-01-08 20:21 ` Thomas Gleixner
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=20151125012927.GA29177@amt.cnet \
--to=mtosatti@redhat.com \
--cc=chao.p.peng@linux.intel.com \
--cc=f@amt.cnet \
--cc=fenghua.yu@intel.com \
--cc=lcapitulino@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=vikas.shivappa@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