Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp718056imm; Fri, 3 Aug 2018 10:17:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdAJ2jbau0GbTgadx2e5xPm5I5vj6lGB/Yxizanksc8szhw+dT9qMtSCRjT2ieCUIrZFhOh X-Received: by 2002:a62:68c3:: with SMTP id d186-v6mr5555011pfc.70.1533316624111; Fri, 03 Aug 2018 10:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533316624; cv=none; d=google.com; s=arc-20160816; b=NB+/AC0nxIvlTt0vvYg8v4anjOhnbWrb5rKNOfCukefrCH9aLPWm+8wZfI0xTbjX1/ jGXcMaXBRVvB6UqAZOmsLQFvH+m3LLC9GM0JFkSvmh8hxnw+JSXh20/3l1tnD0nF3WoW turti7BV3rWirvqlmWTyxh3ixCZkVbbqALICnqHA4ArvjTtRk9I+PoLtR5+KDDgiRQZh /hTeGLi72tAU8YJo3Xy0JG1S6ZIZdYc3qz0mdrkvzojVOplw9QDjxbQogwl8eZ5KbaV/ CzlJw/W+yi7xhcb2Vj4lvYB+BdFli8z4i62HYHVojbln33poalq4qtYZlsL7s87+1x+s TenQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=9SKvL5mBhDInQR64JgTNiYmIMyZrEVQ4JX0o0ob6sKE=; b=jhDW6yukdUU6gu6Nk/hjgcVADdvF/Lm0jDDqW2zaOhlxVnhtBbSezoEcpGRTix05Cz TJ6twK7S/w0HojZ0QmbUfMBMCYSTYiSQAOc2ZkeM+4+gcwLzgW6ULqpzS8b9t+wttcnD h7Myg7RT3T6JxjK8hBuScp5PwAZc7He8JAJmJk4G5DDZgpbkwDz09zZhdPcTwRB1WQ6L XmE7V3hkac613wdCBSt3gOxbJAB9kCs8nWJwnuC/33hZAHueGrLo7DiYgU3LtJxl+AxB eleEMRbXe1eaq5GYPwMxeUXFUjO1kWW87ewLTfep1zyThThWAveHBwXkt+TKgioeutIx 2pzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XDNWTjb4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72-v6si4542360pgc.304.2018.08.03.10.16.49; Fri, 03 Aug 2018 10:17:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=XDNWTjb4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729606AbeHCTM7 (ORCPT + 99 others); Fri, 3 Aug 2018 15:12:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60544 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727792AbeHCTM7 (ORCPT ); Fri, 3 Aug 2018 15:12:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9SKvL5mBhDInQR64JgTNiYmIMyZrEVQ4JX0o0ob6sKE=; b=XDNWTjb4kDHOqjchaHeMHOCKz qLAyFj4tmpJ7kg1kMWohfqFhhR2e2aJFWvpV+CGvJaT57jKrNJ69/TESjYIQZjuwwepQ1PYC4gbKI DzkVzL2hoGZD/lW3LQJA3fPYqlbXYTydSrePlgsUAkEqrsGM6zxZbQ/KuqD6r8zUQRdU2ud0hevoN VdkmplTJ89s+FnpSH3zBlBjOhvXc2BxNUCjfVD2bYkCTioShyK/nB6edw0lguq263zsCCCyQ2Hzby kbkgLiqQapzGXa3ClBs9X5btgdH/pCbPDrY1hD6zwbAq0B0cqv8eXQQRhDMaUieZBFhdE/w8e5Mdf NQCcBnXMg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fldfw-0005ZL-Em; Fri, 03 Aug 2018 17:15:40 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4216620267E51; Fri, 3 Aug 2018 19:15:38 +0200 (CEST) Date: Fri, 3 Aug 2018 19:15:38 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , Tejun Heo , Suren Baghdasaryan , Daniel Drake , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , Peter Enderborg , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 8/9] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180803171538.GD2494@hirez.programming.kicks-ass.net> References: <20180801151958.32590-1-hannes@cmpxchg.org> <20180801151958.32590-9-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801151958.32590-9-hannes@cmpxchg.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 11:19:57AM -0400, Johannes Weiner wrote: > + /* total= */ > + for (s = 0; s < NR_PSI_STATES - 1; s++) > + group->total[s] += div_u64(deltas[s], max(nonidle_total, 1UL)); Just a nit; probably not worth fixing. This looses the remainder of that division. But since the divisor is variable it becomes really hard to not loose something at some point.