Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2117670imm; Thu, 19 Jul 2018 13:32:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdHjmO7ZlMISA1Qd6qazMCqRwQOpxQLxo1KaIhWLwqLisojbr3gCUIp7PVlB2ujAPv1cvvP X-Received: by 2002:a63:1644:: with SMTP id 4-v6mr11549632pgw.103.1532032335751; Thu, 19 Jul 2018 13:32:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532032335; cv=none; d=google.com; s=arc-20160816; b=FH0T/OGeotX9CbVL5j9TiPmS71H7al+X+p+tnwL7891dQN27viW1o7WdjHdiWOb65G 1bHjrW5qvjb+GRInwqvlGdqWEJgsOyky/htRASPNwtUkVn3QNmIm1bwrU3i80nE9DBBD 5LQdV2dkwBxszxw0IaEk45uqLRlAK8vgrhindatop5emZvoXmybYiHCuMpo2Wov/7Zlj 3NUG9jhh8MKnfEfyqUyNAmEMRhwFjxybdhr/kzlEpAVOgf7uQ08MGW0HGwvcjhMDPKo7 CsN/m7qIgOihlfEXtzte8zkfnpgyL3iK+5zLt8tNp5nU7t1TFxwBlsJ/oy5LqkU2jFw+ v1Yw== 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=0j69lDSxJE6g6prtT5F3TYNRStuPMqOk5KNLppvYte4=; b=oJwQ7LJrX0Gh8f0QEX31IxHPBSuLR2yT789u5vryArhnFW1Y7cUFAIOyPZ4zBcUASK WeqfjGvjXCek15NB/DpSWWMW1Y7qBzWoMq2tl/xyCiUGDgjCzPeMvmibqpUznAGaR1fJ uMW+T4MvWhpQM1MlUl9zjlcBIHw9IsQZ91KF4sARB6OqXyoOAQ9PrFZfC6t9c8ET2uIL biI8h2Dap9Ky450kz6i73CLlCTpqOOhq/QMx3AEZQ7PmjVyL0ZEevHxN0YkplE239txB oAOMKRbiUk02dXIzEscjMyhlOqNZ0IQ0tHIFDzmzjYkz5ATuP+pweJXqPrjLxXUMwFDv PwKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SPrDf8e7; 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 b1-v6si24857pli.54.2018.07.19.13.32.00; Thu, 19 Jul 2018 13:32:15 -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=SPrDf8e7; 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 S1730054AbeGSVQK (ORCPT + 99 others); Thu, 19 Jul 2018 17:16:10 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46984 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbeGSVQK (ORCPT ); Thu, 19 Jul 2018 17:16:10 -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=0j69lDSxJE6g6prtT5F3TYNRStuPMqOk5KNLppvYte4=; b=SPrDf8e7cdkMnTrlxBDtLRzxu Y6ToCckFOtPgl4j/NlWqlIydKMm1yu3PjE/Ablc+SlyYMFzBxwvMtZIU7uawOwgUp4ySB/KcqwPpN /MeI1pxNuEKljrR89mTFCPYGsgEt5HzVypeInjSGZwyEINMXVCCx1narj+09X8/BZDRrDockerrhu Uzopnjgpn8nc18AjMk7k/jodFMVx4jtblDH/GZqGwahOpQacuxAh7ulxc2VJd4r6Jfi5sMAYU7Qdc 9VT8HHAPW4ZBVz/vZ5MevhUEaT+N/s8pet8H3K+GkNyL8eANOojnr0vyC8TXijg0L7WeX54TnJlqv aJfI8P06g==; 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 1fgFa1-0002G6-L0; Thu, 19 Jul 2018 20:31:17 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 083E420275F38; Thu, 19 Jul 2018 22:31:15 +0200 (CEST) Date: Thu, 19 Jul 2018 22:31:15 +0200 From: Peter Zijlstra To: Johannes Weiner Cc: Ingo Molnar , Andrew Morton , Linus Torvalds , Tejun Heo , Suren Baghdasaryan , Vinayak Menon , Christopher Lameter , Mike Galbraith , Shakeel Butt , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 08/10] psi: pressure stall information for CPU, memory, and IO Message-ID: <20180719203114.GL2494@hirez.programming.kicks-ass.net> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-9-hannes@cmpxchg.org> <20180718120318.GC2476@hirez.programming.kicks-ass.net> <20180719184740.GA26291@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180719184740.GA26291@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 Thu, Jul 19, 2018 at 02:47:40PM -0400, Johannes Weiner wrote: > On Wed, Jul 18, 2018 at 02:03:18PM +0200, Peter Zijlstra wrote: > > On Thu, Jul 12, 2018 at 01:29:40PM -0400, Johannes Weiner wrote: > > > + /* Update task counts according to the set/clear bitmasks */ > > > + for (to = 0; (bo = ffs(clear)); to += bo, clear >>= bo) { > > > + int idx = to + (bo - 1); > > > + > > > + if (tasks[idx] == 0 && !psi_bug) { > > > + printk_deferred(KERN_ERR "psi: task underflow! cpu=%d idx=%d tasks=[%u %u %u] clear=%x set=%x\n", > > > + cpu, idx, tasks[0], tasks[1], tasks[2], > > > + clear, set); > > > + psi_bug = 1; > > > + } > > > > WARN_ONCE(!tasks[idx], ...); > > It's just open-coded because of the printk_deferred, since this is > inside the scheduler. Yeah, meh. There's ton of WARNs in the scheduler, WARNs should not trigger anyway. But yeah printk is crap, which is why I don't use printk anymore: https://lkml.kernel.org/r/20170928121823.430053219@infradead.org