Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp520634pxv; Thu, 1 Jul 2021 03:36:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTk/RakoArKu+qFAdi24We2Edm+OZcHyqZWQZSHs7uvM+toiSSjQAUfBrX+womOEgffiPt X-Received: by 2002:a92:d10:: with SMTP id 16mr29167383iln.189.1625135778120; Thu, 01 Jul 2021 03:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625135778; cv=none; d=google.com; s=arc-20160816; b=MvYiA4RlQHN7bhP52va/5kyAS6jUqfSfQyJf8z3mjvsmBpxQmwHIta6x+b64FqHlrA Ge/r9o1xxSiiexf+iv54OR5qMBlxtvRAgdoUPHMxm5HNJetWmMlbp0SFUKmiu1LKPn3v 34dSchyACR6y138DfwclIJToyzZwxpov4XydfCYNxizkKAcq3u3Mv8+gkpC5Jqa3n24n VNthLoydSXKi0p72+v9SI5SKVrG2yFGQy06N3Tq3+nW5kRLzeQab2xMcGZfDgmPqbDaj wJYPFwW/XabHcvgAKgqdnyAwTuPqoh9ZQiaNB2oJl4zI9e1OdoMNB0FKh03C22o7rO7U obzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=l5DqxwlTZjrKz/gEzpQM9Yo/AsNyA6aBp143JFb3ijU=; b=VQL8v8VbjrG4mKsA1Gg9mRohfnE0BuDhsbQzK5hkkBasbjuNVoZIbLYaLy6gat+8Ew pbnndJedbJRJqGDZ12TnQlMFn+RdWANf72/63hE0p3xVa42bQmFEqMKPb29WkgMYvMWT gTUPY3Q+wQs0+74DuWma0sx6Pf39BX4Cw0uT2qgpbwlWoJo/jnYfJy5mc174qpQFioeN x0Zx2saCD3dMb2hH6ZCkk6uQ1CvaJrchwUp9ADr7zEXNDbb/+kzZuu88DqCkgZUoRvuE 1yV6BRcCFz6H+k9s2xPAMe29EDcL28YMOwBXJWdaa2TH7/EX1pwZxSgs7vpzgXOOsLdf l4xw== ARC-Authentication-Results: i=1; mx.google.com; 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 i11si26306049jam.66.2021.07.01.03.36.05; Thu, 01 Jul 2021 03:36:18 -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; 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 S236053AbhGAKhV (ORCPT + 99 others); Thu, 1 Jul 2021 06:37:21 -0400 Received: from outbound-smtp20.blacknight.com ([46.22.139.247]:40135 "EHLO outbound-smtp20.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235300AbhGAKhV (ORCPT ); Thu, 1 Jul 2021 06:37:21 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp20.blacknight.com (Postfix) with ESMTPS id 2FA531C3FF5 for ; Thu, 1 Jul 2021 11:34:50 +0100 (IST) Received: (qmail 25466 invoked from network); 1 Jul 2021 10:34:50 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 1 Jul 2021 10:34:49 -0000 Date: Thu, 1 Jul 2021 11:34:48 +0100 From: Mel Gorman To: Sachin Sant Cc: Odin Ugedal , Vincent Guittot , Peter Zijlstra , Naresh Kamboju , Ingo Molnar , open list Subject: Re: [PATCH] sched/fair: Ensure _sum and _avg values stay consistent Message-ID: <20210701103448.GL3840@techsingularity.net> References: <20210624111815.57937-1-odin@uged.al> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 01, 2021 at 03:17:16PM +0530, Sachin Sant wrote: > > > > On 24-Jun-2021, at 4:48 PM, Odin Ugedal wrote: > > > > The _sum and _avg values are in general sync together with the PELT > > divider. They are however not always completely in perfect sync, > > resulting in situations where _sum gets to zero while _avg stays > > positive. Such situations are undesirable. > > > > This comes from the fact that PELT will increase period_contrib, also > > increasing the PELT divider, without updating _sum and _avg values to > > stay in perfect sync where (_sum == _avg * divider). However, such PELT > > change will never lower _sum, making it impossible to end up in a > > situation where _sum is zero and _avg is not. > > > > Therefore, we need to ensure that when subtracting load outside PELT, > > that when _sum is zero, _avg is also set to zero. This occurs when > > (_sum < _avg * divider), and the subtracted (_avg * divider) is bigger > > or equal to the current _sum, while the subtracted _avg is smaller than > > the current _avg. > > > > Reported-by: Sachin Sant > > Reported-by: Naresh Kamboju > > Signed-off-by: Odin Ugedal > > Hello Odin, Vincent, > > The issue of kernel warning(during boot) seen on Power sever, reported few days back is not completely fixed. > I am able to recreate this issue with latest 5.13 kernel(which has this fix) > > # git log --oneline kernel/sched/fair.c > a6eaf3850cb1 Merge tag 'sched-urgent-2021-06-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip > 54a728dc5e4f Merge tag 'sched-core-2021-06-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip > 1c35b07e6d39 sched/fair: Ensure _sum and _avg values stay consistent <<== > What was HEAD when you checked this? 1c35b07e6d39 was merged in the 5.14-rc1 merge window so would not be in 5.13. # git log v5.13..origin/master --pretty=one | grep 1c35b07e 1c35b07e6d3986474e5635be566e7bc79d97c64d sched/fair: Ensure _sum and _avg values stay consistent It's not tagged for stable and lacks a Fixes: tag so I don't think it'll be automatically picked up for 5.13-stable unless Odin sends it to stable@vger.kernel.org. -- Mel Gorman SUSE Labs