ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Yuriy Al. Shirokov" <yuriy.shirokov@gmail.com>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] JACK, /proc/sys/kernel/sched_rt_runtime_us, CONFIG_RT_GROUP_SCHED
Date: Fri, 8 May 2020 21:35:42 +0300
Message-ID: <CAN=cCgqHqTbzibD0+K7BuYFO9a4CiPMSr3mNhvQD4uuGQBNd=w@mail.gmail.com> (raw)
In-Reply-To: <20200508175300.GL30504@imap.altlinux.org>

пт, 8 мая 2020 г. в 20:53, Michael Shigorin <mike@altlinux.org>:
>> Это лечится командой
>> sudo sysctl -w kernel.sched_rt_runtime_us=-1
>> но вряд ли это штатный способ заставить jackd работать.
> Насколько понимаю, это попросту отключает RT:
...
> this will limit time reserved to realtime
> processes.
...
>   * A run time of -1 specifies runtime == period, ie. no limit.
> --- http://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt

Хм, я понял процитированное (и прочую документацию на RT-возможности
ядра, а также код цепочки вызовов jackd → pthreads → ядро, см. то, что
я пересказываю в теме на форуме) с точностью до наборот — при значении
sched_rt_runtime_us, равном -1 RT-процессы могут отхватить себе любую
долю периода планирования, хоть весь — полностью прекратив исполнение
не-RT процессов.

> Я бы почитал документацию jack -- насколько помню,
> конфигурирование RT всегда было делом барским (root).

Конфигурируется-то понятно от рута. Вопрос и заключается в том, как
конфигурировать.

Я читал документацию jack ещё до того, как создать тему на форуме и
понял её так:
 - если ядро сконфигурировано _без_ CONFIG_RT_GROUP_SCHED=y,
RT-возможности настраиваются через параметр rtprio в
/etc/security/limits.d/ — в нашем джеке это есть «из коробки»;
 - если ядро сконфигурировано _с_ CONFIG_RT_GROUP_SCHED=y (для
текущего std-def это так), RT-возможности делегируются
непривилегированным пользователям через механизм cgroups:
«By default all bandwidth is assigned to the root group and new groups
get the period from /proc/sys/kernel/sched_rt_period_us and a run time
of 0. If you want to assign bandwidth to another group, reduce the
root group's bandwidth and assign some or all of the difference to
another group.

Realtime group scheduling means you have to assign a portion of total
CPU bandwidth to the group before it will accept realtime tasks.
Therefore you will not be able to run realtime tasks as any user other
than root until you have done that, even if the user has the rights to
run processes with realtime priority!»
(из того же https://www.kernel.org/doc/Documentation/scheduler/sched-rt-group.txt).

В документации на jack даже приведён пример конфигурирования через
cgroups! Вот здесь:
https://github.com/jackaudio/jackaudio.github.com/wiki/Cgroups

Есть только одна проблема — в Альте нет ни /etc/cgconfig.conf, ни
/etc/cgrules.conf, ни сервиса cgconfig в systemd. И вообще
документации по рулению cgroups в Альте я ни на вики, ни где-либо ещё
не нашёл.

  reply	other threads:[~2020-05-08 18:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 15:00 Yuriy Al. Shirokov
2020-05-08 17:53 ` Michael Shigorin
2020-05-08 18:35   ` Yuriy Al. Shirokov [this message]
2020-05-09 19:46     ` Yuriy Al. Shirokov
2020-05-09 20:01       ` Michael Shigorin
2020-05-09 20:12         ` Alexey Shabalin
2020-05-09 21:55           ` Yuriy Al. Shirokov
2020-05-09 21:36         ` Yuriy Al. Shirokov
2020-05-11  8:46           ` Anton V. Boyarshinov
2020-05-11  8:39 ` Anton V. Boyarshinov
2020-05-12 16:03 ` Anton V. Boyarshinov
2020-05-21 22:38   ` [Comm] config ядра для работы docker (Was:JACK, /proc/sys/kernel/sched_rt_runtime_us, CONFIG_RT_GROUP_SCHED) Alexey Shabalin
2020-05-21 22:41     ` Alexey Shabalin
2020-05-22  8:31       ` Anton V. Boyarshinov
2020-05-22  8:30     ` Anton V. Boyarshinov

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='CAN=cCgqHqTbzibD0+K7BuYFO9a4CiPMSr3mNhvQD4uuGQBNd=w@mail.gmail.com' \
    --to=yuriy.shirokov@gmail.com \
    --cc=community@lists.altlinux.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

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git