Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp266979pxj; Thu, 3 Jun 2021 06:16:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9QvwWDaVDmSLH7INBQdxK3bfIL+jKWmQdrLrHcVjIhJSxenM8qBffnO6nAtfKiuyMYfyS X-Received: by 2002:a17:906:15c2:: with SMTP id l2mr38563116ejd.348.1622726184400; Thu, 03 Jun 2021 06:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622726184; cv=none; d=google.com; s=arc-20160816; b=pTQZ/jj3G9PfDpoAMPvORPAc2phzp9brTg08taVmJm4itqybuOfHoMHjfzlyNGjPfi TJyZBBOkcm8EEYALZtbwBxOgbfrJ54Moc9Vs0lnxsO7WvMSa0gUTliWR52pfHypvt0Cy 1p6P5q8kjIsfH/hAErUvQDVGiMIFa58BweN+ewvimAG5IYDyRyS6jPdfTHmMc+sKJSM6 dgiNVIqrHHrSRM0MKnUaOgB5d34AwdtpGMTTBzRa2Aq12YGNfH7sKTJMlRc1D5trmsoU A9IbqQ00EhVmELNV4OQODIQph11Y79k5be7seQGHciNXgZ2pB9QGzLsAORmSGSJKMvwW APRw== 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=CBnvtPJLdU3kbekuheh4qc6OMIUkdKF2nOgchdFq6rc=; b=rx4ndivq+E4t7yKCmWUHzXCt9p6/uzD18/2kS3H5Lz6YMF1OVfGw5TWK9TJttsgi+R eqvN5k50+O3BtFLtX7Y8ChwTja/y3fgR6m2A1CatKFMcAAQDZXxervqnIzd+idR34GqW 3AyQSxMD5NqwjpjlMdRq1M4Q4v3+2ehuXEeUqd+mcN/SvgrIGyZnL72H9F2LhjGyelWM YCi+eSaCgflBAGBi4sYqfw0z5UtpFLqKuyfV/qSbden6VC8CM91CLC18zag4AWWKQIzk txpVp3P1gWHPwgzIGFkPAor3xIoO6CYrtHugTzOTnrQL/vy8cl0rmIRJHmChzzT+z2hL L6iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@uged.al header.s=google header.b=YydysQuJ; 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 hs31si2009001ejc.361.2021.06.03.06.16.01; Thu, 03 Jun 2021 06:16:24 -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=YydysQuJ; 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 S231320AbhFCNPM (ORCPT + 99 others); Thu, 3 Jun 2021 09:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230414AbhFCNPM (ORCPT ); Thu, 3 Jun 2021 09:15:12 -0400 Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3D79C06174A for ; Thu, 3 Jun 2021 06:13:15 -0700 (PDT) Received: by mail-qk1-x735.google.com with SMTP id d196so680653qkg.12 for ; Thu, 03 Jun 2021 06:13:15 -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=CBnvtPJLdU3kbekuheh4qc6OMIUkdKF2nOgchdFq6rc=; b=YydysQuJcuB2zxLOLbU7aPah7Lb9RIs2OcRo39zEyZjr57DV83DYJnlesShXVJ/QiQ OE6cEKWBwFj9wQk7+c5zcnkWBG54Kkxqbl0M6gEgwbP9dS/rvWFPp4cub55w8/YvXPJ4 ZFERiNBM+Cd4rd+RFXXpgR98D4/TL67NEbVKyJ7BLxl8fkqjOVGC9YvpCzEnyREsUAnS bf0nyIKcT8C8/5soIFtGyBGiTRiG2Xgvl7Y2a20N9wXoTizrqKcrnvflGNSAUbTT4s/8 dL3l5XRaR6DQt5pW+i0CaDjUpMTGsww5MQnDP1M6A+xnZIp6AK3AxMIRKWCDgTRszgzh 7H0Q== 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=CBnvtPJLdU3kbekuheh4qc6OMIUkdKF2nOgchdFq6rc=; b=qXYgdxiJqjXq7e3elNYws+ogXUhSnJ7ONB70h5jXAsLf0dzbuOWxolSR3htRzKcv82 pc8GV1JbLQFdfG9M3IxVMqPU83H89CAsD4j0ePuP5lzuCat3ByDFysqd3eE/9MQrEIOH FaTg3P+ASIggIwBEZWgQDUxSzPeqVK4BkKrJLl2pBng7RBWPpEy+bYoKJKsLpjb16+af eTHt2dSTvpp3adqCqGZJIad6PdPWvHM5XLsNE3g3wARyMEG9RG+vdoNukVJp2ud1OkCt Xx85YLbSHvw8uzn4Q36gcRD9OOWgFk3d2aoOAI2S0pf5whwxFQiXpqKhYZ87XXmJ1Awn IGmw== X-Gm-Message-State: AOAM532+acH7hbMjhGe6nDJN7gA74uaztLgLUzK9k1k8NjYoqQIJwkM5 M22yy0S2c67mNoj9+70LJnCB7Dhe3baZY0vlR8+F7w== X-Received: by 2002:a37:8b47:: with SMTP id n68mr4054613qkd.209.1622725994875; Thu, 03 Jun 2021 06:13:14 -0700 (PDT) MIME-Version: 1.0 References: <20210603113847.163512-1-odin@uged.al> In-Reply-To: From: Odin Ugedal Date: Thu, 3 Jun 2021 15:12:35 +0200 Message-ID: Subject: Re: [PATCH v2] 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, > Out of curiosity, why did you decide to use > cfs_rq->tg_load_avg_contrib instead of !cfs_rq_is_decayed(cfs_rq) > which is used to delete the cfs_rq from the list when updating blocked > load ? Well, the main reason was that it is currently (without the other in flight patches) not safe to just use "cfs_rq_is_decayed" directly, since that could result in a situation where tg_load_avg_contrib!=0 while cfs_rq_is_decayed()==true. I guess we can use cfs_rq_is_decayed() if you prefer that, and all the other PELT patches are merged. (This was initially why I thought a new field was a simpler and more elegant solution to make sure we book-keep correctly, but when the PELT stuff is fixed properly, that should be no real issue as long it works as we expect). I was also thinking about the cfs_rq->nr_running part; is there a chance of a situation where a cfs_rq->nr_running==1 and it has no load, resulting in it being decayed and removed from the list in "__update_blocked_fair"? I have not looked properly at it, but just wondering if that is actually possible.. Also, out of curiosity, are there some implications of a situation where tg_load_avg_contrib=0 while *_load!=0, or would that not cause fairness issues? Thanks Odin