linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Realtime tasks and cgroups (cpu.shares)
@ 2017-07-10 12:57 Koehrer Mathias (ETAS/EHE1)
  2017-07-10 13:39 ` John Ogness
  0 siblings, 1 reply; 2+ messages in thread
From: Koehrer Mathias (ETAS/EHE1) @ 2017-07-10 12:57 UTC (permalink / raw)
  To: linux-rt-users

Hi all,

is it possible to combine real time tasks and cgroups (in particular cpu.shares)?
The background of the question is the following:
If a real time task hangs by accident in an endless loop, it blocks the complete access to the system.
One idea could be to reserve a small percentage of the CPU for non real time stuff to
avoid these kind of situations.

Is this possible?

Thanks for any feedback on this topic.

Regards

Mathias

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Realtime tasks and cgroups (cpu.shares)
  2017-07-10 12:57 Realtime tasks and cgroups (cpu.shares) Koehrer Mathias (ETAS/EHE1)
@ 2017-07-10 13:39 ` John Ogness
  0 siblings, 0 replies; 2+ messages in thread
From: John Ogness @ 2017-07-10 13:39 UTC (permalink / raw)
  To: Koehrer Mathias (ETAS/EHE1); +Cc: linux-rt-users

Hi Mathias,

On 2017-07-10, Koehrer Mathias (ETAS/EHE1) <mathias.koehrer@etas.com> wrote:
> is it possible to combine real time tasks and cgroups (in particular
> cpu.shares)? The background of the question is the following:
> If a real time task hangs by accident in an endless loop, it blocks
> the complete access to the system.  One idea could be to reserve a
> small percentage of the CPU for non real time stuff to avoid these
> kind of situations.

For your particular situation, that is what the following proc-settings
are for:

   /proc/sys/kernel/sched_rt_period_us
   /proc/sys/kernel/sched_rt_runtime_us

However, be aware that these settings apply collectively to *all*
realtime processes within a period. You need to be certain that a
correctly running system is never in danger of hitting these
deadlines. Otherwise you have crippled your realtime system.

For cgroups, I assume you are referring to CONFIG_CFS_BANDWIDTH. I
expect this would work as well, but personally have no experience using
cgroups in this manner and am not certain that it has no adverse affects
on realtime scheduling.

John Ogness

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-10 13:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10 12:57 Realtime tasks and cgroups (cpu.shares) Koehrer Mathias (ETAS/EHE1)
2017-07-10 13:39 ` John Ogness

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).