Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1089977pxa; Fri, 28 Aug 2020 03:28:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKxC4C1SUqjt2nNevlJ3YOygGjNmhYxoI9NLzpun5VSIwuW++uo3SdV9fgkOFazMCkcEL0 X-Received: by 2002:a17:906:1589:: with SMTP id k9mr1023451ejd.115.1598610521571; Fri, 28 Aug 2020 03:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598610521; cv=none; d=google.com; s=arc-20160816; b=KK5wbaaI9UHEk3laCarey6oEPY91l3O9/eHFp2zsOG1szYSBn7U5JitypsLWs2lp7/ iitlYYXMHJvB6X60xjUtwJCAMQxj5/eAiyB1bvNWmyXmytntkBmhZycqmvkRHztyCFVe 1gvQFNmEFZsf5h7nTXYxrD8REb6VOQAD2Gzb0J/9hbbny3uSAem2AqpfZLf11ekyKm4N olsjgtNYNZ3zvKpTAGAcjPoJRW7jtl6o5K1DNUTF0vURV2emqKE4JT+SlFTAsOZMd2dD T7pla5X3QrSWAH6jcYajKmzja9iiYSzjod0hhkjQjmkjzXDbO6Gxa0Mr/+J55M3oPm5y M8fA== 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=UA755l5S7eMdJ6yiWC+aNY8qsoEKhe1/rFAzk/Jg6Gw=; b=XFmucbsXHa3b3OaXU+xBdeRHAxNrz2vNSfAOg/GhEEqHOZJB2AiXstFMzn61PdY/Jf 9qjrPNkhaYLvS21uMkDOiO7YD14HsbKmxLzKoEsuqG9cdsgnwLYKo7YO7eJm4458R93A fLpgnVdkUxc9oqg6Egz/3B35td2LEnh1xoqJJxD+KI3rp+6u57NJ4Vabgp9jX5mE6nZw m99ZrU3WhsTFIGlyYuERdproQ8C3/8JSbqxr3Ufp5aRi+uwNOrK6bbsZjoAp2WoE/nx4 EBCzICnoSnKiGtFcXRuE6VsS8J3QOb3/sPfQh64Re6/vzInegDU9oVjZMrVnWP66XjAm 2/Qw== 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 c1si303369edq.576.2020.08.28.03.28.19; Fri, 28 Aug 2020 03:28:41 -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 S1729053AbgH1K1d (ORCPT + 99 others); Fri, 28 Aug 2020 06:27:33 -0400 Received: from foss.arm.com ([217.140.110.172]:46004 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729039AbgH1K13 (ORCPT ); Fri, 28 Aug 2020 06:27:29 -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 8906331B; Fri, 28 Aug 2020 03:27:28 -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 8A3BB3F68F; Fri, 28 Aug 2020 03:27:27 -0700 (PDT) Date: Fri, 28 Aug 2020 11:27:25 +0100 From: Qais Yousef To: vincent.donnefort@arm.com Cc: mingo@redhat.com, peterz@infradead.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, valentin.schneider@arm.com Subject: Re: [PATCH v2] sched/debug: Add new tracepoint to track cpu_capacity Message-ID: <20200828102724.wmng7p6je2pkc33n@e107158-lin.cambridge.arm.com> References: <1598605249-72651-1-git-send-email-vincent.donnefort@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1598605249-72651-1-git-send-email-vincent.donnefort@arm.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 08/28/20 10:00, vincent.donnefort@arm.com wrote: > From: Vincent Donnefort > > rq->cpu_capacity is a key element in several scheduler parts, such as EAS > task placement and load balancing. Tracking this value enables testing > and/or debugging by a toolkit. > > Signed-off-by: Vincent Donnefort > > diff --git a/include/linux/sched.h b/include/linux/sched.h [...] > +int sched_trace_rq_cpu_capacity(struct rq *rq) > +{ > + return rq ? > +#ifdef CONFIG_SMP > + rq->cpu_capacity > +#else > + SCHED_CAPACITY_SCALE > +#endif > + : -1; > +} > +EXPORT_SYMBOL_GPL(sched_trace_rq_cpu_capacity); > + The placement of this #ifdef looks odd to me. But FWIW Reviewed-by: Qais Yousef Cheers -- Qais Yousef