From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030827AbcDMKFo (ORCPT ); Wed, 13 Apr 2016 06:05:44 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36371 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030690AbcDMKFm (ORCPT ); Wed, 13 Apr 2016 06:05:42 -0400 Subject: Re: [PATCH] sched/clock: Make local_clock/cpu_clock inline To: Ingo Molnar References: <1459541050-13654-1-git-send-email-daniel.lezcano@linaro.org> <20160413094158.GA6430@gmail.com> <570E1562.8050906@linaro.org> <20160413095107.GD6430@gmail.com> Cc: peterz@infradead.org, Ingo Molnar , "open list:SCHEDULER" From: Daniel Lezcano Message-ID: <570E19F3.10601@linaro.org> Date: Wed, 13 Apr 2016 12:05:39 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160413095107.GD6430@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/13/2016 11:51 AM, Ingo Molnar wrote: > > * Daniel Lezcano wrote: > >> On 04/13/2016 11:41 AM, Ingo Molnar wrote: >>> >>> * Daniel Lezcano wrote: >>> >>>> The local_clock/cpu_clock functions were changed to prevent a double >>>> identical test with sched_clock_cpu() when HAVE_UNSTABLE_SCHED_CLOCK >>>> is set. That resulted in one line functions. >>>> >>>> As these functions are in all the cases one line functions and in the >>>> hot path, it is useful to specify them as static inline in order to >>>> give a strong hint to the compiler. >>>> >>>> After verification, it appears the compiler does not inline them >>>> without this hint. Change those functions to static inline. >>>> >>>> Signed-off-by: Daniel Lezcano >>>> --- >>>> include/linux/sched.h | 32 ++++++++++++++++++++++++++++++-- >>>> kernel/sched/clock.c | 41 ----------------------------------------- >>>> 2 files changed, 30 insertions(+), 43 deletions(-) >>> >>> Hm, this does not seem to apply to v4.6-rc3 cleanly. >> >> Actually I based the patches on top of tip/sched/core. > > This patch does not seem to apply to tip/sched/core either (2b8c41daba32). Ah, yes. I received a compilation error because of a missing EXPORT_SYMBOL_GPL for an inlined function call from kbuild test: ERROR: "sched_clock_cpu" [kernel/torture.ko] undefined! ERROR: "sched_clock_cpu" [drivers/gpu/drm/i915/i915.ko] undefined! So I resent a fixed V2. https://lkml.org/lkml/2016/4/11/603 https://lkml.org/lkml/2016/4/11/602 Sorry, I did not notice you were mentioning the first version which is outdated. The V2 is based on top of 2b8c41daba32. -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog