Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp468224pxh; Tue, 9 Nov 2021 13:42:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWvdfJoDx3lMfiNcm4DmwvXi+e27rXlZGrMBLg7lSolFQftQjJupu3gIPyac8eP0D0WC8X X-Received: by 2002:a92:ca49:: with SMTP id q9mr7853150ilo.49.1636494147745; Tue, 09 Nov 2021 13:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636494147; cv=none; d=google.com; s=arc-20160816; b=ikloLdRSqE4cYrL21JnjdyHhXv+UW56Iqgcijd+BwHIlE+W51plicwGsy5Zjt2z8lI ZZTjemShXZp8Xj3spTmhkLtQpgye6rA81+sPP88xMmNRiEfWJgbm1KMGo4fz21mV6bbi TMHSHmd8G5QEc9sAEYitdGBWuXW3pCXFDh/D/ievLpoxITCPS78Vw7atCM4dpsxWCg0O JYqN7YcXiqZUwDVY/ZS159PTH1KyHdJlk9UIZZJ4I8DlehZoeoeD6GcUI/g1kGnrVKTu gTvsKWBlrFABwkm/L+ot8AzsG7CTNFCqm8+4iBVRiaYdkaOQCt2hQJDViXHz1fRm9YBB 8uqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=w1EOH6FPBwa3M2ymytmOdE7Dwkz35NxpmkwCa2EKnko=; b=NLv0y9ExiPdeCVEmz85shflrh3qeHiPFvngPf34qJEj5Wc6PusEGgX+T5d8pecQcj1 S1BXgSJBx27qvdsrjDQE58AKy+r1YbjvSyIl/CN1aH6jJJHiBokcnrAujme8Mfry1ItS Y/t+5gMy3CSVYWfptLvQUIVNk9/SuL1/1qG4uLQEZ5rK7iPKWpICk3oi30wECXhM3pP+ JmaE1gplkoAcm6CfmjNxzzsot7Er4baMt0A90evFB2/XxPd/AJsSleezCrskjp93UP3n Hj45JMedjIF/OYxvVedKAL9cCTvsm/TeYOvGI/Ip7hy3L9lOXHTukEUnOfpLOvkEf190 8vVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OJJOWDfT; 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 q3si43007356iow.76.2021.11.09.13.42.08; Tue, 09 Nov 2021 13:42:27 -0800 (PST) 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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OJJOWDfT; 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 S245629AbhKILSW (ORCPT + 99 others); Tue, 9 Nov 2021 06:18:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245616AbhKILSV (ORCPT ); Tue, 9 Nov 2021 06:18:21 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DAF0C061764 for ; Tue, 9 Nov 2021 03:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=w1EOH6FPBwa3M2ymytmOdE7Dwkz35NxpmkwCa2EKnko=; b=OJJOWDfTxVYdPuwTP2rFq28Tiv PJOyMuRCOA5fjZK2HdhyJMG1gO6idcNwJVC1mS9khNjjB7FP8elEcGKhWHJfLOLL282yLnKoUf4qb WgHAUKyjuqgW9agKfQWlByUsLZmtw/Je2RFVXA2bK6RK7OUK5sUWmgi7MLOEmAJop81/BkKSjrIL4 6JG0UxZnKF/mpaxFOI7ML39Rx3yPaRu5DZWvl89Y8/rjHqB1lDFY2kqnV3JSHX7XbepEFTablHtJ/ z0MRP3sAOFXLu/2/KM9jO1Q5q1S2DpILsetT3F9lktKWQfrZAS+RqmIT4V5ub3gXg89vKDANViumT jnwM+bLg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkP5r-000yft-VJ; Tue, 09 Nov 2021 11:15:12 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A372F300388; Tue, 9 Nov 2021 12:15:11 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 67258203B736E; Tue, 9 Nov 2021 12:15:11 +0100 (CET) Date: Tue, 9 Nov 2021 12:15:11 +0100 From: Peter Zijlstra To: Josh Don Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Joel Fernandes , Vineeth Pillai , Hao Luo , Tao Zhou , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched/core: forced idle accounting Message-ID: References: <20211018203428.2025792-1-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211018203428.2025792-1-joshdon@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 18, 2021 at 01:34:28PM -0700, Josh Don wrote: > @@ -5804,6 +5830,12 @@ pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) > } > } > > + if (rq->core->core_forceidle_count) { Does this want to be something like: if (schedstat_enabled() && .. ) ? afaict without schedstat on this is dead code. > + if (cookie) > + rq->core->core_forceidle_start = rq_clock(rq->core); > + rq->core->core_forceidle_occupation = occ; > + } > + > rq->core->core_pick_seq = rq->core->core_task_seq; > next = rq->core_pick; > rq->core_sched_seq = rq->core->core_pick_seq;