Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1879852pxv; Sat, 26 Jun 2021 03:10:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwwqp93ds3r9XIai13EIYSoBVOtTuhWZLcAYmGU03d802aOqh1XsTCwBkBuBLqnDorXH1U X-Received: by 2002:a6b:b554:: with SMTP id e81mr12477767iof.163.1624702203975; Sat, 26 Jun 2021 03:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624702203; cv=none; d=google.com; s=arc-20160816; b=X/oj0/qXzYfgqUbrTEu4FzticxMUkwHLR0AFl1+V4Qbv25vvKy62o7JXp3wvLKfBqm lYsCESixrGYr5VC6PX4AUo/Y+Lq9OoRgprdqKJa9tq3iZs0ZNs8WM6M9ouXyk4gUYnid kSR7YYYQrfv786Ia5KAjAbaa6IpZvmibTuioSeRZbL5w7of8rvrHYKOGZtoTxj8YTeAv alXr1y0OLUp/OipK6uBC3L06UdVB+GojuaUOMD9xNg6/b48wAVTL2I1sxa14MJOu5IFF Ol4k+9uC+e4SKamOtpzXTgmcLJw2c5FGB5edV15mTjV5CcjC0BzTgr9ZZXWmFvu4Yw3c SB9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=T/ThALSA9i8+T+ytNEIFmWP/SPlrjAyvMt5ymtEVgqU=; b=pwIkxxT+9z7QIu/UrDVjvJu3OnS3oWjUumLrFbX16thcwKm7ThO4Nrw7SjgXaZvVO3 R7s260K4L4bn81UZ4bVmB/A90Ezp/0RtpqJ/DbNb0cgEWR5doN+QkOJDYuQoty8rTwMP oSKjS7rADZLgqEzV5eeKapaFWE8PxZkMtj72qZ9DyAnc4w5sZTzdDa704W2FnUBZfoJG gslee2llEvPPiFpS4XC/rIVAjSfpYhc+gV/iYAQm7PW6VBnrH4ioruJx5lpPS2gWmx49 2biW7yFS8FtFSXynMwjb8L0N/CoM+ia24z8jPRN2nHhXAVI6Az0PJpsBEOPJOl3rv8A7 UyEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Utx1eG8n; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si9276579jaj.104.2021.06.26.03.09.34; Sat, 26 Jun 2021 03:10:03 -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=@gmail.com header.s=20161025 header.b=Utx1eG8n; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229629AbhFZKJC (ORCPT + 99 others); Sat, 26 Jun 2021 06:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbhFZKJB (ORCPT ); Sat, 26 Jun 2021 06:09:01 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E830DC061574 for ; Sat, 26 Jun 2021 03:06:38 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id x6so6576703qvx.4 for ; Sat, 26 Jun 2021 03:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=T/ThALSA9i8+T+ytNEIFmWP/SPlrjAyvMt5ymtEVgqU=; b=Utx1eG8n8Pf3jZY3zG+KrSFa1D+vEdINO4S2mjEb19dBUfKH6mBgHCiCLQmgDYuDu8 lzAV6EkZm6SIjPr5xK5rmw/JMKozsrtmTJYVmuGCo6u67Vxg6KtLI7lumqkDOy/ADlik hTIlm7h3QzM5UagOEdAJ0VaQU/wi5YmxderHJjwHioMiSZlE6Q6tgF49/LysAV54IfSF T6G09k4COwAILXN8e+mCl/eGUrdwV6RB+wojDdX3QWwRN7pYHgT+JV6AJ38uc7e0mmnl GtgIUvRDIoFJurmM0XmiXrGvLCHf5ZN/ZRpZAFn6L6OrhbfWdKP3Cm35UsPi3kSI/neT xB9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=T/ThALSA9i8+T+ytNEIFmWP/SPlrjAyvMt5ymtEVgqU=; b=fMHvt62Yb8Y23q4Kjcd7NGENk+qf+D063JqaBGTm2zwM8ZeVV2fokeaZGP0ohUrBzN ikO5SlumZmGnBbi5oIdF9ewIVNnE3YLy5phXjfTXwk3IYKuKoDZocw1+9cw2VwXehVuv Cz1LCawq20xr/ojT/dwr1g4F3fReTRrZvmUwEEwjJnjaCg7ab1Iub46pTdMKpahW30i2 CfqCUpjIRQcyl/gtgJ+0Svb1pNvqaYQsG34HO8DND4UIiRCv9PYVXOmKcVmAYWx+hRze O69AqIFkbH2DrVktFsn1oqPMJJlcrmZYFbjA9G70sURURXaOARQdVsF5KMLlz83O/4QQ 3edA== X-Gm-Message-State: AOAM531Ggizx31j9xTkwfW/PiAnYQDDySeB0Hu86L7UYVwtV5WYhgzdd aWOG7L4d+yRfrULTkIR6B7Q= X-Received: by 2002:a05:6214:207:: with SMTP id i7mr15835046qvt.10.1624701997815; Sat, 26 Jun 2021 03:06:37 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:cde6]) by smtp.gmail.com with ESMTPSA id a14sm5321656qtj.40.2021.06.26.03.06.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Jun 2021 03:06:37 -0700 (PDT) Sender: Tejun Heo Date: Sat, 26 Jun 2021 06:06:32 -0400 From: Tejun Heo To: Peter Zijlstra Cc: Josh Don , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Paul Turner , David Rientjes , Oleg Rombakh , Viresh Kumar , Steve Sistare , linux-kernel@vger.kernel.org, Rik van Riel Subject: Re: [PATCH] sched: cgroup SCHED_IDLE support Message-ID: References: <20210608231132.32012-1-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Peter. On Fri, Jun 25, 2021 at 10:08:36AM +0200, Peter Zijlstra wrote: > It's a direct concequence of the hierarchical requirement. The approach > is the only valid one. The other relative controllers that don't do > this, are simply broken. > > Absolute controllers have it easier, they can be trivially flattened. That's too strong a claim. e.g. iocost controller, while in a different domain, is a weight controller which takes different trade-offs to achieve hierarchical weight based distribution at negligible nesting overhead. There usually are more than one way to skin a cat. > > There are several practical challenges with the current implementation > > caused by the full nesting - e.g. nesting levels are expensive for context > > switch heavy applicaitons often going over >1% per level, > > Yeah, and there's numerical problems you run into as well due to > limitied precision. Another issue is per-queue level heuristics like boosting after idle nesting not in quite optimal ways. > Just don't do deep hierarchies. > > AFAICT it's a simple matter of conflicting requirements, on the one hand > the hierarchical thing is required, on the other hand people seem to > think all this crap is 'free' and create super deep hierarchies and then > complain shit don't work right. The problem is that the overhead is significant enough even at pretty shallow levels. Even at just two/three levels, the cost is already significant enough for some large-scale applications. Thanks. -- tejun