Re: [API] How many time to be context-switched?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 27, 2016 9:44 AM, "Ricardo Biehl" <rbpoficial@xxxxxxxxx> wrote:
>
>         As a question I've made on Stackexchange
>         <http://stackoverflow.com/questions/40579919/how-many-time-to-be-context-switched>:
>
> I'm developing a real-time program where scheduler's context-switches
> might interfere its performance.
> ---
> Suppose I need to do many consecutive (but optional) operations (I
> mean I'm able to cancel some of them) of the same type in every
> execution of a timer-oriented signal handler.
> Could I check how much time left until my thread get context-switched?
> [...] and then I can cancel/jump some operations for a better
> performance at all.
>
> If yes, how can I do it (in C code)?
>

If you use SCHED_FIFO, then at the right RT priority level, you should not context switch anyway. Time quantas apply only to regular CFS tasks or when RT throttling is activated.

Also note that interrupts and softirqs cause variability and interruptions no matter what you do or how you schedule.

J.

> Huge thanks!
>
> --
> Ricardo Biehl Pasquali
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux