Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4443124pxj; Tue, 25 May 2021 08:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK2MCsLSjtoP/9LowOaAOCaa+L0LxDWiORr8rf6d83teI2h8WNsI0f+nz73pW9xA03XLpD X-Received: by 2002:a02:b90b:: with SMTP id v11mr31130458jan.1.1621955292558; Tue, 25 May 2021 08:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621955292; cv=none; d=google.com; s=arc-20160816; b=KK+Uqb5iSXzHwpyBWXjXXZNnqaJQp3d8IA7XcZOqcuxuDo5Oj/KL5mzSjbZDop9pc9 bewanlBRQ+vN0VuAkahuif46/1BJ7DhuGUJihC++6GgX6a/9CEQr1qaE6QdBVWq4HtYv AI8K9DKTHWnP+gHTjBijTKG4KVpn4TQTjSHXToejBZET/9BCKL9QTvps+JBpYl/HQSf1 8UwHVGWu1Fc4z6l4+FubFRKeKYGwMX47UbRQI0m68dKjsX0FRqeFhmu0NTr/i9YJl9+C lkOH6bbd4Br1YVRhG3HRIrWgmAW61Ud0PWqp0304b6xa2+uqQxuuET0t4rYAKclhOFOw 74QQ== 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=UD1f1G9Ex4FwbzHzbUArz7WZFjqV4ALpCGYlosc7pFs=; b=AA7WiJeoVEsyqTy9MoqE8a2FzMqo4MK/PHWmINYo8gUX9rNSbQgjE1NY7zvtRoVB0u aIObF6u+/NI32aU3dsswNUMhQljQgqYrJeEF3NMN8+3Bgx/MvVfdAlRKN32sVPsjMSq8 qOIKI+wtgbgv66wZ6cXu891w914F7q8bAJ7QJuK2rKBd/t1Nx15Kp2bA9WqPvCn+edY4 OVxumSfi6MCciBbH1IAjRLkTP+7bbh37BubXF9vHEhi3eTTFAgnLKPXfir40Cf+NNua6 0Z54X2m5pcCmuIhqmHbLczgeB1yDz3hKi5B33LlQdqYTNSHl+WnLkpCrmcXOTvSkmjvZ KHrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@uged.al header.s=google header.b=rkN2FqQc; 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 i17si16292679iog.70.2021.05.25.08.07.58; Tue, 25 May 2021 08:08:12 -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=rkN2FqQc; 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 S230141AbhEYKi2 (ORCPT + 99 others); Tue, 25 May 2021 06:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbhEYKiV (ORCPT ); Tue, 25 May 2021 06:38:21 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8233CC06138C for ; Tue, 25 May 2021 03:34:16 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id k19so22759124qta.2 for ; Tue, 25 May 2021 03:34:16 -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=UD1f1G9Ex4FwbzHzbUArz7WZFjqV4ALpCGYlosc7pFs=; b=rkN2FqQcIKdfrkPyeXVV+a3SZSWeeezHAFurF3wfm7k7x4cdKt9YJPMOwuxYJkYVnW 0p/uzXKTTQ8BicHVNLs//N5duQlo3qK5C/6gMDSNen9WXVFn6UZ1Og2D2WHiDeQ6ZnGO pHyJnrV6PB0Eep3Z+tgRiR6wAKeVpJPNprZ8ZBHEvFC5s4o/M4Zdu5ysFXUIS2H8VIqf lS6jE/CKBPrqTseC0B9ICNfTJL9ejNkWFFox2jJRzuJDPPToeQWVRC70eZtE/zWw1Vtc carGqY2HC448jpHA4LhJjVKYKLWZF7dQlxTH9XNS+1WG5rnCJuLpx3es6o5KcAFz3ZjN 8C6g== 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=UD1f1G9Ex4FwbzHzbUArz7WZFjqV4ALpCGYlosc7pFs=; b=Nv42h4A0iv49OMTt6YtgOLtYR8BOT4g0X0xh7IAe1TAuM18jHMw+xZMwT90qmeg5qS /ZWSepmT7iWA1YgBri/7KFjciGWhPaqLlpvoqiK9Vv+uQcU5QJeAPyMZ0rcdvTrltw4b /QAsqEjjfndOHnwVLRgpAlxJ2T6PeM0PlrOowD5lzBSHSekL5t75tuLT2xeCHNy7sLri KbX2ibqZWYmweNP2GOTu+uIgA85RblLtc0Zd9su3v66UWcm/6jGG6OW7AHsl+zP+Meh+ IDRn4favqlt0I5YYgm+hlmAtVPv/Ogs4HzhA6C7N50/FqFjz/z5AkjGgY4qNvXUMzDED oI6w== X-Gm-Message-State: AOAM530+LjSDkqlCW/6R2GVM6hb52QPn1+lj6C//xlfCyqwD2gUFTnAt 3XuApDWjZ1dOe32WuBHUZVubqH6JJRS4FYwJJ/4vzQ== X-Received: by 2002:ac8:5a0f:: with SMTP id n15mr31803414qta.313.1621938855655; Tue, 25 May 2021 03:34:15 -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: Tue, 25 May 2021 12:33:35 +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 Hi, tir. 25. mai 2021 kl. 11:58 skrev Vincent Guittot : > Could you give more details about how cfs_rq->avg.load_avg = 4 but > cfs_rq->avg.load_sum = 0 ? > > cfs_rq->avg.load_sum is decayed and can become null when crossing > period which implies an update of cfs_rq->avg.load_avg. This means > that your case is generated by something outside the pelt formula ... > like maybe the propagation of load in the tree. If this is the case, > we should find the error and fix it Ahh, yeah, that could probably be described better. It is (as far as I have found out) because the pelt divider is changed, and the output from "get_pelt_divider(&cfs_rq->avg)" is changed, resulting in a different value being removed than added. Inside pelt itself, this cannot happen. When pelt changes the load_sum, it recalculates the load_avg based on load_sum, and not the delta, afaik. And as you say, the "issue" therefore (as I see it) outside of PELT. Due to how the pelt divider is changed, I assume it is hard to pinpoint where the issue is. I can try to find a clear path where where we can see what is added and what is removed from both cfs_rq->avg.load_sum and cfs_rq->avg.load_avg, to better be able to pinpoint what is happening. Previously I thought this was a result of precision loss due to division and multiplication during load add/remove inside fair.c, but I am not sure that is the issue, or is it? If my above line of thought makes sense, do you still view this as an error outside PELT, or do you see another possible/better solution? Will investigate further. Thanks Odin