From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF666C77B72 for ; Thu, 20 Apr 2023 14:16:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbjDTOQt (ORCPT ); Thu, 20 Apr 2023 10:16:49 -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-Google-Smtp-Source: AKy350bexWh9GsofWlY2L7rzUG6HZt1GpBCHEqybhfhvg9zt9iYQCWxHqXR1i3tXmNAfY1fMzB+3ow== 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: 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