From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78A86C4363A for ; Thu, 29 Oct 2020 17:56:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 107B620790 for ; Thu, 29 Oct 2020 17:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgJ2R4S (ORCPT ); Thu, 29 Oct 2020 13:56:18 -0400 Received: from foss.arm.com ([217.140.110.172]:41856 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgJ2R4R (ORCPT ); Thu, 29 Oct 2020 13:56:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2322C139F; Thu, 29 Oct 2020 10:56:17 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0BC9E3F66E; Thu, 29 Oct 2020 10:56:14 -0700 (PDT) References: <20201023101158.088940906@infradead.org> <20201023102347.697960969@infradead.org> <20201029174302.GV2628@hirez.programming.kicks-ass.net> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Peter Zijlstra Cc: tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, bigeasy@linutronix.de, qais.yousef@arm.com, swood@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vincent.donnefort@arm.com, tj@kernel.org, ouwen210@hotmail.com Subject: Re: [PATCH v4 17/19] sched: Add migrate_disable() tracepoints In-reply-to: <20201029174302.GV2628@hirez.programming.kicks-ass.net> Date: Thu, 29 Oct 2020 17:56:12 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/20 17:43, Peter Zijlstra wrote: > On Thu, Oct 29, 2020 at 04:27:26PM +0000, Valentin Schneider wrote: >> Don't you want those directly after the ->migration_disabled write? >> esp. for migrate_enable(), if that preempt_enable() leads to a context >> switch then the disable->enable deltas won't reflect the kernel view. >> >> That delta may indeed include the time it took to run the stopper and >> fix the task's affinity on migrate_enable(), but it could include all >> sorts of other higher-priority tasks. > > I can put them in the preempt_disable() section I suppose, but these > tracers should be looking at task_sched_runtime(), not walltime, and > then the preemption doesn't matter. > True. I was thinking of how to process it downstream, and the first thing that came to mind was that rd->overutilized flag which we do monitor fairly closely; however that is system-wide while migrate_disable() is task-specific. > Also, a distinct lack of actual users atm.. :/ If you'd rather ditch this one altogether until someone asks for it, that also works for me.