Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2552538pxj; Mon, 31 May 2021 05:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2mcvP+JNEM4JnNISe3EHL0JnKGdXGkDuFqHAdqIWVTYX9y04XvvSjDWW3V/lHmGemQSuY X-Received: by 2002:a05:6e02:1050:: with SMTP id p16mr6655407ilj.74.1622463378533; Mon, 31 May 2021 05:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622463378; cv=none; d=google.com; s=arc-20160816; b=E9aWSQ6LNu9aLCYSD7ir+oIfUCVh6yKk1H5img3YhP96FgL4Vqj0BEFj4kcZLG8Gy5 ObaygyWXEFfNVmvn51ytiFtrWVxagglN5FyBHvmnznhgbqq/S6i1YdCnjIX+JaCzuv1k co3V2xLZLj29fLVMa5ObBlyOMC4nb99DPWlxqNzNmUFkeZhflYPOeA/TukiAYhVj2nXe YvKiftRpqj40uuXRH+g/iWTV8+31FlfJZ2LvKMdF3Awav0xbW4zsZF0j/95a9LpNqYHx TkocnscjmZzaQ4I2samdJDdZD1l6oNH3AaAbxjBFOCOvmJbWiJnfY6Oi5+iH1nQiSUvA i+MQ== 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=/KWdRrmmQUUdShTYgF7N8YHkQMQeJcSbu2C2nHtMqGU=; b=nawUvSytZU83MwWl6EJaqYoBGIrVlv+yKUxbHoRoRw9l5cMS+z9fKMWMICcKWyTizm nd67BsV/pZLIizrfW4gilxhzHYBaA9WzUfKzRc/gz6xf+O92qW8MgutkDDF+7gIYH0L0 Pu4T6ET7bIlpeEyE4K0wtd5p/1rOnVo49J47NdrzJvG3IMRwZPAYrDLjXHYRAynB01u7 SYZYYTGjCaQAsJNWnOBMotPOgylwKiPyiumyU6Hxvu4+i46vhwJk69BRSy7QGKnesYUM atT+IkW2edr3IDVkxQb8EGqQ3j5qPDCayAgIA3irER4K3Lxqet+jXenJOvwYQi7A/2rS XTFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rPbHFz8K; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si14723495iol.40.2021.05.31.05.16.05; Mon, 31 May 2021 05:16:18 -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=@linaro.org header.s=google header.b=rPbHFz8K; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231535AbhEaMQB (ORCPT + 99 others); Mon, 31 May 2021 08:16:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231545AbhEaMP4 (ORCPT ); Mon, 31 May 2021 08:15:56 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CDFBC061761 for ; Mon, 31 May 2021 05:14:15 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id f12so14749941ljp.2 for ; Mon, 31 May 2021 05:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/KWdRrmmQUUdShTYgF7N8YHkQMQeJcSbu2C2nHtMqGU=; b=rPbHFz8KHO8hT6NGvD8FDUegbYXzFW7CwBdAcvbOsVMGsFbruuLsU0t+/dIxYqnDg3 AwU6BmbMSgVEjo10g4ffph+/MI0BxsmOoDQA0pnk5h+h9/NLd+KzdZnWBOdH3Q63JzN3 qOjA/8KXwvqW03o+DutluDDTXhdFJrXEIY/KaLqieleaWDzq2lvmXjiriY6ta+yWbfkC IcfLKu4CUceHw5eiDkF4TEmXrpvgR1VPTkvVyVBOqbrPWuDOzUe32ws9zx+pBma5/mCn ygaMt6kRU1AOssL0eA1GxFLLmKh5mEzkxnpj6ZnaWMvBQm+NAWaBMH3lm3urLi+PRuvu 6pJw== 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=/KWdRrmmQUUdShTYgF7N8YHkQMQeJcSbu2C2nHtMqGU=; b=P/npxdfZEwesahpXLwgXzOxzgZj/AyrQhy0lZG4pVnmWHnJL7qzx6M3pibn0iDsGCg zruiYDLHHNKkF3itRCvJQpA963NPWvKuYv+rKq8xwqBeTFXUbERNbEstkHW8h0+/dvBA sqY+AOOr518d6NFoEBAXiRqxwfK38pv81Jcf/s61Sgi530zsV/DJHoLID8VIKvVIP9lc RQfzfUspzdeaImsyGGMmGw+BALuN5axjnz7d3i54tSWRgM1Fa8GAkr2l8+BlzAfvOum1 2yduGrEoREkP6kcsd9p0hbhaMGEVU292P7T+d4AT9QQTaNWr/jyr63EfxqvJs8P4TuIP lqZA== X-Gm-Message-State: AOAM533zsbnIRN5S1i+dk2IPPQhhSEe+JkyxuqCngSnYMe1N1earsvqf CWwe7/ZdE9S0jo4ekvT+0hz0ZD+Y9ZKhdAINmTA3IQ== X-Received: by 2002:a2e:a7c8:: with SMTP id x8mr16237409ljp.209.1622463253572; Mon, 31 May 2021 05:14:13 -0700 (PDT) MIME-Version: 1.0 References: <20210518125202.78658-1-odin@uged.al> <20210518125202.78658-3-odin@uged.al> In-Reply-To: From: Vincent Guittot Date: Mon, 31 May 2021 14:14:02 +0200 Message-ID: Subject: Re: [PATCH 2/3] sched/fair: Correctly insert cfs_rq's to list on unthrottle To: Odin Ugedal Cc: 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 On Sat, 29 May 2021 at 11:34, Odin Ugedal wrote: > > 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. Thanks > > 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