Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4191123pxk; Tue, 8 Sep 2020 13:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza+STZjn7vfcyLaYDeNG29Vvkmmli538ozgJjHzlajEbwXC/sa5pH1QNBlW0pSPLC0ZOfu X-Received: by 2002:a17:906:abc5:: with SMTP id kq5mr147685ejb.284.1599595564783; Tue, 08 Sep 2020 13:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599595564; cv=none; d=google.com; s=arc-20160816; b=shO2AKvmQObfPWGc1XiFQS3wjE6Q0HhcStrEGopmYUOL3WqhMQJPhgomscRi6lf8vT tz0apzQoHgzqfIVNxYYCWmbA4U2lXkJxMTimYuYJt4Ey9YxNRhfKCb1cuMtWuzKkQPo1 bKV1AWTzPo3hURfovpz0Xr4/3C43/6Rupj007dNKvQ0L+G9cM0UpyArU5PKqN/+07L/w dJuTBvOi6X4JsNuyrbz/52CZz35R0WOeq474OMEf+ZZGe2h25so58V/wVvKhlSsJB8/h /qSfDZCSrDs2Xn7UvgAvaBeg89aM/tQBfvp7ZTOdwsebiLoOKHe1PgxWOGrXs+pXkuWJ oZtA== 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=1iGUDi8ONn9VjZjkYLuOJEScD9hcNtFLtVqX1EcpUIA=; b=qJdMPYpkSoHNOT/9k848B5OiFSalzD4Rw4Kumq//NRuM4L5/Az+5+MLVDm3nRXaNox WMQ1t9deJ3h7Suygs8OUE5RKRUuIfLZp5rlWEQxROEJUb/SCn//us7+qV1nCbWYHo7Kx K9gtokutM17NzhnmmEVjRIGXlPaUaSOxLmXejEqUOXr6PZZ36O3oipLvMr8Nv4Dk/eHk SHm5yIrPjbW0eifJfXk70Zzc4DpS2e2Ei3a7UXKzKGJt/uRA0/yIe0uRlc2Q3Sr+vMZ4 npl5pn7Fs3iyqZPmGxs6dwGO/MTWtaTojHJO84+72IuGIJWlsze1LnNQnwj5xT23DQAx KkBQ== 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 ng3si17762ejb.720.2020.09.08.13.05.41; Tue, 08 Sep 2020 13:06:04 -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 S1732169AbgIHUFH (ORCPT + 99 others); Tue, 8 Sep 2020 16:05:07 -0400 Received: from foss.arm.com ([217.140.110.172]:55426 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730380AbgIHPXJ (ORCPT ); Tue, 8 Sep 2020 11:23:09 -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 745241715; Tue, 8 Sep 2020 08:22:18 -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 599B23F73C; Tue, 8 Sep 2020 08:22:17 -0700 (PDT) Date: Tue, 8 Sep 2020 16:22:15 +0100 From: Qais Yousef To: Phil Auld 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: <20200908152214.d7sjawnmnkytv7vk@e107158-lin.cambridge.arm.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> <20200908131954.GA147026@lorien.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200908131954.GA147026@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 On 09/08/20 09:19, Phil Auld wrote: > 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. I haven't played with that since then tbh. I use BPF every now and then, but rather simplistically. So if I encoutnered such a problem I wouldn't have noticed. > 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. +1 Cheers -- Qais Yousef