Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983AbbKYWBv (ORCPT ); Wed, 25 Nov 2015 17:01:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48248 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751800AbbKYWBu (ORCPT ); Wed, 25 Nov 2015 17:01:50 -0500 Date: Tue, 24 Nov 2015 21:06:14 -0200 From: Marcelo Tosatti To: Chao Peng Cc: Thomas Gleixner , LKML , Peter Zijlstra , x86@kernel.org, Luiz Capitulino , Vikas Shivappa , Tejun Heo , Yu Fenghua Subject: Re: [RFD] CAT user space interface revisited Message-ID: <20151124230613.GA16984@amt.cnet> References: <20151124073124.GA17000@pengc-linux.bj.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151124073124.GA17000@pengc-linux.bj.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2650 Lines: 69 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/