linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "Koehrer Mathias \(ETAS\/EHE1\)" <mathias.koehrer@etas.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>
Subject: Re: Realtime tasks and cgroups (cpu.shares)
Date: Mon, 10 Jul 2017 15:39:14 +0200	[thread overview]
Message-ID: <87fue4h0n1.fsf@linutronix.de> (raw)
In-Reply-To: <cb8cd411e19f4039b7edf024b7762041@FE-MBX1012.de.bosch.com> (Koehrer Mathias's message of "Mon, 10 Jul 2017 12:57:05 +0000")

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

      reply	other threads:[~2017-07-10 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-10 12:57 Realtime tasks and cgroups (cpu.shares) Koehrer Mathias (ETAS/EHE1)
2017-07-10 13:39 ` John Ogness [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fue4h0n1.fsf@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mathias.koehrer@etas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).