Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4068052pxk; Tue, 8 Sep 2020 09:51:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmCuiJJV3IHYuspesiEUQGDe/NHDZxlZVx2sif/lfTmNpFdH/mqIECe3Uk+MWg0eJ7hdZ7 X-Received: by 2002:aa7:d144:: with SMTP id r4mr4320694edo.303.1599583894034; Tue, 08 Sep 2020 09:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599583894; cv=none; d=google.com; s=arc-20160816; b=g2/1a2LgT6OfHCt7qleXnt1+fbHqiXBxxinxOK7CnOWYjlTh2t8x42wiIMwLNyhsMf 5d6JBYS4xw80/JJ1egmj2qtSmn5Y5/OKx05VCXd6CPjbViz9T6tmPQ5OqwkiyFWzKmbd V9l1cEDER1VLoCZ3pxC4X+N9k3RpOX2m6g/dWy/Z3chH+ZhLPyByV3gD4uV4goeGOnO1 M6c+S1Pu5qd5eSwxo7cTZQWJcw09Cc3s9F0N4FCrTLJfvVlmVawC+6SFl4PZ6D4NPUCy oesQ19uQlngpZABa3Wpsm1cY4KVpMDOMuFprNyw8BznhjgxpDy6fxW2yu34k401Gybcr WeGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=G4z0R4ULl6ssTJu5oaK+D6sBXkjeMYkO19vzwQBeYp4=; b=He35zLBk6i9A19otOLlISwM1WAlB4GJfeKx3WZdBFEnF1Jw7Otb9LaEhIcp2e5qTYw izJz0XVmyuZtogaufteeOkpDSGxdbQRMcD4Lz8LpEOP6YS0KanfZewq8sQFe4XHFhovh F7icQXIFrYw9/5yYTFR4ZyTh6D1CzZdQUC7u1hAlSHePA4dEAPAbRe4nMokUJ9i9V3jq g8bocfXJZs46clqJyLqe+NDpuRRSw2orB3FtxtT5dyj+KpXOEsAWrFiEuHVwqOZkJ0s4 /JuzAF6nr8ekWtQ40qiNo+Qh+lTEz3C7oaovdXp9qhIGcQVX8BJ2+aSrMDx+HAXsYE+r z7IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XBXhwrse; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si1109773edq.395.2020.09.08.09.51.11; Tue, 08 Sep 2020 09:51:34 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XBXhwrse; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731972AbgIHQrJ (ORCPT + 99 others); Tue, 8 Sep 2020 12:47:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55082 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731949AbgIHQrC (ORCPT ); Tue, 8 Sep 2020 12:47:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599583621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G4z0R4ULl6ssTJu5oaK+D6sBXkjeMYkO19vzwQBeYp4=; b=XBXhwrseid5kTFY29lsZUSLLspVyrUMbZkaWOr+oieCVkFNkv/N4mn/V99px13HQtO8dLk Qq/T+Yc9J9TzqnTaJCYH1n9XKGAKOfAs1v/Xfc48NSU6SbGXUCJH+YUJa5zMKLNDj9zQYq TI0yVWc9RdkKXcvX3Dlq15aOpZfqZss= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-Im3WMzNYN7WVf2AUAgsCtg-1; Tue, 08 Sep 2020 09:19:58 -0400 X-MC-Unique: Im3WMzNYN7WVf2AUAgsCtg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D300810BBED3; Tue, 8 Sep 2020 13:19:56 +0000 (UTC) Received: from lorien.usersys.redhat.com (ovpn-113-114.phx2.redhat.com [10.3.113.114]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED5B027BCB; Tue, 8 Sep 2020 13:19:55 +0000 (UTC) Date: Tue, 8 Sep 2020 09:19:54 -0400 From: Phil Auld To: Qais Yousef Cc: Dietmar Eggemann , vincent.donnefort@arm.com, mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, valentin.schneider@arm.com Subject: Re: [PATCH v2] sched/debug: Add new tracepoint to track cpu_capacity Message-ID: <20200908131954.GA147026@lorien.usersys.redhat.com> References: <1598605249-72651-1-git-send-email-vincent.donnefort@arm.com> <20200828102724.wmng7p6je2pkc33n@e107158-lin.cambridge.arm.com> <1e806d48-fd54-fd86-5b3a-372d9876f360@arm.com> <20200828172658.dxygk7j672gho4ax@e107158-lin.cambridge.arm.com> <58f5d2e8-493b-7ce1-6abd-57705e5ab437@arm.com> <20200902135423.GB93959@lorien.usersys.redhat.com> <20200907110223.gtdgqod2iv2w7xmg@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200907110223.gtdgqod2iv2w7xmg@e107158-lin.cambridge.arm.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Quais, On Mon, Sep 07, 2020 at 12:02:24PM +0100 Qais Yousef wrote: > On 09/02/20 09:54, Phil Auld wrote: > > > > > > I think this decoupling is not necessary. The natural place for those > > > scheduler trace_event based on trace_points extension files is > > > kernel/sched/ and here the internal sched.h can just be included. > > > > > > If someone really wants to build this as an out-of-tree module there is > > > an easy way to make kernel/sched/sched.h visible. > > > > > > > It's not so much that we really _want_ to do this in an external module. > > But we aren't adding more trace events and my (limited) knowledge of > > BPF let me to the conclusion that its raw tracepoint functionality > > requires full events. I didn't see any other way to do it. > > I did have a patch that allowed that. It might be worth trying to upstream it. > It just required a new macro which could be problematic. > > https://github.com/qais-yousef/linux/commit/fb9fea29edb8af327e6b2bf3bc41469a8e66df8b > > With the above I could attach using bpf::RAW_TRACEPOINT mechanism. > Yeah, that could work. I meant there was no way to do it with what was there :) In our initial attempts at using BPF to get at nr_running (which I was not involved in and don't have all the details...) there were issues being able to keep up and losing events. That may have been an implementation issue, but using the module and trace-cmd doesn't have that problem. Hopefully you don't see that using RAW_TRACEPOINTs. Fwiw, I don't think these little helper routines are all that hard to maintain. If something changes in those fields, which seems moderately unlikely at least for many of them, the compiler will complain. And I agree with you about preferring to use the public headers for the module. I think we can work around it though, if needed. Cheers, Phil > Cheers > > -- > Qais Yousef > --