Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4538889pxj; Tue, 25 May 2021 10:11:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkDJsqJF/87qQ/6YgPhkRYhEVyw/Z0VWAIbpffDCvH4RMkhgj71d+QXtPrEHCSHmG9Vwqx X-Received: by 2002:a05:6602:90:: with SMTP id h16mr20510781iob.194.1621962688696; Tue, 25 May 2021 10:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621962688; cv=none; d=google.com; s=arc-20160816; b=RTYKXsCdAi4v9eP81xon1KTXt1DXi8S5Y0hCs6VKK0ofDPe4YZwDU6a8t1sj2LdY1g 1rD4Z4kuFSA7toMaFp7S2dAvVFiuIfyAXa6xEhLBd38Dh2u/OwZN7/bFhhatZbYAkemK zcvY0jlA9Q9gCMhD9305HPhKLU6Fs7OawTym9JNIAnFniDBBclwniyKDgoqol+E0QGKW u51bBiZmH0IndRXJDWzWeGkBOWsxfiP+bHztumUKBSh8U/7eeSjTOor0Yaq7ljISDGH9 A9rNldmnCF9fJUWxMKKb8/rvu410UHuFOsWCZha7QNohKBTUeXvCH3WIj9j6lYclDqQF sV6g== 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=uIo7/iOcEYFUfIFZkRcOL5riddbVvAIMJ8wGs/EdkRc=; b=iW/crL1GOJzG1cR9jw9dY+pnOihW6crzV9m9lhSlf6n5AIKMUDkaJWIujLq+M8N3GJ z2ueeCesM7xzsSlj9d5Bocei+y0jn/dqIgY3wsi4Rr/0sMlYBbAW0u8c3dSktoMMOn/1 tP4wnNi6l7mdw3oFnJGp2FzMD6rOJs7MvbQba1nz4UkezD39t237u/qJnoNDhTFSW7Kj fmWW4XcHQfQjg1mDZvyqu91IyqLnM9zafQ9R2BZ2dkuSIYLOH26g7W+BgtqEMuIHQJUs 1cN7wk+ICvaCc8qS9ae/LSDUzdCho9Te2hpFSNhNafHu1hXzKi4X7rGm3OhShK0H49/v sRxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F4A75JkM; 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 b5si16662564jav.78.2021.05.25.10.11.15; Tue, 25 May 2021 10:11:28 -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=F4A75JkM; 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 S233900AbhEYOc6 (ORCPT + 99 others); Tue, 25 May 2021 10:32:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbhEYOcl (ORCPT ); Tue, 25 May 2021 10:32:41 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43816C061756 for ; Tue, 25 May 2021 07:31:09 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id a4so23588025ljd.5 for ; Tue, 25 May 2021 07:31:09 -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=uIo7/iOcEYFUfIFZkRcOL5riddbVvAIMJ8wGs/EdkRc=; b=F4A75JkMsGy+mU4xkQ+hrRir1o9AbYLExHPfcQfFnUXIO6DE/5641VeHIyAalgivCo N/kqbRtpIl8KaXs/NPtXGmOEUNdo8CVx47T8HCgN+GKM0k1wSbGnmY0ybIGqTJxaxmhD Oku336dpO2ktfatK/DKwpF72MdpjA+uz3NyTix8H0hCjxR2a3OHIXjMz9SZvMKgzJua6 t4/+hW/krEvXJkvFk+i8+iI3iXeYAnNSgdL5bbX0zDLCbpg08A7YMYpfM/RHIQ6wv+eA L4ZgOJslSk1zsLpXvaxJ02QWV5j1YVGO8LXSADULytLj7TtLIVSxtXEsfJoQ0k9UlqE9 FemA== 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=uIo7/iOcEYFUfIFZkRcOL5riddbVvAIMJ8wGs/EdkRc=; b=m/JQcxle+NPkThChIWV832d55VzbKHtgC7BloZbXvleVWVmzZffFq8O0gRt/5P4YZR 9jgBQOxZrIJs3tDjNv1fx23z3Quu6835H8r0pfnU6qL6eZ/J1rR/nE2DjLuwBo8MLJ/S SK1gukBW6Gm+CAw6wzSCKoTHH85cXDAplMHBNxV48Hy8m9HfxhbtVyTqxbM91cXAuhV1 SMSnpTbkMayUaYvkMR+3vAXngk37ufxV4uS1n5C7zBbnktOv5wXbe53sFmGiHR2tgpaI GNoJ3ld5WbWlTelQ8zd3eI1JNpM7B6/CgPj+uosg2W9+rmtPj7uwpi1pXmt9N+1jbS7B /Jmg== X-Gm-Message-State: AOAM531VdK5uctOM6z6ve0Cl8Uv/HnjEZCudICWgztmnpwW7wy74ZevS YEsG3Sp8OkhATyX7wqFEAyD5gRw5MuFgyCpS2ftS8A== X-Received: by 2002:a2e:8557:: with SMTP id u23mr20793221ljj.221.1621953067483; Tue, 25 May 2021 07:31:07 -0700 (PDT) MIME-Version: 1.0 References: <20210518125202.78658-1-odin@uged.al> <20210518125202.78658-2-odin@uged.al> In-Reply-To: From: Vincent Guittot Date: Tue, 25 May 2021 16:30:56 +0200 Message-ID: Subject: Re: [PATCH 1/3] sched/fair: Add tg_load_contrib cfs_rq decay checking 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 Tue, 25 May 2021 at 12:34, Odin Ugedal wrote: > > 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. ok so IIUC, it happens during the adding/removing/propagating entities' load in the cfs_rq. > > 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? I don't think the precision looss is the problem because adding/removing load in fair.c could truncate load_sum but it stays sync with load_avg. I will have a llo to see if i can see something weird > > 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 > > Thanks > Odin