Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5614669pxj; Wed, 23 Jun 2021 05:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAmHv3/Q8eA9pvNGvdX/S+95zLP+Y9t2gS8AN5skHZ92TUWUYE6XWJ+C6n2krW64/CckYd X-Received: by 2002:a17:906:4447:: with SMTP id i7mr9764020ejp.185.1624451165155; Wed, 23 Jun 2021 05:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624451165; cv=none; d=google.com; s=arc-20160816; b=TwgN3uKv/wYtmNLLFfCh2YBOX2os5z0lWcuVggUmO+UJNjtLwVfwUFefPHvpZFpL+f HgkRdVH/pUdeimOBCykgJQQfOKcabJaywcYpH91ugObjZ9V17h/FGUxlOOjUWcAlzAne PTldlEeyz3ea/4tJL6pJxFjFm2VbZGueuNLu1uaNuAQyiFCilRlUnEqWlo+mAtN4nNUL +tDPK4D5zdX9G0kdPGD9AWFI58M22J1q544XQDFV0WozreaYeJGCp38t5oGdEx8FXATH uISiOZNO3ISxPefGyg01SN/F2m2NUB0/Xd+dzMrs3vydDfzM4pL498b/bgNaVCI3XR9M y/WA== 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=K1M8efwheuUHkGZYU3icVERiMojYbNdJd5fKUwXRZZM=; b=aAhunaHy6xwVwlaGvoNUTubLpyBBAKX2azRzl0nEkTjxNDdgDOhhaYjnROFcjdjmDS SAcp/PVuY65JCYvM8TjzdcCzJphCZigADlQDxk/OTt7qchz5CZUbXnVdkuNr0t3w7WPY i+9Bb0qxUpjXTIzSXiHq8sfsB6evuWYy69UM9edQnba7GH3WN9tvlQzIv8p8GaI8CtB1 P6ew6KJciZElj08iCGPWNFchQKJ8Ys4S2mgOcPRymqbrlypGMcPr0DKqhk0mb+ejNkPy fNa03xGvsP+2YJ4NE55podzU3LOc/M3HzTl66Qe8mGqfifplUUUM1XzdN6r90cJe3kSD wboA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PqWSqBB5; 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 w20si16603280ejk.618.2021.06.23.05.25.42; Wed, 23 Jun 2021 05:26:05 -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=PqWSqBB5; 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 S230274AbhFWMYv (ORCPT + 99 others); Wed, 23 Jun 2021 08:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230019AbhFWMYt (ORCPT ); Wed, 23 Jun 2021 08:24:49 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A83CC061756 for ; Wed, 23 Jun 2021 05:22:31 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id a21so2714276ljj.1 for ; Wed, 23 Jun 2021 05:22:31 -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=K1M8efwheuUHkGZYU3icVERiMojYbNdJd5fKUwXRZZM=; b=PqWSqBB5OILmf2SkzmT/83btBuqlUDrfdW0JVaEvkWsBEwZrXgtzrqkG5Y59t4gC+L 1MWQdFS2G6czzHAeq8rheCjGmBWK4wgOIf9feB7XSPbPYq043gM4yN6bAurum7o65wOy QRVT7ZPPrUzTjEt78fxI/bzYLbsnux5gf9K80cS0N7kEn1Qb48B5Qu/KDk7k3BVNZLI8 NBrpRP1Z4o+h5bECZiw2JVXKf7/0sh8BqiARZvqzv8jaTu7/iFfcRXn/QRqio2CwU1kI j4JqqO8rfFyoR3p4Y8CedFElWkPcqNzM3QQ3n5fS+baaeJB+/SbdcTVHwKHUczpy8FRS v61w== 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=K1M8efwheuUHkGZYU3icVERiMojYbNdJd5fKUwXRZZM=; b=WVVK9zWQdkMUl2pSiEL/rVbe/7UMaE6zAHB70F9V7Lu3aJGWs0ZgmPKHjT3Ozx/qYS wcZkcErttH6iOpJfrFQ/wbcgo4PZcgEIRbV8/sClM0wP3LnHSBIreS/x8RyGKypidh6b 3cUNsCW246Lp6TwoC1/Yk+SgdbVEr5fz2Od8soKUFOt4gFSgBacihaCw91Z+txgTOnP8 TVKWCHadDQi26fKFR/ljEgSvuuMYnA8EoKZ/FciWOohfLU1hsz0Xy4/z1PaM5tPzpF0o npQVazES/Vu/WdJGsKkhfeQ+r9W4ORP6F2tqjlR3V5fsX4DlI+5+M41Y2kqR/yzBd4ES a9Jg== X-Gm-Message-State: AOAM5324N102Rl6Pv5qLWrqLOXiOZChc1X6t4nav+lQEHlPdLsSbxND9 V2gKLQ/BSu538dgOZJKxgDfez+6oYhq6kEvILwF5KA== X-Received: by 2002:a2e:9b07:: with SMTP id u7mr7469454lji.209.1624450949701; Wed, 23 Jun 2021 05:22:29 -0700 (PDT) MIME-Version: 1.0 References: <2ED1BDF5-BC0C-47CD-8F33-9A46C738F8CF@linux.vnet.ibm.com> <20210622143154.GA804@vingu-book> <53968DDE-9E93-4CB4-B5E4-526230B6E154@linux.vnet.ibm.com> <20210623071935.GA29143@vingu-book> <6C676AB3-5D06-471A-8715-60AABEBBE392@linux.vnet.ibm.com> <20210623120835.GB29143@vingu-book> In-Reply-To: From: Vincent Guittot Date: Wed, 23 Jun 2021 14:22:18 +0200 Message-ID: Subject: Re: [powerpc][next-20210621] WARNING at kernel/sched/fair.c:3277 during boot To: Odin Ugedal Cc: Sachin Sant , Linux Next Mailing List , linuxppc-dev@lists.ozlabs.org, open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Jun 2021 at 14:18, Odin Ugedal wrote: > > Hi, > > Wouldn't the attached diff below also help when load is removed, > Vincent? Isn't there a theoretical chance that x_sum ends up at zero > while x_load ends up as a positive value (without this patch)? Can > post as a separate patch if it works for Sachin. In theory it should not because _sum should be always larger or equal to _avg * divider. Otherwise, it means that we have something wrong somewhere else > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index bfaa6e1f6067..def48bc2e90b 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -3688,15 +3688,15 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) > > r = removed_load; > sub_positive(&sa->load_avg, r); > - sub_positive(&sa->load_sum, r * divider); > + sa->load_sum = sa->load_avg * divider; > > r = removed_util; > sub_positive(&sa->util_avg, r); > - sub_positive(&sa->util_sum, r * divider); > + sa->util_sum = sa->util_avg * divider; > > r = removed_runnable; > sub_positive(&sa->runnable_avg, r); > - sub_positive(&sa->runnable_sum, r * divider); > + sa->runnable_sum = sa->runnable_avg * divider; > > /* > * removed_runnable is the unweighted version of > removed_load so we