Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3324996imm; Fri, 19 Oct 2018 08:46:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV60enZPdH2ZTa0GDktpFkmtwOjNW5+aGTnh5OWzWUso6HixF9unnaCAXnWz7e09cpSQXSDEu X-Received: by 2002:a63:3747:: with SMTP id g7-v6mr33877324pgn.59.1539964005174; Fri, 19 Oct 2018 08:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539964005; cv=none; d=google.com; s=arc-20160816; b=ry6zJJi93KzbUdfMh133onrVi/fEsKAcH1tB9zYKMeVJ45FBXiH43Q44uX1V/pf8JB KD3rDImNdz8s1DdBuNFoCUlcT3g/tsWIe/2Rm5SVUP5swv9lLbRZy3zJNsZnb1OPhjYL dSXUgrMLVBWeY+2q23ZiaZ0Ik8jWZtj0g2manH7faicewoUwUzMSVk6OF9Oz/W5sglf1 OM4piSYM6y3aTk8cUSRW/WBxMHOPVaH1UqNxh25XxQ5Sh+8QSgkGPxOmnZOzax+4tyql IU7wQhUG9S2K5oBCHDicmPa2ico/rBvTDXdUmP4kqeTAI0j8Mv0JthsHEEAov1H6q2D8 jF7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to:date :cc:to:from:subject:message-id; bh=yBhavZ927dNH/ZdMovevxfHV39jH+z8DII+Le8QjQ78=; b=lkiYHXWsJ9uNc4X6WgjiTD2PmrWLGaAFf5yhQUzo6lSUpzimzgOnZqcfHD7zt0ZQVM EZUKCHsutl8zsbKbMp4yJWOUDoo2xCC+AiKWb0iv/M+0va4OvHsuWJZrUjXVuHoVFRot BELOT534FnxbA9dWupfanN35a2QiE4EHinRyDR0sA9x6WWxmVM6DE6EMr1GQGIgbA0uI GzkvCJ55J7WV1+1KRQx4LNZ7CTlEF9TBHVjwsmQVb6GRG2CvMZOEDHankTfwErMuIOit 2ocPuY3P1mHkNJX1B0Jt8ZxsrSckBs/FQjPSbRsBtuh/gOUbwzpKEptLFTaIZ9RqVAMu Gs7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x21-v6si150846plr.70.2018.10.19.08.46.29; Fri, 19 Oct 2018 08:46:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727697AbeJSXwC (ORCPT + 99 others); Fri, 19 Oct 2018 19:52:02 -0400 Received: from shelob.surriel.com ([96.67.55.147]:45674 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726930AbeJSXwC (ORCPT ); Fri, 19 Oct 2018 19:52:02 -0400 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gDWxl-0002d4-8j; Fri, 19 Oct 2018 11:45:21 -0400 Message-ID: Subject: Re: [RFC 00/60] Coscheduling for Linux From: Rik van Riel To: Frederic Weisbecker Cc: "Jan H." =?ISO-8859-1?Q?Sch=F6nherr?= , Ingo Molnar , Peter Zijlstra , linux-kernel@vger.kernel.org, Subhra Mazumdar Date: Fri, 19 Oct 2018 11:45:19 -0400 In-Reply-To: <20181019153316.GB15416@lerouge> References: <20180907214047.26914-1-jschoenh@amazon.de> <20181017020933.GC24723@lerouge> <824154aacf8a5cbff57b4df6cb072b7d6e277f34.camel@surriel.com> <20181019153316.GB15416@lerouge> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-uSESSwnIuGk5sIfO7vRh" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-uSESSwnIuGk5sIfO7vRh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2018-10-19 at 17:33 +0200, Frederic Weisbecker wrote: > On Fri, Oct 19, 2018 at 11:16:49AM -0400, Rik van Riel wrote: > > On Fri, 2018-10-19 at 13:40 +0200, Jan H. Sch=C3=B6nherr wrote: > > >=20 > > > Now, it would be possible to "invent" relocatable cpusets to > > > address > > > that > > > issue ("I want affinity restricted to a core, I don't care > > > which"), > > > but > > > then, the current way how cpuset affinity is enforced doesn't > > > scale > > > for > > > making use of it from within the balancer. (The upcoming load > > > balancing > > > portion of the coscheduler currently uses a file similar to > > > cpu.scheduled > > > to restrict affinity to a load-balancer-controlled subset of the > > > system.) > >=20 > > Oh boy, so the coscheduler is going to get its > > own load balancer? > >=20 > > At that point, why bother integrating the > > coscheduler into CFS, instead of making it its > > own scheduling class? > >=20 > > CFS is already complicated enough that it borders > > on unmaintainable. I would really prefer to have > > the coscheduler code separate from CFS, unless > > there is a really compelling reason to do otherwise. >=20 > I guess he wants to reuse as much as possible from the CFS features > and > code present or to come (nice, fairness, load balancing, power aware, > NUMA aware, etc...). I wonder if things like nice levels, fairness, and balancing could be broken out into code that could be reused from both CFS and a new co-scheduler scheduling class. A bunch of the cgroup code is already broken out, but maybe some more could be broken out and shared, too? > OTOH you're right, the thing has specific enough requirements to > consider a new sched policy.=20 Some bits of functionality come to mind: - track groups of tasks that should be co-scheduled (eg all the VCPUs of a virtual machine) - track the subsets of those groups that are runnable (eg. the currently runnable VCPUs of a virtual machine) - figure out time slots and CPU assignments to efficiently use CPU time for the co-scheduled tasks (while leaving some configurable(?) amount of CPU time=20 available for other tasks) - configuring some lower-level code on each affected CPU to "run task A in slot X", etc This really does not seem like something that could be shoehorned into CFS without making it unmaintainable. Furthermore, it also seems like the thing that you could never really get into a highly efficient state as long as it is weighed down by the rest of CFS. --=20 All Rights Reversed. --=-uSESSwnIuGk5sIfO7vRh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAlvJ/BAACgkQznnekoTE 3oMnBAf/XZ5FYRjXCcBLBqR5xipXq7leCGGOhPlJFF+dSRW9CrrAa599/sTrA80A HP5KYBKOrsllzCYSI+93xEL/i5u+SbMh73dE3UtaHDFIsohPKpPk23hs+vZpRPll hI6RJu7Qo6U2csA0JEYgx6pNDRHDYGhnTCdQqSH4kIt9OeW8NGBJnf8rtWemKyf0 cg/vKR3okqnHFGpuhOXm/s94PZrsmMAYm3Qe8vN5bJvIBSzLKn5nglY2QYGm3juh KatSsPQj4P3WUIbyjWZBtFbVf/vEH932943Yg67rM6E1oUBDLe+GKWxLSQaAfcAH goyThKZyR2kGEi26lFLy1qsh10Y76g== =Qg3O -----END PGP SIGNATURE----- --=-uSESSwnIuGk5sIfO7vRh--