From: Marcelo Tosatti <mtosatti@redhat.com>
To: Chao Peng <chao.p.peng@linux.intel.com>
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 21:06:14 -0200 [thread overview]
Message-ID: <20151124230613.GA16984@amt.cnet> (raw)
In-Reply-To: <20151124073124.GA17000@pengc-linux.bj.intel.com>
On Tue, Nov 24, 2015 at 03:31:24PM +0800, Chao Peng wrote:
> On Wed, Nov 18, 2015 at 07:25:03PM +0100, Thomas Gleixner wrote:
> >
> > Let's look at partitioning itself. We have two options:
> >
> > 1) Per task partitioning
> >
> > 2) Per CPU partitioning
> >
> > So far we only talked about #1, but I think that #2 has a value as
> > well. Let me give you a simple example.
>
> I would second this. In practice per CPU partitioning is useful for
> realtime as well. And I can see three possible solutions:
>
> 1) What you suggested below, to address both problems in one
> framework. But I wonder if it would end with too complex.
>
> 2) Achieve per CPU partitioning with per task partitioning. For
> example, if current CAT patch can solve the kernel threads
> problem, together with CPU pinning, we then can set a same CBM
> for all the tasks/kernel threads run on an isolated CPU.
As for the kernel threads problem, it seems its a silly limitation of
the code which handles writes to cgroups:
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index f89d929..0603652 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2466,16 +2466,6 @@ static ssize_t __cgroup_procs_write(struct
kernfs_open_file *of, char *buf,
if (threadgroup)
tsk = tsk->group_leader;
- /*
- * Workqueue threads may acquire PF_NO_SETAFFINITY and become
- * trapped in a cpuset, or RT worker may be born in a cgroup
- * with no rt_runtime allocated. Just say no.
- */
- if (tsk == kthreadd_task || (tsk->flags & PF_NO_SETAFFINITY)) {
- ret = -EINVAL;
- goto out_unlock_rcu;
- }
-
get_task_struct(tsk);
rcu_read_unlock();
For a cgroup hierarchy with no cpusets (such as CAT only) this
limitation makes no sense (looking for a place where to move this to).
Any ETA on per-socket bitmasks?
>
> 3) I wonder if it feasible to separate the two requirements? For
> example, divides the work into three components: rdt-base,
> per task interface (current cgroup interface/IOCTL or something)
> and per CPU interface. The two interfaces are exclusive and
> selected at build time. One thing to reject this option would be
> even with per CPU partitioning, we still need per task partitioning,
> in that case we will go to option 1) again.
>
> Thanks,
> Chao
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
2015-11-24 7:31 ` Chao Peng
2015-11-24 23:06 ` Marcelo Tosatti [this message]
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=20151124230613.GA16984@amt.cnet \
--to=mtosatti@redhat.com \
--cc=chao.p.peng@linux.intel.com \
--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