Re: sched/fair: scheduler not running high priority process on idle cpu
From: Steven Rostedt
Date: Wed Jan 15 2020 - 09:23:17 EST
On Wed, 15 Jan 2020 12:57:10 +0000
David Laight <David.Laight@xxxxxxxxxx> wrote:
> I'm surprised the 'normal case' for tracing function entry isn't done
> in assembler without saving all the registers (etc).
Well, it doesn't save all registers unless you ask it to. It only saves
what the compiler mandates for "fentry" before calling C code.
> For tsc stamps I think it should be possible saving just 3 registers
> in under 32 instructions. Scaling to ns is a bit harder.
> It's a shame the ns scaling isn't left to the reading code.
Well, it could be done, as the ring buffer allows you to post process
timestamps. You could switch to using just tsc:
echo x86-tsc > /sys/kernel/tracing/trace_clock
One reason that we do not post process the scaling to ns is that the
scaling can change over time depending on the clock source, which means
post processing will give you in accurate results. But the
infrastructure is there to do it.
-- Steve