Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1014206imm; Wed, 18 Jul 2018 15:01:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdS7z+fryXR1R1pRyyqV6hm7pX4YUewB54NjBBdzJoAuLdPMqrkH5O3QHJnhjBaBJd7N9Am X-Received: by 2002:a62:8b0f:: with SMTP id j15-v6mr6983298pfe.33.1531951276643; Wed, 18 Jul 2018 15:01:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531951276; cv=none; d=google.com; s=arc-20160816; b=NDyiJTi0GaGNNIWVp7/pvfJXv0hX9N/Vqv/YBcujKMMzUjaoBIZQVwBdHdusYA1Ih7 n1+OJYRYcT11nXqYDV1/jQpRpmS7v/NOFu4eSNbXekFSQTdoV+AuDyaRbMaz/V3FcPvj 9NWgSHT6hlbfcGD1ocdhHyr7l2bGrrGE2G89UjZvChac4aZ6pch03IwZYOkDiW5tkUnx bYZli4XGg8gyScGlp15KkfHZBYV5yUpg4+9VhaqBx5HJzka+6GjDimj6F+tOU1fdUzG1 +OClgFtVYyxOPMxrX/lxyTJtfcpaRr4P1SoBdjCy5KMQoXo/a/xC4VzI/Qk55Sy3vCq8 EezQ== 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=R+3dIiRyHP1fioKsYuh/dXRSLNmOYtxcUdsY0xfFPLo=; b=K+vHJ1YMT6SkMtZWdFDzkKl1Inn79FehtJH2eBCsqo+QS+VzvEePlG+nH7TfayEn8k m25rrBPZr8xcyua1A2m/NX3u/fLiQx8VJ2EdK8BXog8u2lU1OtKVo3Ts9FrjJzfDiVfn 8zvx3tmCXRU8EA1rvp+SUo503CY1RNMwFLdVUmuqitHEcsLKe8zIg7X/ra6QtcLeDld5 FUMA1xXBLXYG2muNq7MoJIF7yl+M2PuyO4VkeEmdFI4/uZ8wpM0PF/1EDVwbPsjxXccC 2mefWepwTU8/94kc5To6A7lA43u4OPLlg+x6O/TJ+TcKHqSS45wcLHAKcAHUui4jXACy Ipag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=amPbMbni; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si3880229plt.183.2018.07.18.15.01.01; Wed, 18 Jul 2018 15:01:16 -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=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=amPbMbni; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729251AbeGRWkW (ORCPT + 99 others); Wed, 18 Jul 2018 18:40:22 -0400 Received: from mail-yb0-f193.google.com ([209.85.213.193]:35219 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbeGRWkW (ORCPT ); Wed, 18 Jul 2018 18:40:22 -0400 Received: by mail-yb0-f193.google.com with SMTP id x15-v6so2475965ybm.2 for ; Wed, 18 Jul 2018 15:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=R+3dIiRyHP1fioKsYuh/dXRSLNmOYtxcUdsY0xfFPLo=; b=amPbMbni5KHTRvpPS5NjL05oE2UvGrywukrjUnj2kEd1CfT5OTDljNtSSvCfP39OrS O4sbirpnCMUqYoU8wJY8VLnmXdSGyaUyaSMTTJcXwdAp2WHXplAv2sdsmocf7252eDnF SoWrKGLI7Q0ru8aGPL06iXNRLMd8c3GtKvrKFvFMuMKY8JYWog6UDSEW/juvJ+8PP6Jr 9e0TxBrVWZQtgcQ/853DK51pdsVde684uEXBSt6GYuY+1cMcnLAMCukDPLbJk+26fqCd vretef6I9vYmh6e1wi09Ef6DufqmFzbg2MzYFIx90It9aMVasokYwyA2zP1WkHgmlYkT nCkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=R+3dIiRyHP1fioKsYuh/dXRSLNmOYtxcUdsY0xfFPLo=; b=duDKfhJ8EUVKyeCl9Wq3+liwJfXnswHEh1z6hX8zqKAwyuW0DjcVpNZVDYqQYbGxXS t1saEeH/eqWeFfsyNgjHstp7e2FDGCH9eWW4vjTD29q6N+E2vuyMQ1sDJmZvvwVRGwiD 0v7gc0lZk5fMMPhqoeA8WBB+evg7TxPWGYTja4QAhp7BrhY93djU7E4YXuQNqjQRptb2 aCweM8n26DO1H4lJ0Fi+f5tNhQoMFG5pU4rElMgVgK6+7Cr6zF2pIcbkQM7mB0/MdjSM e3kZokHmNUkHxDpevVA9DxuT0e2/vmpvzIZco6QdwkqePsMeWvF9YZIEZfYEXOMon9K/ Zotg== X-Gm-Message-State: AOUpUlERqJdU4BWqbOmIOzjV/7iYIaMohvzhtd1peZavNShmreZzKwNK wU4nrgyilht9+XSjjzkfhMo83g== X-Received: by 2002:a25:35c4:: with SMTP id c187-v6mr4150126yba.283.1531951224802; Wed, 18 Jul 2018 15:00:24 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::2:7eca]) by smtp.gmail.com with ESMTPSA id x7-v6sm5095464ywd.43.2018.07.18.15.00.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Jul 2018 15:00:23 -0700 (PDT) Date: Wed, 18 Jul 2018 18:03:10 -0400 From: Johannes Weiner To: Peter Zijlstra 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: <20180718220310.GD2838@cmpxchg.org> References: <20180712172942.10094-1-hannes@cmpxchg.org> <20180712172942.10094-9-hannes@cmpxchg.org> <20180717142157.GF2494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180717142157.GF2494@hirez.programming.kicks-ass.net> 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 Tue, Jul 17, 2018 at 04:21:57PM +0200, Peter Zijlstra wrote: > On Thu, Jul 12, 2018 at 01:29:40PM -0400, Johannes Weiner wrote: > > diff --git a/include/linux/sched/stat.h b/include/linux/sched/stat.h > > index 04f1321d14c4..ac39435d1521 100644 > > --- a/include/linux/sched/stat.h > > +++ b/include/linux/sched/stat.h > > @@ -28,10 +28,14 @@ static inline int sched_info_on(void) > > return 1; > > #elif defined(CONFIG_TASK_DELAY_ACCT) > > extern int delayacct_on; > > + if (delayacct_on) > > + return 1; > > +#elif defined(CONFIG_PSI) > > + extern int psi_disabled; > > + if (!psi_disabled) > > + return 1; > > #endif > > + return 0; > > } > > Doesn't that want to be something like: > > static inline bool sched_info_on(void) > { > #ifdef CONFIG_SCHEDSTAT > return true; > #else /* !SCHEDSTAT */ > #ifdef CONFIG_TASK_DELAY_ACCT > extern int delayacct_on; > if (delayacct_on) > return true; > #endif /* DELAYACCT */ > #ifdef CONFIG_PSI > extern int psi_disabled; > if (!psi_disabled) > return true; > #endif > return false; > #endif /* !SCHEDSTATE */ > } > > Such that if you build a TASK_DELAY_ACCT && PSI kernel, and boot with > nodelayacct, you still get sched_info_on(). You're right, that was a brainfart on my end. But as you point out in the other email, the SCHED_INFO dependency is artificial, so I'll rework this entire part.