Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4883241pxj; Wed, 12 May 2021 15:36:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyahYSbniu/Th5YPHWT+h2LF1LAH4naFvYfR3r3DPsFJ20MmJngOt3gXWi02O9yf0YJ6IGB X-Received: by 2002:a17:906:b0cb:: with SMTP id bk11mr40836112ejb.310.1620859013658; Wed, 12 May 2021 15:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620859013; cv=none; d=google.com; s=arc-20160816; b=cANHumljpQUEIMpL83WFAn04giqFbBB6e7uH99tYOUYUEOgz7lU7kW07a7+YFPHhFr 1mJGZ5M+j/sYlumMJ2/V/UGjDzctYvGIk3qMwlj0Sf9j0wkgxqYDGDseoQAQ/xvwyNfN lPY1FgIN8qz0Dev2ytSchygJ4+Ik9Tv2FXH3VIpPIPByCRtNg+Cyls79AS9HwAFNqnVw n0u0MKpbAfi5GyVtBbk9Pm1+ivj+8xdOeS2YzmNPlxY80JS1JcxbwTULNyDQCnJ5FD68 Kye9EOAwyoAHps60AhdsTM4b3JrwtCXlXpc1LKIHEdCUw4MjUbEVm1BjmrTQc8Y3vkmA umuw== 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=shL/E+KJ1M2BQNtlFBza8kT4lpBTPBroje+SVgryMFI=; b=qcduJQsd7XTo3ZFmU+khCpcM+td+oCmlF0ECKXqVkjVJUgFFvxoICtJ4Huq4ZQEf2s XngeFuGQ3PbRoxhILK0reFknRKgoM5ASTPtNAizHmZJDHiU/lhqu0QaUkHSjMOFJfHUv KAZwdjB6qi31+CLoolz6FswguH5/XXDkvjhDwwClbYuMQMEpDeERrXdYXhi8Hb2F8tiG 4fI+aaBAaOG2fPLARguBvYLbv0/SZPVeAoF7OWr1n0Nk5RTCaY/bMwpes1ydXy8put8j Xv7BaeOmr7sqqDiUncwUGMnXeaj6IBw2Z1dqqgRb1V0Gfk0hikuxWPHnAVtKQtyvU05B akrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digitalocean.com header.s=google header.b=cw6PPkPx; 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=digitalocean.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp24si863055ejb.718.2021.05.12.15.36.09; Wed, 12 May 2021 15:36:53 -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=@digitalocean.com header.s=google header.b=cw6PPkPx; 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=digitalocean.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442815AbhELWNv (ORCPT + 99 others); Wed, 12 May 2021 18:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237431AbhELVJw (ORCPT ); Wed, 12 May 2021 17:09:52 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F0A6C061349 for ; Wed, 12 May 2021 14:07:44 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id v6so31350649ljj.5 for ; Wed, 12 May 2021 14:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalocean.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=shL/E+KJ1M2BQNtlFBza8kT4lpBTPBroje+SVgryMFI=; b=cw6PPkPxEB2GxrjH3whmIm/kZm1KSdeW20fLdGWuhiPJy4IDAMpBwFWSYvkex+vdLG D5FLjc6BqWPV13qRBrGNkK3Dv6f7S4SqhR+gs2YTW8rdtwB49DIa9UAIRUB6uRtn+mLj YP8hH/nsl9Oa/1b5It9LQGVTqSTrQjaSplChI= 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=shL/E+KJ1M2BQNtlFBza8kT4lpBTPBroje+SVgryMFI=; b=Sd0Z8CUwcWMBPQdH3MJB/erERGNtFYNLBuojpmkZ43+myan3K0S2SyySebY4qmgEcK K7cpknxtq4Muq7DrlW9cBySZaIWkX8OgOKONLNQAkbWnmN5UHrv32b2hbScoTkA9/x2G JpFL+5MlQzyDyWGTl57ev/qP6sPLxRgF6KZ4piRwvXfKjuIpbnYu0Xk8bv3a9epIdZyc 3iOiQ+2yXnDP2sAyyALiCVnDoxPMg2QWYph9NsEKLlW9ctCC4R+e4Y/pn81VXWgp2Eeh nSbDWfxWcCMlEC/XzqpKDHuRXPopqwDA+QfMDO+4zL3XSn7alG4etJNhlr1FV39y0Ykn O+nQ== X-Gm-Message-State: AOAM533NlvyMyLZCTGbvb/8cWh4mhHJbwO76T0tXwHpBGHfCGFvZCRfr m5iPr4VrTmA9wzfHfzV33dmUj+PxLVC0BUkcHqOBXQ== X-Received: by 2002:a2e:2243:: with SMTP id i64mr4713143lji.94.1620853662542; Wed, 12 May 2021 14:07:42 -0700 (PDT) MIME-Version: 1.0 References: <20210422120459.447350175@infradead.org> <20210422123308.980003687@infradead.org> <3dbce4ff-44ed-73ca-2ea1-97b126dd664e@oracle.com> <2b4ae2b4-62e5-96be-ddae-b261139842c1@oracle.com> In-Reply-To: From: Don Hiatt Date: Wed, 12 May 2021 14:07:31 -0700 Message-ID: Subject: Re: [PATCH 17/19] sched: Inherit task cookie on fork() To: Josh Don Cc: Peter Zijlstra , Chris Hyser , Joel Fernandes , Ingo Molnar , Vincent Guittot , Valentin Schneider , Mel Gorman , LKML , Thomas Glexiner Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 12, 2021 at 1:58 PM Josh Don wrote: > > On Wed, May 12, 2021 at 2:05 AM Peter Zijlstra wrote: > > Right, I need a Champion that actually cares about cgroups and has > > use-cases to go argue with TJ on this. I've proposed code that I think > > has sane semantics, but I'm not in a position to argue for it, given I > > think a world without cgroups is a better world :-))) > > Not sure if Tejun has any thoughts on > http://lkml.kernel.org/r/CABk29NtahuW6UERvRdK5v8My_MfPsoESDKXUjGdvaQcHOJEMvg@mail.gmail.com. > > We're looking at using the prctl interface with one of our main > internal users of core scheduling. As an example, suppose we have a > management process that wants to make tasks A and B share a cookie: > - Spawn a new thread m, which then does the following, and exits. > - PR_SCHED_CORE_CREATE for just its own PID > - PR_SCHED_CORE_SHARE_TO A > - PR_SCHED_CORE_SHARE_TO B > > That seems to work ok; I'll follow up if there are any pain points > that aren't easily addressed with the prctl interface. This is exactly what I'm doing to tag all the processes for qemu. I have as shell script that creates a cookie for $BASHPID and then SHARE_TO all the process and it works just great. :) don