From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by kanga.kvack.org (Postfix) with ESMTP id 2DE9E6B0005 for ; Fri, 3 Aug 2018 13:15:47 -0400 (EDT) Received: by mail-pg1-f200.google.com with SMTP id d12-v6so2865974pgv.12 for ; Fri, 03 Aug 2018 10:15:47 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id w19-v6si3839991plq.236.2018.08.03.10.15.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 10:15:46 -0700 (PDT) Date: Fri, 3 Aug 2018 19:15:38 +0200 From: Peter Zijlstra 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> Sender: owner-linux-mm@kvack.org List-ID: 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 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.