Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp442647pxj; Thu, 27 May 2021 04:06:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyauP7crJgSOHG//x+5cLs/9zs66CnVD0FyhMPu2ivtmzUHRBSwpgAG0H+rv97ClsTKPEck X-Received: by 2002:a05:6e02:1b0f:: with SMTP id i15mr2465861ilv.164.1622113601620; Thu, 27 May 2021 04:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622113601; cv=none; d=google.com; s=arc-20160816; b=bMBpOU8Xov3euKI+WHtjpA14ccHhw9KeqGSrya2Huq+iBJC4GDBVVlfYwYDSLgiV4u wC2qj76OjGxOhTFT0npx/+R6RN1qutjpavSkiKPmJWs4+pc+QCQmoieXgWGhddeSqwzu ZuXoMEBA2x2cn8VOkxAhkTg/yNLCYz77qQL690yc+zFYYe+1UcDE0SoMViw3b+igneF4 TDsqHZW4md10yk3BwB6nVhdTpb6hUiToi4jADZ613D/FrLfbakxgQqVGU4Ie6THGwfjH GKjNrE6wizoCc1eUugYbcsBSZQO03oBdxcSZ3f0NUZfFcXQpJrUykpimC4l3s9UvoSdi hq7Q== 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=XKuENeFAgLIoL5+XgHz8hQNxrwiJoPEw10HrNs/Gaaw=; b=ctb/bD6rnCwolHw1XVN+9DdJfcoicOUyp/XbpNP7kDV0nWsFqkJNO8/VrXIJFSOe68 yAAX/wvV+0AGkl9TxC7noN0vdHDmfD+E5zjhTJfjQJfD+mXCmeGSEGb5II1lwJISah67 hGgXQoW2UhPEEiN6mLEfrl+lWJMhVOqAoPwpUaqfcsGaMNKUgriPFRhqdr7fpK6ZnYFp nP0fMNTeO6e9l9osEDRGL9OZVplkVfAHk9ZXxMxypqQ/UWUm72dau5sG0oulzmLFE8tE C+bJbEiMcd8k6Jr+TsSsuIBXQjm38xgm8WpqCjgRNDmZZO+hYmZKNynRcce7R8x9W5Ke b7/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@uged.al header.s=google header.b="tU4ZEb/y"; 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 g2si2337549jaj.107.2021.05.27.04.06.20; Thu, 27 May 2021 04:06:41 -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="tU4ZEb/y"; 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 S236239AbhE0LGd (ORCPT + 99 others); Thu, 27 May 2021 07:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236229AbhE0LGc (ORCPT ); Thu, 27 May 2021 07:06:32 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F6BC061760 for ; Thu, 27 May 2021 04:04:58 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id t20so3118663qtx.8 for ; Thu, 27 May 2021 04:04:58 -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=XKuENeFAgLIoL5+XgHz8hQNxrwiJoPEw10HrNs/Gaaw=; b=tU4ZEb/yV70ErzupnLLI8qX0LRJtuEl5gH/tESbYnyYx1pkyGt2KvOBney1Tt7Squn fQs2goEXPg8AwytKWVqyh9iAMVUSNLRZFcdGAQ74TZ58Kjiv3OzKkUSXPpw4v7TY8ODP 4tUUgSYsfYnZVoXM6fIVvtxhsllB7nE6Dg+SI+6pzkt8n3MUfXaJlV9Uxv5dnPceHKwW 52AkymOG9Zl4d6OHJ9tIpZuxM4KF8efcj8YxuuoWYKSaAVL4i+CMKq6okkHejryw4uVH rgDbs5IICAp1yWk0uG7Ssdo6PkqfaAL+lqFPv82poBEsvU9UCDk/hOvrKVEMJ5pRsTEP bU1A== 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=XKuENeFAgLIoL5+XgHz8hQNxrwiJoPEw10HrNs/Gaaw=; b=rvUsOWYMq5SNrRmN7qKXsTMFuEYMg6158FHVHUZlA3NHdwRXnvapfeHp7ehqEXrihC EDUO96jeNMgvI+YP/V+flKeio0GmZ0TkLawUY2cEb/ceuItq1ZQosahthWlIrewqSJUL IscUt2aYrJNY8JaJBA0gQMYBQ0f55lArR0SrSPSfOBy9GHPIKpiW/13W9fWNP1cpry7l epANeYJ8aXAuOSAk+huE7f8Y2T7p8behwuqxYY5HAuQFCBHX/AHWiZkoWbogNO8zDWP/ goIoSWXoj+jxElRaOc2RbN/5CCoycrk7KCI4Dp1x0fAY89PfMYLb+xAjIJpkx4Rdpche NQUw== X-Gm-Message-State: AOAM532sJK077sw9wG0YHFh+wbKHK3EjEGXF7IGrXNm3E1OHTPIV+Izd MLUrsRUu8dygiq+Cp0vJdQgDRlhDt8BtEhUHvwKicQ== X-Received: by 2002:ac8:5a0f:: with SMTP id n15mr2513244qta.313.1622113497672; Thu, 27 May 2021 04:04:57 -0700 (PDT) MIME-Version: 1.0 References: <20210518125202.78658-1-odin@uged.al> <20210518125202.78658-2-odin@uged.al> In-Reply-To: From: Odin Ugedal Date: Thu, 27 May 2021 13:04:18 +0200 Message-ID: Subject: Re: [PATCH 1/3] sched/fair: Add tg_load_contrib cfs_rq decay checking 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 > 1st : ensure that cfs_rq->load_sum is not null if cfs_rq-> load_isn't too > 2nd : call update_tg_load_avg() during child update so we will be sure > to update tg_load_avg_contrib before removing the cfs from the list Ahh, yeah, with "1st" that would work. Yeah, that was my initial implementation of the change, but I thought that it was better to keep the logic away from the "hot path". We can verify this in update_tg_cfs_load(), and then force update_tg_load_avg() inside __update_blocked_fair() when avg.load_avg is 0. (Given that this is the only place where we can end up in this situation. I can update this patch to do that instead. Another solution is to update avg.load_avg inside__update_blocked_fair() when load_sum is 0, and then propagate that with update_tg_load_avg(). This removes the logic from the hot path all together. Not sure what the preferred way is. I have not found any other places where this situation _should_ occur, but who knows.. Odin