Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3234584imu; Sat, 24 Nov 2018 00:43:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/U89fPNrjJ6qVhVfDq5C2WaOBI6JZJ16JuU7zlmLYCP29vutFFNRvU1x3KgAnnEYx5PksFD X-Received: by 2002:a17:902:8ec8:: with SMTP id x8mr5309439plo.210.1543049033300; Sat, 24 Nov 2018 00:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543049033; cv=none; d=google.com; s=arc-20160816; b=QF7jLg3K4l5pDGitYtPe7lC7D1UIzAOB0r8RiXDbz6odqE0NrXHiE4o8NOOMlKdXqO Qd9bGC/gTCtyhPZC8udHz1ZloTFREQlNH7IicaUF5NOSttmCbStXylGGXEK5WLgh1tOc WWFCIAyfzCico2HAik5NeLCi4BsQBG/KiI3YHmsxPv8Cg2PQwB+fccUZzCv33fEkizYa 3bnHGewAacGS157Iwjh/32UKwvqROqmF3DUIfpZzwD9fgrRciQHbzSzCxDo1ZAiYovUO /L/rkKJg2LYtsEgMdNgMkX5sfg7hVUz++Ue4W9hCTczG5zYYS/69Rvq118N5P/4YutUx WxMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4s88aBZ1sJqsjH+d48h6PBKldoyuBofeUcqK4WZZdYk=; b=EnzvRk+YrwzD1e92Yxt/3lMrT1Lq5ImuLZBy+Ie6S5ZyCLbMirghaqwlqOLB4P3FH3 YpVJXaGSeJBRnfJVe2AEvi9VkDquB2VmGiYsI1Yk95BgpkcXVhsR/O9c3YLesjR4UWO2 hKg7ITQs2tpiPVBzqy4REaVZP4eYjSi5VvEMbdkUlrGIhLOW5dkBJBiCvFgjxfXJRz+y IDVXUmk0Psmls8YG3rEls71Um4yPAQILoPSmGLNmlMZL3kcyTN08HWerT2bqr5qpx08P QMo0wKzNnittdoxjXn5oC+bADqAnuY/1/95SXgU9aMDy30IYPoE9qBQIpIDdyKGZTEMK Kntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sCuqKikf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si42708090pgh.422.2018.11.24.00.43.39; Sat, 24 Nov 2018 00:43:53 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=sCuqKikf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633001AbeKXDOA (ORCPT + 99 others); Fri, 23 Nov 2018 22:14:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:47276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2632988AbeKXDOA (ORCPT ); Fri, 23 Nov 2018 22:14:00 -0500 Received: from localhost (lfbn-ncy-1-241-207.w83-194.abo.wanadoo.fr [83.194.85.207]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0B30320861; Fri, 23 Nov 2018 16:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542990545; bh=40989pHUYTCw5HrMvW8esAir5ek4aapLAgyJveJrmAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sCuqKikfagbcaabwtjbjrmmsFYxW89Q3KI22R2UZSwnx89+DkRhpVqV0aKiYw/APR Xy+whcBH9AwIYMWQbgfUg/ELwpBDmWQM5myNnk0CbQsVlm8ggH02z6MsbASC++e+vH wzvCOV6PzS6EqCwUlmSkKsuCU9iRtChRvOFlpHJw= Date: Fri, 23 Nov 2018 17:29:02 +0100 From: Frederic Weisbecker To: Subhra Mazumdar Cc: Jan =?iso-8859-1?Q?H=2E_Sch=F6nherr?= , Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Paul Turner , Vincent Guittot , Morten Rasmussen , Tim Chen Subject: Re: [RFC 00/60] Coscheduling for Linux Message-ID: <20181123162900.GA4855@lerouge> References: <20180907214047.26914-1-jschoenh@amazon.de> <20180914111251.GC24106@hirez.programming.kicks-ass.net> <1d86f497-9fef-0b19-50d6-d46ef1c0bffa@amazon.de> <20180917122538.GT24124@hirez.programming.kicks-ass.net> <648176de-9ad4-a4b3-c542-bbaf250cd8cb@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 11:36:34AM -0700, Subhra Mazumdar wrote: > > > On 09/26/2018 02:58 AM, Jan H. Sch?nherr wrote: > >On 09/17/2018 02:25 PM, Peter Zijlstra wrote: > >>On Fri, Sep 14, 2018 at 06:25:44PM +0200, Jan H. Sch?nherr wrote: > >> > >>>Assuming, there is a cgroup-less solution that can prevent simultaneous > >>>execution of tasks on a core, when they're not supposed to. How would you > >>>tell the scheduler, which tasks these are? > >>Specifically for L1TF I hooked into/extended KVM's preempt_notifier > >>registration interface, which tells us which tasks are VCPUs and to > >>which VM they belong. > >> > >>But if we want to actually expose this to userspace, we can either do a > >>prctl() or extend struct sched_attr. > >Both, Peter and Subhra, seem to prefer an interface different than cgroups > >to specify what to coschedule. > > > >Can you provide some extra motivation for me, why you feel that way? > >(ignoring the current scalability issues with the cpu group controller) > > > > > >After all, cgroups where designed to create arbitrary groups of tasks and > >to attach functionality to those groups. > > > >If we were to introduce a different interface to control that, we'd need to > >introduce a whole new group concept, so that you make tasks part of some > >group while at the same time preventing unauthorized tasks from joining a > >group. > > > > > >I currently don't see any wins, just a loss in flexibility. > > > >Regards > >Jan > I think cgroups will the get the job done for any use case. But we have, > e.g. affinity control via both sched_setaffinity and cgroup cpusets. It > will be good to have an alternative way to specify co-scheduling too for > those who don't want to use cgroup for some reason. It can be added later > on though, only how one will override the other will need to be sorted out. I kind of agree with Jan here that this is just going to add yet another task group mechanism, very similar to the existing one, with runqueues inside and all. Can you imagine kernel/sched/fair.c now dealing with both groups implementations? What happens when cgroup task groups and cosched sched groups don't match wrt. their tasks, their priorities, etc... I understand cgroup task group has become infamous. But it may be a better idea in the long run to fix it.