Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5035796rwr; Mon, 8 May 2023 17:10:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4px01X1YM0dD1bTYdS3lPX26YRyZQvVgaoCfCUedRZELVpcRgAANPb9b7+O/E3P7/agSlG X-Received: by 2002:a17:90b:2354:b0:24e:df1:df8 with SMTP id ms20-20020a17090b235400b0024e0df10df8mr11617266pjb.49.1683591050133; Mon, 08 May 2023 17:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683591050; cv=none; d=google.com; s=arc-20160816; b=tXSihed2jLYgdZMhOol/oZxc2FCAVM4grrrnG8wo5MWcInIm8mE5VpyRiRQu3ufx8Y krBmtqbGKNz2I1wAQTpUVHV6dgyBgkNSiG2SqR/NNJrdSYTQ3MEkKR70GcFkJ43eUmHI vCJhskiXxqGyRiLdx61qQ+FAUxfCP+PsZh7EdzV4AycPhFWFwedOL+JBrVhKog5bvb8/ HNRs/ygyBNytL81kPgccp623Bj3MIv3XYmWugaG2eB1MpGOZi/Cglix32wahGa4Hc/l/ U47MgM69uCnNfUJfns9h1arUeEQ13b7h7ajnux84YCml6iMpXB/1JWV0HUQ3fpTs+oP1 mYWg== 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=xWUewLtyjjleyCE27N0mgy++XbZ3xZJBSp9FQArDlQU=; b=EAik9iSUtwK0bPIzleXm2RUbC1zi9lGAWuH32b3QifIhq6767T0T4v5wk3CGt1TTsU kZul+tAmQTG9ewTQDLkmLohVJcBELq8ZRcjmDlHl5JwIs+/m/yK9P2GGHsUR88/P400l LL5nFRat18L32ZO+JeGJ+4/fy3oN70jMw2MQhA1jiNONo3C6qh6M6k0DI8VTT6Yui3lo GsSPKUotyOKZHOrULxbgxXewSqq9bEZyLII6gBKw15MmIoao6OippEHXtqYZjSh9kTmn AIipV8Z7ln0FbtEvkGdc3zoZnXwFaauQNTk/+QI53MB3J137lJuJQCxVvUKUDDHNMV4k mI4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=cMgyvKzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob10-20020a17090b390a00b0024b011026aesi6128588pjb.76.2023.05.08.17.10.36; Mon, 08 May 2023 17:10:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=cMgyvKzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233449AbjEHXYW (ORCPT + 99 others); Mon, 8 May 2023 19:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbjEHXYU (ORCPT ); Mon, 8 May 2023 19:24:20 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7B44C0F; Mon, 8 May 2023 16:24:19 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1ab13da70a3so50719635ad.1; Mon, 08 May 2023 16:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683588259; x=1686180259; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=xWUewLtyjjleyCE27N0mgy++XbZ3xZJBSp9FQArDlQU=; b=cMgyvKzfMRZ5F6dobb+hxpXJmFiFNPdymS/AneW1qDN9sWCmT/PL8mluUI+VSw0I7L yLOTKnHDqulRpFgPTlbgJ068wRQv3ph93VqvAylgj0TBV9hjoWcIyVwstwcQo6JoKuBf GfmMQ9iDoviqnYAGxX0P1lj/KwdXQcJk+6KOxAIbdfgXgu9sNn0HBGqbnRIvJ30Wm0fG gDB/Txt23JlWHtP7he4FGgXwIz+m1WwbgFCcKj6sXoBdsA9RU8kz5nsushGnw8lEzrBQ JDOGRmm5Sj7o913tB4WBuCs3EcWn7K50tzAM96peisZmCKkOYcTUdyN0crppKzcxCPco 89bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683588259; x=1686180259; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xWUewLtyjjleyCE27N0mgy++XbZ3xZJBSp9FQArDlQU=; b=Ypf0qFB/mmaBOeSBGzNjh+MyoXDnLKWFMSbCqTnOMAsC/vS2o9cVzLm5gEipvoawHm gpwYfDbumGuR2jfDz5gBoVtpn563vnUbGU/UhFylBn4wr+4ZHxOqKZH2mYdIpgz2/0XA wSRVIuCyVSq8OPPEyWGYsJT46xL+lL4bnn5kIpB5FsQhqrCHbOzGfZRLQ3apZRuFKspw SzoRoemxkCUjVUlL/cn3c6P/tRBkrZyII/a+j7cyYaN2831E69gRMZrwbi3yEqDXQ+GH mZgAUzpvD6K+glFkdwQfgdVBOhBAbyvuR5nBLro7ebdTg1ayy0/3LP805X2Ex7OlzmSF TLRA== X-Gm-Message-State: AC+VfDzslq4mEHimEgzUFVsG3VWK5pywXB2HcIsIcIchG03irSydyHBg 6zcmqv7hzkZxYkJ0dF/An/NJF2TYuyI= X-Received: by 2002:a17:902:ec83:b0:1ac:4d01:dff8 with SMTP id x3-20020a170902ec8300b001ac4d01dff8mr14216942plg.45.1683588258763; Mon, 08 May 2023 16:24:18 -0700 (PDT) Received: from localhost (2603-800c-1a02-1bae-a7fa-157f-969a-4cde.res6.spectrum.com. [2603:800c:1a02:1bae:a7fa:157f:969a:4cde]) by smtp.gmail.com with ESMTPSA id s13-20020a170902988d00b001aaff9be643sm32647plp.89.2023.05.08.16.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 16:24:18 -0700 (PDT) Sender: Tejun Heo Date: Mon, 8 May 2023 13:24:16 -1000 From: Tejun Heo To: Juri Lelli Cc: Peter Zijlstra , Ingo Molnar , Qais Yousef , Waiman Long , Zefan Li , Johannes Weiner , Hao Luo , Dietmar Eggemann , Steven Rostedt , linux-kernel@vger.kernel.org, luca.abeni@santannapisa.it, claudio@evidence.eu.com, tommaso.cucinotta@santannapisa.it, bristot@redhat.com, mathieu.poirier@linaro.org, cgroups@vger.kernel.org, Vincent Guittot , Wei Wang , Rick Yiu , Quentin Perret , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Sudeep Holla Subject: Re: [PATCH v3 0/6] sched/deadline: cpuset: Rework DEADLINE bandwidth restoration Message-ID: References: <20230508075854.17215-1-juri.lelli@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230508075854.17215-1-juri.lelli@redhat.com> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 08, 2023 at 09:58:48AM +0200, Juri Lelli wrote: > Qais reported [1] that iterating over all tasks when rebuilding root > domains for finding out which ones are DEADLINE and need their bandwidth > correctly restored on such root domains can be a costly operation (10+ > ms delays on suspend-resume). He proposed we skip rebuilding root > domains for certain operations, but that approach seemed arch specific > and possibly prone to errors, as paths that ultimately trigger a rebuild > might be quite convoluted (thanks Qais for spending time on this!). > > This is v3 of an alternative approach (v2 at [4]) to fix the problem. > > 01/06 - Rename functions deadline with DEADLINE accounting (cleanup > suggested by Qais) - no functional change > 02/06 - Bring back cpuset_mutex (so that we have write access to cpusets > from scheduler operations - and we also fix some problems > associated to percpu_cpuset_rwsem) > 03/06 - Keep track of the number of DEADLINE tasks belonging to each cpuset > 04/06 - Use this information to only perform the costly iteration if > DEADLINE tasks are actually present in the cpuset for which a > corresponding root domain is being rebuilt > 05/06 - Create DL BW alloc, free & check overflow interface for bulk > bandwidth allocation/removal - no functional change > 06/06 - Fix bandwidth allocation handling for cgroup operation > involving multiple tasks > > With respect to the v2 posting [4] > > 1 - rebase on top of Linus' tree as of today (ac9a78681b92) > 2 - add the 'why' to 5/6 changelog - Peter > 3 - explicitly say that we need to keep cpuset_mutex a mutex for PI on > 2/6 - Peter > > This set is also available from > > https://github.com/jlelli/linux.git deadline/rework-cpusets Applied to cgroup/for-6.5. Thanks. -- tejun