Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8197995rwp; Wed, 19 Jul 2023 06:40:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlGs+u6RGp1/7GQNC+8vmpFvNVBszMFoIl2jsMznpMnR+hqsrNJ8uHSMpL/AXlUAMtky2ueJ X-Received: by 2002:a05:6a20:3d29:b0:134:dc23:1377 with SMTP id y41-20020a056a203d2900b00134dc231377mr2621769pzi.56.1689774014004; Wed, 19 Jul 2023 06:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689774013; cv=none; d=google.com; s=arc-20160816; b=pQqcpo42btOmT7dgppqZV0Kq0T60s9C93tstJsJ4MEa9ipFtwJOInRXn6BaMyQe7Re CdT0ZGT9ZX2ZwYg5F+1/zmPyx5yrrZuKeZANVsLjEwQVBw8b01jpQCJlwlWE9AkR7Wfo KaCZQYIWzHLCqohi1PTJlT/DermukIKnexW2lATCRqf1u0cBjIJdQh4yvgyb9cGjEM84 eiQkak6wZgpbzAkocBGI8FBnytXx6/FiUMa222/87RNYgbzX3yCuz583KasFX5QU97q/ 7YlQGvZnf9bDsr1xti0AwUlMHQ0k1l2Q4lGTpdKQhu4qxXAcjEhLq3Y5keNo8+wa9HTn biQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=fg+Y1qBxW8OKLwtj1ZAj4pbUaT6Rz972AHLCYSHBmEQ=; fh=BVjBkiZX5Jx+cURq8y10XSHjIK4KRHJ7TwPkLCBPrtA=; b=uksf5F6Ru2yxUBqRiIlFuONdKCl1gyUnLadu69vwVDneYb7sRkRo7WSwDTEOb01G9V d+lvak+45M6j9SgT8vMOr6FBnS8m04gtaFlmBPGo+qULK5OamnPy0HExIa6e8/5uiPdh XtgpQJh3YccTZvQdEilRMBD4GH35scbKdu6n+A894M7ig1sU5Fs/tF0AwZ6+BRNa9vZB 9V/eAy5svLO9FlZSXjkmk1QupQ11ExAFCFiu4glJ44pOVkPdQXjQlYdTUqFEv6LElC77 YJ9XHKbzRDx+ebEUwzOZRu85sFEMPeJUmoBkpg18DAozzZI2IJlCPNKU4DRNtQGO5LGo x25g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs64-20020a632843000000b005573ea6ead9si3608482pgb.306.2023.07.19.06.40.01; Wed, 19 Jul 2023 06:40:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230384AbjGSNSB (ORCPT + 99 others); Wed, 19 Jul 2023 09:18:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbjGSNR6 (ORCPT ); Wed, 19 Jul 2023 09:17:58 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 57BAC172A; Wed, 19 Jul 2023 06:17:51 -0700 (PDT) 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 3486B2F4; Wed, 19 Jul 2023 06:18:34 -0700 (PDT) Received: from [10.57.31.26] (unknown [10.57.31.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D3C2A3F6C4; Wed, 19 Jul 2023 06:17:47 -0700 (PDT) Message-ID: <42118979-5f86-75df-72a5-e5fc8592eb82@arm.com> Date: Wed, 19 Jul 2023 14:18:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [RESEND][PATCH v2 1/3] sched/tp: Add new tracepoint to track uclamp set from user-space Content-Language: en-US To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, rafael@kernel.org, linux-pm@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, delyank@fb.com, qyousef@google.com, Qais Yousef References: <20230522145702.2419654-1-lukasz.luba@arm.com> <20230522145702.2419654-2-lukasz.luba@arm.com> <20230531182629.nztie5rwhjl53v3d@airbuntu> <20230706111443.GH2833176@hirez.programming.kicks-ass.net> From: Lukasz Luba In-Reply-To: <20230706111443.GH2833176@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/6/23 12:14, Peter Zijlstra wrote: > On Wed, May 31, 2023 at 07:26:29PM +0100, Qais Yousef wrote: >> On 05/22/23 15:57, Lukasz Luba wrote: >>> The user-space can set uclamp value for a given task. It impacts task >>> placement decisions made by the scheduler. This is very useful information >>> and helps to understand the system behavior or track improvements in >>> middleware and applications which start using uclamp mechanisms and report >>> better performance in tests. >> >> Do you mind adding a generic one instead please? And explain why we can't just >> attach to the syscall via kprobes? I think you want to bypass the permission >> checks, so maybe a generic tracepoint after that might be justifiable? >> Then anyone can use it to track how userspace has changed any attributes for >> a task, not just uclamp. > > Yeah, so I'm leaning towards the same, if you want to put a tracepoint > in __sched_setscheduler(), just trace the whole attr and leave it at > that: > > trace_update_sched_attr_tp(p, attr); > > or somesuch. > OK, fair enough, I'll do that. Thanks Peter! (I'm sorry for the delay, I was on vacation) Lukasz