Re: [PATCH 1/2] Add another clock for use with the soft lockup watchdog.
From: Andrew Morton
Date: Mon Jan 05 2015 - 17:10:08 EST
On Mon, 22 Dec 2014 16:06:03 +1100 Cyril Bur <cyrilbur@xxxxxxxxx> wrote:
> This permits the use of arch specific clocks for which virtualised kernels can
> use their notion of 'running' time, not the elpased wall time which will
> include host execution time.
>
> ...
>
> --- a/kernel/sched/clock.c
> +++ b/kernel/sched/clock.c
> @@ -74,6 +74,20 @@ unsigned long long __weak sched_clock(void)
> }
> EXPORT_SYMBOL_GPL(sched_clock);
>
> +/*
> + * Running clock - returns the time that has elapsed while a guest has been
> + * running.
> + * On a guest this value should be sched_clock minus the time the
> + * guest was suspended by the hypervisor (for any reason).
> + * On bare metal this function should return the same as sched_clock.
> + * Architectures and sub-architectures can override this.
> + */
> +unsigned long long __weak running_clock(void)
> +{
> + return sched_clock();
> +}
> +EXPORT_SYMBOL_GPL(running_clock);
Exporting a weak symbol seems a bit strange, but I guess it will work.
However nothing *uses* this export and it seems unlikely to me that
anything will do so.
So I'm inclined to zap it, OK?
--- a/kernel/sched/clock.c~add-another-clock-for-use-with-the-soft-lockup-watchdog-fix
+++ a/kernel/sched/clock.c
@@ -86,7 +86,6 @@ unsigned long long __weak running_clock(
{
return sched_clock();
}
-EXPORT_SYMBOL_GPL(running_clock);
__read_mostly int sched_clock_running;
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/