Re: Context switch latency in tickless isolated CPU

From: GeHao Kang
Date: Wed Aug 17 2016 - 23:25:39 EST


Hi Chris,

Thanks for your reply.

Is the increased time fixed in each context switch? Because this increased time
will be the latency of the real time application, we hope to confirm it.
Thanks.


Regards,
- Kang



On Wed, Aug 17, 2016 at 8:18 PM, Chris Metcalf <cmetcalf@xxxxxxxxxxxx> wrote:
> On 8/17/2016 2:26 AM, GeHao Kang wrote:
>>
>> To investigate the cause, I use the kernel event tracer to find out
>> the events, user_enter and user_exit, of context_tracking would happen
>> on tickless isolated CPU. These two events means that this CPU enters
>> and exits the RCU extended quiescent state. Besides, the execution
>> time of these two events are 3us and 2us,
>> which are measured by ktime. Is this the reason why the context switch
>> has higher
>> latency on the tickless isolated CPU?
>
>
> The increased context switch time is likely from the increased
> time to return from the kernel to userspace, due to ensuring
> that various things in the kernel are quiesced.
>
> Of course I'm sure it goes without saying that context switch
> time is probably near the absolute bottom of things that
> we care about as a metric for task isolation, since when you
> are using it as designed, you never actually context switch.
> But that said, it's always good to quantify what the overheads
> are, so thanks.
>
> --
> Chris Metcalf, Mellanox Technologies
> http://www.mellanox.com
>