Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp942820pxf; Thu, 8 Apr 2021 17:17:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxdTsAJsX8r7F2cOWn4pMWbfPJn3JPvZ93WW7RkAw6KT+EW0/Ts4Y9SicVopRKjk1hnbxr X-Received: by 2002:a17:907:2151:: with SMTP id rk17mr3372841ejb.203.1617927463222; Thu, 08 Apr 2021 17:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617927463; cv=none; d=google.com; s=arc-20160816; b=GpIoD9GbhpDflRaWConHJUeHp40Jl2AzI6Ef8Yc6LfXwaRAJ0n6ISMpFzqEYNElQOE tosSiV5kCcM+0qv1FAIA8HPVb1CaskF1VJFmRk+VR7b8lY/tfGRIvnK69ufHBd4/26l3 3Bvc0p+QCNRhgTx7CobBFTW1ov+9brcw2Jm+An9sTee1H3WwfarOk+al1Z8zxh3yHohu zNGgWkRVEfJmq78QbsBnrm1qhoMBxfYd7ORtJ+fKMAhge3oLWB3q32yniDc440It5iyf 4FAyprxQ0ymmJpfjJ4Mb9eW7BcpAGCmXQ1+asw1SIHUvtcFOszj+zejlTpM2LnLh3OF1 STJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IOoA2kTvDfBupyHsDf/FJrcWIjGCFOzoozTsFc0jX64=; b=LK/mYnm38+g+PfrKDuUFNPZTv6HiOh8EFa9HL4wQXMz2sKa3ETqUOcQmZQw3VLKhPA Pej75VVqr4owuNG82als0rOCvCnOJ4F5cnS2q+MSmy3fPnlfdQTi3tAkITeb09B7rO1b nUQZS3VzOkd5AXDGCwN5hTLtvXYehQcKeUnUZTE4C69+48Ge4lFWsd0E1qgl1FUvrg6k uFxKMo1CuBsi7HxJdybhHtgA2z64BOBRclDsnlyD3ufXN3c6Pgtc+TfC0Ub59X/qsBvU DV6jdu1QqXenFi6IrBcJrgXkvthFK9/gQFPL66JdMJ210nvoAgUU7oxL4nIKKqLAA14a H+rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EzJOThwE; 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 nc2si750440ejc.653.2021.04.08.17.17.17; Thu, 08 Apr 2021 17:17:43 -0700 (PDT) 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=EzJOThwE; 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 S232984AbhDIAQh (ORCPT + 99 others); Thu, 8 Apr 2021 20:16:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232958AbhDIAQh (ORCPT ); Thu, 8 Apr 2021 20:16:37 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC0BC061760 for ; Thu, 8 Apr 2021 17:16:25 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id j7so2950365qtx.5 for ; Thu, 08 Apr 2021 17:16:25 -0700 (PDT) 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:content-transfer-encoding; bh=IOoA2kTvDfBupyHsDf/FJrcWIjGCFOzoozTsFc0jX64=; b=EzJOThwErCKAdYEvCj69esN/Ho9fIlqOoqGL+HWjZpa6d8Z+qsgO/hgXHInUWXdsOl D4AxvsITQIbiXY5HhvF1u1ZtzSoGPg5tk0McnoRR78lxwF3cr4YXM1eyLX/5KcXhO4ye UZ8jtS4/Tix3mB6exex93/tHbfSaRTEfTvWGCPHn3NqbhS0pFHVD8ZYmxsKHxfDDABDy tynxb9lykL02iSeHUzGYlw8GMNGcnO9NLbAwj4zWVHsEl7vKcD+7L/201e6oTXcDeLKW 8QytXgtwdBrWi0AvMrigcu/DzNbD/6ljVB8+opHmAZ0Abvqk0deh0ielnmReYn4Vw3NS Op1Q== 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:content-transfer-encoding; bh=IOoA2kTvDfBupyHsDf/FJrcWIjGCFOzoozTsFc0jX64=; b=RFT8H2oMUgG194e5FVhwuekv2tC6BRrcTn4KHOG4apLsmnhTYcF2I8k4ZnxSdbqCLe qwLW0aCqQjGNHMM7F1+z/SjCSdWEfCZg9v4dJ+PqtIlUTKfXBgjqU9d9IatDedlpftGa Ehpex0QNpMAvzq7YNtqrRU/6/Uv7BKpi8j6aG9zfhtPOKy3G7UAKAitQaIwtzSZDgHPa Qm2QwZoLeKUID/cGBmgGLJktP3cOI3BawpMIezDwq18auFhwayCe+Scdw14iHF+jIGKz qgtrLoVsHsnuPybHMLpyEIxhddvGqR//EaJ/Fj1jj07SShntbhvLhLg+FtTzIyFLlsms U2JQ== X-Gm-Message-State: AOAM531unSu4+5YEUbRDDR7zBqj9pyFsADan9+kwkhzLq2QzZxHeC0Lq MMwY3H7n97Uir1sBuyLbQ3JJXzwGPw+UF6q3irFf6Q== X-Received: by 2002:ac8:5b86:: with SMTP id a6mr9836409qta.293.1617927384311; Thu, 08 Apr 2021 17:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20210401131012.395311786@infradead.org> In-Reply-To: From: Josh Don Date: Thu, 8 Apr 2021 17:16:13 -0700 Message-ID: Subject: Re: [PATCH 0/9] sched: Core scheduling interfaces To: Peter Zijlstra Cc: =?UTF-8?Q?Michal_Koutn=C3=BD?= , Tejun Heo , Joel Fernandes , "Hyser,Chris" , Ingo Molnar , Vincent Guittot , Valentin Schneider , Mel Gorman , linux-kernel , Thomas Gleixner , Christian Brauner , Zefan Li Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 8, 2021 at 9:47 AM Peter Zijlstra wrote: > > On Thu, Apr 08, 2021 at 03:25:52PM +0200, Michal Koutn=C3=BD wrote: > > > I'm curious whether the cgroup API actually simplifies things that are > > possible with the clone/prctl API or allows anything that wouldn't be > > otherwise possible. > > With the cgroup API it is impossible for a task to escape the cgroup > constraint. It can never share a core with anything not in the subtree. > > This is not possible with just the task interface. > > If this is actually needed I've no clue, IMO all of cgroups is not > needed :-) Clearly other people feel differently about that. The cgroup interface seems very nice from a management perspective; moving arbitrary tasks around in the cgroup hierarchy will handle the necessary cookie adjustments to ensure that nothing shares with an unexpected task. It also makes auditing the core scheduling groups very straightforward; anything in a cookie'd cgroup's tasks file will be guaranteed isolated from the rest of the system, period. Further, if a system management thread wants two arbitrary tasks A and B to share a cookie, this seems more painful with the PRCTL interface. The management thread would need to something like - PR_SCHED_CORE_CREATE - PR_SCHED_CORE_SHARE_TO A - PR_SCHED_CORE_SHARE_TO B - PR_SCHED_CORE_CLEAR