Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1082108pxj; Sat, 29 May 2021 02:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZp6nWC1/duUVrwvvPxujWuaiD563/SisO6MIGjadYr31u6W5W4CsxJq3JpF5i3uw1ni0j X-Received: by 2002:a6b:ec03:: with SMTP id c3mr10230597ioh.103.1622280969180; Sat, 29 May 2021 02:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622280969; cv=none; d=google.com; s=arc-20160816; b=IKbd7QANuIkhB1Kk6bOacrSSqr0SfmPC/I7KSLRcesF6rt+jnjbN1i9AomvTtKp8tk llPjDqaWA6WzVfc3ae6Z5NfLLYo5EU6pnuus6wKtcTz9V95BbPmdkzWo8Yl3/efHZ34w Rxh5u6fMRDAvnoxZ1pvR/9RPUlJs8gygkktnZ0TuuH2TT8yBL1IJrQHhARSt1/DmW+3/ Oq4y+r9snz+SpUDYLA+2qekBmRjWUy2cDxz/cqW88Y6otUhMRDNiZij4Z2q4ssWpGyZi WBLQNSvVwt6471jdHhXGUwwAbrbI4kTkR1xeMrctpR4mtFs7tr56WbHM/28d/kfNXqW0 UnVw== 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=t2zk5Z9qlmuHt7s59WmntMYgLXKVD6H7rp//7T7Ci/8=; b=dTarnveczSzeRt9MeqowFXYSsjU0jHQeFNW/3PTuXN83Uhwz+9aUNtVFlRvpC2WpMN 3LeXjTnEM5nLoCk08iD+7s/KZMHi0u4GcX34RQlqhqFU7Dq5VOMh5rawvIfbcx9YtFVl txMfYhnLHDbV3qV8t/L+3s/xQ1EmrjinMX3G7g0eGvs6Mf92J357HrnRMwWpf2wdoZix d60IojRH039Gr0h+kcJ/jeYYbQ37maR3fOxW+aqGN8+LYnDcDyjS+bbdCaTJtGikEmTe 8Aitthk6s/lB4nUL/+V1AVUm9xXOjd3XfHeGSTPUx3YA1M1kC0RnxPP0s3HmZPxVcKuw at0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@uged.al header.s=google header.b=hDCCEJVA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si10528172ilu.149.2021.05.29.02.35.53; Sat, 29 May 2021 02:36:09 -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=@uged.al header.s=google header.b=hDCCEJVA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbhE2Jfu (ORCPT + 99 others); Sat, 29 May 2021 05:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbhE2Jft (ORCPT ); Sat, 29 May 2021 05:35:49 -0400 Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9343C06174A for ; Sat, 29 May 2021 02:34:13 -0700 (PDT) Received: by mail-qk1-x730.google.com with SMTP id 124so6543443qkh.10 for ; Sat, 29 May 2021 02:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uged.al; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t2zk5Z9qlmuHt7s59WmntMYgLXKVD6H7rp//7T7Ci/8=; b=hDCCEJVAZKetxCHmjId0bnmlfkx3k16wWn12wNDc5P5idPT0ngrHc3rLGObhkyriBA mvWG+3CPFlSemwRz6/fXgFfplhLrrwCh98FXV9wmSTImqhMKUrgx0gMSuP/84D0d+8F1 7mFB4u54hKeRmrfeBxbOlnCpASZOQXTn6idAD5hD5+lB3QNbcG/BxCWObvGJvZ8GRaob qMPvxz97lervJeKwHD2gCa4qLV9+4lkpECE3tnM832PMwWx4zZURXY5u3hfI4DhsDqyR 3h4CZOWLvtZjihPvbgqkqq5T+aN0xCp4TYoid+7HEBLzgoQ/+zTp9LvGewApdQg5gMFH H9Lw== 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=t2zk5Z9qlmuHt7s59WmntMYgLXKVD6H7rp//7T7Ci/8=; b=ftxrav+XyMZifwqspk2LO/0x/V6QCXKoWSgPSc8Gw+Jk5fRLJjzjqPbzQVsR9KBBTz nsZWEwaLsaSrP8v+b0XaYaSSQOyN5/E87+J4Hv+BCKZ3W39yJjNKwkqM+818Bzh4txKI GPzgQk5lWX8CRDy4xXpOifK8wCfAb9k519euKlctQQ+zcP1I3oWWrm1d40ookSq7koRF nNKn9TMp3xEtRSZwjmDUvUpQuXN3hFteE/t2HahnqHFfCUKip9Vhp36ZCzgq59bgaEP/ ERv+bOKpE2ZlXP+ErEeJUuiRXORw1hZtov/S6Lal98C+uyUwK6ww3WTMuBChMJm9j3YI Btvw== X-Gm-Message-State: AOAM533/ayJEHrfEynoPVmgc6lIE2ngahS+3o3KEF6cfFj7GCkWeyBVN crmaiKWLSsrH+m8X9H20Ah+KcQ5DXSdnZdfKwYcttg== X-Received: by 2002:ae9:e706:: with SMTP id m6mr7950209qka.74.1622280852071; Sat, 29 May 2021 02:34:12 -0700 (PDT) MIME-Version: 1.0 References: <20210518125202.78658-1-odin@uged.al> <20210518125202.78658-3-odin@uged.al> In-Reply-To: From: Odin Ugedal Date: Sat, 29 May 2021 11:33:32 +0200 Message-ID: Subject: Re: [PATCH 2/3] sched/fair: Correctly insert cfs_rq's to list on unthrottle To: Vincent Guittot Cc: Odin Ugedal , Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , "open list:CONTROL GROUP (CGROUP)" , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > normally tg_load_avg_contrib should be null when cfs_rq_is_decayed() Yeah, I think that is an ok assumption of how it _should_ work (given the other patches in flight are merged). > The reason of this list is to ensure that the load of all cfs_rq are > periodically updated as it is then used to share the runtime between > groups so we should keep to use the rule whenever possible. Yeah, right. > we probably need to keep (cfs_rq->nr_running >= 1) as we can have case > where tg_load_avg_contrib is null but a task is enqueued Yeah, there is probably a chance of enqueuing a task without any load, and then a parent gets throttled. So (cfs_rq->tg_load_avg_contrib || cfs_rq->nr_running) is probably the way to go if we want to avoid a new field. Will resend a patch with that instead. In case the new field is the main issue with the original solution, we could also change the on_list int to have three modes like; NO, YES, THROTTLED/PAUSED, but that would require a bigger rewrite of the other logic, so probably outside the scope of this patch. Thanks Odin