Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp526028ybt; Wed, 24 Jun 2020 05:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuvDqIM5zu8Ivqx0fuSyXI0v+6VdqyNx52iXQFg369GMQdYPR5vk1eWLdZNogvZlx6yTwM X-Received: by 2002:a17:906:481b:: with SMTP id w27mr23949219ejq.27.1593000849534; Wed, 24 Jun 2020 05:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593000849; cv=none; d=google.com; s=arc-20160816; b=qmGL9jjC/8nwtDbrhErmVFUKpZcyuh1jjJapwX6eUuNo6rd3ZlqmMjE+maRXcYgiOy 6S0Ws9JmJGJubjyye6idpXTOGXN+Ug/TK3S4D6Yi/CF0XvS1lM1yuJ8h49b2cYiXL9JY pNSbqJsvvc/+5+m2SyzLPzHnWgefGcTUxvHR6hkJ7xWT9Zk134Qhn91+ky6/F8jyM1Xz 1weIs2S4JpLKgt+bhabTW0AXvCbBY5OJ5AEQj9oOCjkZgMS++t+Cec6cdLvXObJ9jQOr tTunilsk+S4NA0CkRcAcHpOdr8k0pVzfRJKVj2G8UwYTTOmen87bWtMWMRZ5nuDpvXXC 3QBg== 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; bh=vV/fzxUshWC5oR47ZDIORAH/Hhf32Xz/YyXwldDz8pQ=; b=GYMGN9Kya1cXyehMe05hu07y3XNaFjAqUmV5JDbvdgxOnE0Lv1cD/LeusGRLgvK4U5 4MQs64/SHvCEbX7xQLk7MiVvC5v4dqlflhdbRzM6ZYQ2kesYjBInfpY2MEZ0EinkFtPh +2qbZrytGRinDAtek8ewd0W4wyzXJbvfdFrga6OHNQ5/+zeVvA09NxAMyo1nTOmomPkW DGSIrviXWrFWMvOu+oXY2MQkaiPuUlHTGC7hwkE9BejMqBJTn4bifw7yHgNoTdWLi52B b6yd6sdvD1VQ1a0g4D7aSi+kMdCL2dFDbYBassp5GYy9p9txn+iQRX+teR4e6NUqvMOr JoOg== ARC-Authentication-Results: i=1; mx.google.com; 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 w4si12817478ejj.300.2020.06.24.05.13.45; Wed, 24 Jun 2020 05:14:09 -0700 (PDT) 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; 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 S2403823AbgFXMK0 (ORCPT + 99 others); Wed, 24 Jun 2020 08:10:26 -0400 Received: from foss.arm.com ([217.140.110.172]:41368 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388522AbgFXMKZ (ORCPT ); Wed, 24 Jun 2020 08:10:25 -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 91C0C1F1; Wed, 24 Jun 2020 05:10:24 -0700 (PDT) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7785C3F6CF; Wed, 24 Jun 2020 05:10:23 -0700 (PDT) Date: Wed, 24 Jun 2020 13:10:21 +0100 From: Qais Yousef To: Phil Auld Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Vincent Guittot , Steven Rostedt , Juri Lelli , Mel Gorman Subject: Re: [PATCH] Sched: Add a tracepoint to track rq->nr_running Message-ID: <20200624121020.a5oijq4aenvhqi62@e107158-lin.cambridge.arm.com> References: <20200619141120.1476-1-pauld@redhat.com> <20200622121746.b43ziyjq2eqsseym@e107158-lin.cambridge.arm.com> <20200623193819.GG83220@lorien.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200623193819.GG83220@lorien.usersys.redhat.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Phil On 06/23/20 15:38, Phil Auld wrote: [...] > > This is a very specific call site, so I guess it looks fine to pass very > > specific info too. > > > > But I think we can do better by just passing struct rq and add a new helper > > sched_trace_rq_nr_running() (see the bottom of fair.c for a similar helper > > functions for tracepoints). > > > > This will allow the user to extract, cpu, nr_running and potentially other info > > while only pass a single argument to the tracepoint. Potentially extending its > > future usefulness. > > I can certainly add a sched_trace_rq_nr_running helper and pass the *rq if > you think that is really important. As I said, this is a very specific call site, so passing specific info should be fine, so not really important. My general view on this (which is influenced by what Peter asked for when we first introduced this) is that it's better to allow a trace point to extract more signals from this specific call site by passing generic info and let the event code/module do what it wants. But the idea behind these tracepoints is that they can evolve when they need to. So I don't think we should hung up on this if it makes things unnecessarily complex. > > I'd prefer to keep the count field though as that is the only way to tell > if this is an add_nr_running or sub_nr_running from looking at a single > trace event. Passing the count field is fine by me... > > I could make it two different tracepoints. Would that be better? To me that > seemed more complicated though. The tooling would need to look at it > different events and there would be more kernel change. ... but splitting the tracepoint doesn't look pretty. If passing the rq and the count is enough for you, I'd vote this is better. If not, then I won't insist into twisting things too much for the sake of it. Thanks -- Qais Yousef