Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1646160pxb; Thu, 4 Feb 2021 19:50:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDX/Oa/fRNWCX1346z9uGNml0l4J+1QgInEjntgMCZ1kaUR4qHf1kN4KlVXH+/CQrQy/yl X-Received: by 2002:a17:906:3883:: with SMTP id q3mr2143689ejd.160.1612497037941; Thu, 04 Feb 2021 19:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612497037; cv=none; d=google.com; s=arc-20160816; b=J27qQwn6hS4dFz9hChVxwka07sjMJ5HUlDH2ZV6jp4Ok6Z8nrIArnx6ZuVgLYImFxy uN8iqdlUfEem84UVs2UZZIiW/IGbYqd/AcN7LBC3G2PYYLN/ZmlVSz9FOnDf5t7lsQXe JdecbM16fVPaARQuYfEzkJ+IARkJl2n+7/VSUkbP1WJVenC8PDf5AEJA0zrgdbAJldVn EwLO5O8+kLCEju8sKPhqWssr7JtGx8Tvbnp3NydXLUw5xVZSW+XXzwZOyb47asK2npJI kJFPMNsDGFWOYAkTEoRTpfjgdWh+jYQJUHtrjHIVG4IMMwwewF9Q5MAF619hGDEW3Hk7 C/Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=HYFWkDEOfBhWSHmK2jmVVB6bfwty0OAqrNhMAUCf5OE=; b=Qq060LNMUpFvRjsAebcarBfT2BDVOWHg9RwYe2dazLEuxtsm4B4uwQKamv64w/xzZt 2LFUieLZ+p0MM+ZmDd4I0hRatI/mBBVnOBZcWx0OGovyvGmhE9J/caFe1Ad1yQueOF+S rBhysDlIiwZbYGWzr62/N//jtMC0Zu+UmOKIWJ3P+c7TQy2JLO2sGTgtJA6tTw1Gi6bw 89det6ibTIzCbhmdxGRruzqzHs+e4aCQiyqIhg4tro+xduTqEpdeMj4C/WgfV3bs9B6C F02y3xt1p+i5/QeuALxg2woSTR6L+KujGI/7w6EoXrFUew0JEYlLXYmvc+snsVtu3dzq +hzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N44ptCLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si4332238ejd.408.2021.02.04.19.50.13; Thu, 04 Feb 2021 19:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=N44ptCLu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229979AbhBEDqf (ORCPT + 99 others); Thu, 4 Feb 2021 22:46:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbhBEDqc (ORCPT ); Thu, 4 Feb 2021 22:46:32 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D94FCC0613D6 for ; Thu, 4 Feb 2021 19:45:51 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id e11so4119777qtg.6 for ; Thu, 04 Feb 2021 19:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HYFWkDEOfBhWSHmK2jmVVB6bfwty0OAqrNhMAUCf5OE=; b=N44ptCLuB429yIat1IbEbc1ky15SrHFs/3Mhp4wp4JHqLlvcCvdVaYmZunuNN84Eh6 UQdN9EHB5MBpolyUvpI2LSqV+VSTOJsNWVjWya9WsQnTT98j3fEA3vMNt1COIJ1qSKpv kxd+jdC9xyI6ZZe6ab36xX7419iSvjWe3F+HpVW2CWq+fjBFUis047eag9q950Svm3dH jOr30+Z6pDX05t847GJlZGmbFUw8mby9DMQ4AuUZphqSJ9Rz5QM2tBiBX+QhNipSnZLS dcGeDo+5lBsWl5PWygIqQS8KyPK/L0w8uMSxc7bP54rM+3JFx0LQLTerr4DycTKcGsrx g2ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HYFWkDEOfBhWSHmK2jmVVB6bfwty0OAqrNhMAUCf5OE=; b=bNOBv7JRcKrswqX8D0a7Z/6c6FiPA+3nhOztCHr8t/i/wfhV39KH3C5X3nTJDfjNpF ueUh5yVhcFjdf8PaIUkJo2sU2ZcYaWrCrTXlK47CcEFitzkZm0MJaoaFqUHawS6Q/FVx F4GKPSzBfHWwhlI6wqMi6tuWPRZ59NQSpBedN04xNY186e9HWWcKa5S/+3AmcH63Jx9K MI9Bf+EbdlFr9705tunRirZdhaGrCihochD/jlO3fUIbcYTIRPLp0Vr7YkRESFMjk+j1 45Nr/iKDTyGECecFFxBiudKevx8SZlsyYHr7XkTHhAvwG6Ev65ip8+Ai5HwOg9ZSF2At qXhA== X-Gm-Message-State: AOAM532wDwE1ncLN6u1DkF7Sv0FNeaH2Je6Qg7/ixnWXRuIYUnz5bTto 0rE6YNDcpAjFa37v+Zptd8krrVLEbIPHEvQLoAQASA== X-Received: by 2002:ac8:7143:: with SMTP id h3mr2734026qtp.101.1612496750744; Thu, 04 Feb 2021 19:45:50 -0800 (PST) MIME-Version: 1.0 References: <20210123011704.1901835-1-joel@joelfernandes.org> <20210123011704.1901835-3-joel@joelfernandes.org> In-Reply-To: From: Josh Don Date: Thu, 4 Feb 2021 19:45:39 -0800 Message-ID: Subject: Re: [PATCH v10 2/5] sched: CGroup tagging interface for core scheduling To: Peter Zijlstra Cc: "Joel Fernandes (Google)" , Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , Thomas Gleixner , linux-kernel , mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, Kees Cook , Greg Kerr , Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, Paul Turner , Steven Rostedt , Patrick Bellasi , benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , Jesse Barnes , "Hyser,Chris" , Ben Segall , Hao Luo , Tom Lendacky Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 5:54 AM Peter Zijlstra wrote: > > On Fri, Jan 22, 2021 at 08:17:01PM -0500, Joel Fernandes (Google) wrote: > > From: Peter Zijlstra > > I'm thinking this is too much credit, I didn't write much of this. > > > Marks all tasks in a cgroup as matching for core-scheduling. > > > > A task will need to be moved into the core scheduler queue when the cgroup > > it belongs to is tagged to run with core scheduling. Similarly the task > > will need to be moved out of the core scheduler queue when the cgroup > > is untagged. > > > > Also after we forked a task, its core scheduler queue's presence will > > need to be updated according to its new cgroup's status. > > > > Use stop machine mechanism to update all tasks in a cgroup to prevent a > > new task from sneaking into the cgroup, and missed out from the update > > while we iterates through all the tasks in the cgroup. A more complicated > > scheme could probably avoid the stop machine. Such scheme will also > > need to resovle inconsistency between a task's cgroup core scheduling > > tag and residency in core scheduler queue. > > > > We are opting for the simple stop machine mechanism for now that avoids > > such complications. > > > > Core scheduler has extra overhead. Enable it only for core with > > more than one SMT hardware threads. > > Very little actual words on the desired and implemented semantics of the > interface, while the patch contains much non-obvious complication. Ack to both, will fix in the next posting.