All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olsson John <john.olsson-zlDGZTLOEuz3oGB3hsPCZA@public.gmane.org>
To: "Michal Koutný" <mkoutny-IBi9RG/b67k@public.gmane.org>
Cc: "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: RE: [EXTERNAL] Re: Split process across multiple schedulers?
Date: Tue, 15 Mar 2022 08:19:26 +0000	[thread overview]
Message-ID: <bf2ea0888a9e45d3aafe412f0094cf86@saabgroup.com> (raw)
In-Reply-To: <20220314164332.GA20424-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>

Thank you for your pointers Michal! :)


> Are you missing CONFIG_RT_GROUP_SCHED and v1 cpu controller's
> cpu.rt_{runtime,period}_us? (Just asking, you didn't mention this
> explicitly in your e-mail but it sounds so and it's a thing that's
> indeed missing in v2.)

I'm not sure. I have to double check. If I'm indeed missing
CONFIG_RT_GROUP_SCHED I'll let you know. ;)


> sched_setscheduler(2) applies to threads regardless of cgroup
> membership, there's no change between v1 and v2.

If I'm understanding you correctly this effectively means that it is
possible to spread a process and its threads across multiple cgroups
that in turn may have different schedulers (and CPU affinity)
associated with them?


> (Without CONFIG_RT_GROUP_SCHED all RT threads are effectively in the
> root cgroup.)

Interesting! I have missed this little tidbit of information. This is
indeed very good to know!

A side effect of this is that in V2 you can't have an RT thread pinned
to a specific core that is evacuated, right? If you could do this it
would also be possible to remove the portion of the scheduling
interval that is left for non-RT threads in the cgroup config since
there would not be any other threads on this evacuated core. By doing
that you would eliminate jitter due to that otherwise the scheduler
would interrupt the RT thread and immediately re-schedule it
again. And thus you would theoretically get very good RT properties
(unless you make system calls).

Now one could argue that there is no point in having a pinned RT
thread on a single core that is evacuated, but that means that the
thread would be interrupted HZ times per second. If you instead used
FIFO scheduling (which handles RT threads only, right?) then you could
eliminate this noise. Or I am just showing off how little I understand
about scheduling in Linux. ;)


> You may need to enable threaded mode on v2 (see cgroup.type) to
> manipulate with individual threads across cgroups. (E.g. if you want
> to use cpuset controller to pin/restrict individual threads.)

I'll read up a bit more and try what you suggest. If we have
misunderstood each other I'll contact the mailing list again with more
details. :)


  parent reply	other threads:[~2022-03-15  8:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-14 15:19 Split process across multiple schedulers? Olsson John
     [not found] ` <b5039be462e8492085b6638df2a761ca-zlDGZTLOEuz3oGB3hsPCZA@public.gmane.org>
2022-03-14 16:43   ` Michal Koutný
     [not found]     ` <20220314164332.GA20424-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-03-15  8:19       ` Olsson John [this message]
     [not found]         ` <bf2ea0888a9e45d3aafe412f0094cf86-zlDGZTLOEuz3oGB3hsPCZA@public.gmane.org>
2022-03-15 10:35           ` [EXTERNAL] " Michal Koutný
     [not found]             ` <20220315103553.GA3780-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-03-15 15:49               ` Olsson John
     [not found]                 ` <84e5b8652edd47d29597d499f29753d6-zlDGZTLOEuz3oGB3hsPCZA@public.gmane.org>
2022-03-15 17:33                   ` Michal Koutný
     [not found]                     ` <20220315173329.GB3780-9OudH3eul5jcvrawFnH+a6VXKuFTiq87@public.gmane.org>
2022-03-16  8:17                       ` Olsson John
2022-03-16 16:38   ` Tejun Heo
     [not found]     ` <YjIShE3mwRyNbO53-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-03-16 16:49       ` [EXTERNAL] " Olsson John
     [not found]         ` <e9cac4aba6384c5c91125a9f7d61a4e8-zlDGZTLOEuz3oGB3hsPCZA@public.gmane.org>
2022-03-16 17:32           ` Tejun Heo
     [not found]             ` <YjIfMLG5W2a/E4vX-NiLfg/pYEd1N0TnZuCh8vA@public.gmane.org>
2022-03-17  9:30               ` Olsson John

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=bf2ea0888a9e45d3aafe412f0094cf86@saabgroup.com \
    --to=john.olsson-zldgztloeuz3ogb3hspcza@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mkoutny-IBi9RG/b67k@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.