Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3073714pxk; Mon, 7 Sep 2020 02:20:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGc3w5ZfzXYOvZh1zuWOQHE//rsnqC0alrNwjue1duQk1oSBVR4tfnOJZYRydS9Y/cf2dR X-Received: by 2002:a17:906:a101:: with SMTP id t1mr737054ejy.203.1599470442438; Mon, 07 Sep 2020 02:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599470442; cv=none; d=google.com; s=arc-20160816; b=pLfXX8cNyRN7Z+p/OhQvhZMWKpfp6ZGBoLH02TyfW3vG9jybOZXrKT1elBvEFxS6CI AmTmEDc6IWUc6FdUqYtqHaU54laoG6PkULMG5wr9Kker7rLyjSTdReVVx27hmhmVse9t X2dhtokbmtt3TKMDZdE6tuffkbnCHRKIw9klLSlioPfkh0sTg9mHhzRu5ADVWuwx8t43 hcvgtxp5X/vB8WGeju8Me1IlAsKvk7RX+k4e5orh1rUphhX/QLWKKP4yM0q8Pr45r4ST YexBT/RTpPh9TzmimrP+VSZPg4fth/tS/Oicf5bR286x8vvu6pqanrEpkOv2nReVcfun ooNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=fAdkYTuWakRe4Txxo2nX6aE5mm6sJ5e7O4DDAoNjQ4s=; b=YRlYpuQTLZ7aX0msJYe31ICrD0Hl0I4XhQkJ22o33dOAiJ9Cv064fir3f6L/ZDGevZ afBRMOrYuMdppNiEoHriBY6k5FdVUIQUKqCzFKzaUxWSlceo0zlCUMwAygj/g9r38itW 06dYrGBjQrOV7zBiD6XJFCZ7fLIQeN7VHNt/kpDEC/H9apZRSKCidTgnGZs9G/jT4rRx 5+mCgstzL5BwbbS2+bhwJ+4ARV5i8p/JPi0EhvVvh2YzgF6CxfCxJF50BeEYL6wZ+Xfg cWOH3wBSDfvMsTC7bkftpTGHqoG+J4DygFGj9MjsPRqG+OkcL6hL3koUWrT9OHm3Vl73 8xeQ== 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 k3si10650626eds.225.2020.09.07.02.20.20; Mon, 07 Sep 2020 02:20:42 -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 S1728316AbgIGJRa (ORCPT + 99 others); Mon, 7 Sep 2020 05:17:30 -0400 Received: from foss.arm.com ([217.140.110.172]:58352 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728173AbgIGJRY (ORCPT ); Mon, 7 Sep 2020 05:17:24 -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 6006BD6E; Mon, 7 Sep 2020 02:17:23 -0700 (PDT) Received: from dell3630.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EE1A93F66E; Mon, 7 Sep 2020 02:17:21 -0700 (PDT) From: Dietmar Eggemann To: Peter Zijlstra , Ingo Molnar Cc: linux-kernel@vger.kernel.org, Vincent Guittot , Steven Rostedt , Qais Yousef , Phil Auld , Vincent Donnefort Subject: [PATCH 0/3] Remove sched_trace_*() helper functions Date: Mon, 7 Sep 2020 11:17:14 +0200 Message-Id: <20200907091717.26116-1-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ("sched/debug: Add new tracepoint to track cpu_capacity") https://lkml.kernel.org/r/1598605249-72651-1-git-send-email-vincent.donnefort@arm.com revealed the issue that with every tracepoint in the scheduler code there are sched_trace_*() helper functions in fair.c appearing which are exported via include/linux/sched.h. Those tracepoints can be used to build tracepoint-to traceevent (tp-2-te) converters. The sched_trace_*() helper functions provide access to data of internal scheduler structures, like struct rq. They support built-in or kernel module builds outside kernel/sched/. But they don't have to be maintained in the scheduler code. kernel/sched/ is the natural place for a tp-2-te converter to get access to data of internal scheduler structures. In case a tp-2-te converter has to be build outside the kernel code tree there is an easy way to make kernel/sched/sched.h visible. See header of "sched/fair: Remove sched_trace_*() helper functions" for details. The first patch removes those sched_trace_*() helper functions from the scheduler. The second patch removes cfs_rq_tg_path() from the scheduler since it can be coded inside a tp-2-te converter as well. The third patch allows to use autogroup_path() from within a tp-2-te converter (i.e. from cfs_rq_tg_path()) in kernel modules builds. The aim of tracepoints in the scheduler code is to keep the footprint of traceing code as small as possible and to not guarantee any stable ABI in relation to internal scheduler structures. Dietmar Eggemann (3): sched/fair: Remove sched_trace_*() helper functions sched/fair: Remove cfs_rq_tg_path() sched/autogroup: Change autogroup_path() into a static inline function include/linux/sched.h | 13 ----- kernel/sched/autogroup.c | 8 --- kernel/sched/autogroup.h | 8 ++- kernel/sched/fair.c | 105 --------------------------------------- kernel/sched/sched.h | 3 -- 5 files changed, 7 insertions(+), 130 deletions(-) -- 2.17.1