Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp872659rwr; Thu, 20 Apr 2023 07:20:21 -0700 (PDT) X-Google-Smtp-Source: AKy350bbSoFzo/MLRvMnjax6hww8wivKxBgmqCjCa+X+hXdaJKp7mOn9nKEAmnmXxMUdocDVxCQs X-Received: by 2002:a05:6a20:3d1d:b0:f0:b6e3:90d9 with SMTP id y29-20020a056a203d1d00b000f0b6e390d9mr2368012pzi.44.1682000421076; Thu, 20 Apr 2023 07:20:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682000421; cv=none; d=google.com; s=arc-20160816; b=SUXEq+urKEIfhChg1hdGqq8mhNkjZziCvHRmjCqVXPEu2CohCUx8964QHgKLOBq6xG Hs7eYEPNJ61aPxPfBXmO96tZeu8e1O6FQkjGhAnrlObsaCU0kezG2j2LOXHgNJh/nUh8 XfF3MDR+aZZdxsWjyB+0BeX8xnBSfVZ+yd7AZg2cjIlzXuHUjCkkK8h3ZjmUqw0X2ZjI c2VpxzXpdeHQNxietkO3xLj8qQ2tUjQCZERZEx/LrBW+BG5lnDmDXx3tcIHBLfyFnpGq LRdAFELhW1ea1if5y8/Kz90HkFne+v3PXIWNg7fU6b+seRw7f4Mkw3CxCHXYNCIkhMMR O6Nw== 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:dkim-signature; bh=AM2iS5p+M5vdfcO5gATf9U1kgTLr8hfoHFhkOm5c9I4=; b=Oj5sh9QgiaSxSgEGwJez0Cq7FuvHnM5vpvHFTeb92usMfh+7N7nsmzrD+XLJBRVLiY yZFbFnqtIDzF8dZpfvg1T4kZG0gnm47JjmXv1zKTEXQkGnghg01qHbprINhBfi10zbe8 gbySKEfnKMcGqeQ/T6THjNMVumWbd5JLoxVbf4hWSSkT5j7TIaBBtiQsKItFO9MhoY59 5NtTFVS8zJw62Lv1rBlLDtBc5YpwlWOxDOC/wJNWRhRQ21TRLU/TA3aQPRBqTV/ZTqdZ kiaOsEzWnxem1vEyl02RtMBG1M5KbOy4CsHyieLin2nOJJfgltdc1g7MUDFEM80QHV+7 nM2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bTpVacGh; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a63-20020a639042000000b0051f8b655e04si1724776pge.505.2023.04.20.07.19.52; Thu, 20 Apr 2023 07:20:21 -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=@redhat.com header.s=mimecast20190719 header.b=bTpVacGh; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232087AbjDTOQs (ORCPT + 99 others); Thu, 20 Apr 2023 10:16:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232002AbjDTOQX (ORCPT ); Thu, 20 Apr 2023 10:16:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 294033C33 for ; Thu, 20 Apr 2023 07:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682000141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AM2iS5p+M5vdfcO5gATf9U1kgTLr8hfoHFhkOm5c9I4=; b=bTpVacGhvEuoJASEa3RtOMrfr+dkuSRuRNT0MwWJ6WvLwu7qt8UcNbtHV7m21wVp/ENBPE 4RyD46qxBiB3bN0jLnN0J7AO2qGfRTmyHn/gtqy6zJikh902FTvlj9WR6b7Wza9FiodOqe 9yrpZ70e/BJzuSf3qk3WAnVNMPAjl2o= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-ou3wF1RDO7SRRGZg73c14g-1; Thu, 20 Apr 2023 10:15:38 -0400 X-MC-Unique: ou3wF1RDO7SRRGZg73c14g-1 Received: by mail-wr1-f70.google.com with SMTP id d30-20020adfa35e000000b002f53b0a3377so108009wrb.5 for ; Thu, 20 Apr 2023 07:15:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682000137; x=1684592137; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AM2iS5p+M5vdfcO5gATf9U1kgTLr8hfoHFhkOm5c9I4=; b=IVQMBpMRXm04jOG3MqOiFDZuFRRpGj4Qc97luvcCPGaSu/cwzHut8uwPR35UYlU/eT aTfs8G5/wAptkcwwzrYxODhyMf9Hk98w1RI9hRH8P2G65t8oX7LcjvwvSHEpO0bMRLwx a5gw0zNkf+ZB5VtguYcBy1Pznhud2j9dgNzP5kk+ycF+MDsv7Hid+09SxTBhxz6h/2eZ Qt5HPaJlP0OyDssA7en/9qyd2kPbsGFgZBwwbAq2f7woKeCadhQqwPGaWOixMea4SlSq IiAAoxnwFY5tYR7ZZvOxmAdRlGsYoOirNRd7wVkw0jKDRYL0ZAOJlZuObPROVlnjGTYE SFrw== X-Gm-Message-State: AAQBX9f8yPKInst1k9tsv5GXa7i3DkfV4KgpU2qHJU7y7wMD7zHB104A cW8BMFMRMAFMuvqQegw3sCeFADqi6JOPc3XczuA04Flj0pnExPbHFVwBGPxVb+15SQXWypEU3oS gVL+1Gs5Ma8TYOSQC9aJeFdpb X-Received: by 2002:a1c:7718:0:b0:3f0:9564:f4f6 with SMTP id t24-20020a1c7718000000b003f09564f4f6mr1454715wmi.1.1682000137304; Thu, 20 Apr 2023 07:15:37 -0700 (PDT) X-Received: by 2002:a1c:7718:0:b0:3f0:9564:f4f6 with SMTP id t24-20020a1c7718000000b003f09564f4f6mr1454680wmi.1.1682000136897; Thu, 20 Apr 2023 07:15:36 -0700 (PDT) Received: from localhost.localdomain ([176.206.13.250]) by smtp.gmail.com with ESMTPSA id k18-20020a05600c0b5200b003edf2dc7ca3sm2111619wmr.34.2023.04.20.07.15.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Apr 2023 07:15:36 -0700 (PDT) Date: Thu, 20 Apr 2023 16:15:33 +0200 From: Juri Lelli To: Waiman Long Cc: Qais Yousef , Peter Zijlstra , Ingo Molnar , Tejun Heo , 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 0/6] sched/deadline: cpuset: Rework DEADLINE bandwidth restoration Message-ID: References: <20230329125558.255239-1-juri.lelli@redhat.com> <20230418141127.zbvsf7lwk27zvipt@airbuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 18/04/23 10:31, Waiman Long wrote: > On 4/18/23 10:11, Qais Yousef wrote: > > On 03/29/23 14:55, 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!). > > > > > > 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 - Create DL BW alloc, free & check overflow interface for bulk > > > bandwidth allocation/removal - no functional change > > > 05/06 - Fix bandwidth allocation handling for cgroup operation > > > involving multiple tasks > > > 06/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 > > > > > > With respect to the RFC posting [2] > > > > > > 1 - rename DEADLINE bandwidth accounting functions - Qais > > > 2 - call inc/dec_dl_tasks_cs from switched_{to,from}_dl - Qais > > > 3 - fix DEADLINE bandwidth allocation with multiple tasks - Waiman, > > > contributed by Dietmar > > > > > > This set is also available from > > > > > > https://github.com/jlelli/linux.git deadline/rework-cpusets > > Is this just waiting to be picked up or still there's something to be addressed > > still? > > There are some changes to cpuset code recently and so I believe that this > patch series may need to be refreshed to reconcile the changes. Yeah, will soon take a look. Thanks! Juri