Thank you for your donation!


From plain Debian + Jack2 + MPD to Moode: doubts
#11
(08-18-2020, 10:58 AM)jonners Wrote: It looks as if Moode 7 may have some of what you are looking for: http://moodeaudio.org/forum/showthread.php?tid=2856

Love this one here!
Reply
#12
(08-21-2020, 12:28 PM)roberto.pierpaoli Wrote:
(08-21-2020, 05:11 AM)swizzle Wrote: The 64-bit kernel already has preempt-rt applied.

Thanks for pointing this out.
So the 64-bit image is enabled for real-time/low-latency out-of-the-box, is it?
Are there processes using the real-time scheduling policy in Moode per your knowledge?

The 64-bit kernel is a configurable option rather than a separate image.

Traditionally certain privileged threads weren’t interruptible which could cause latency spikes if they didn’t finish before the scheduler wanted to switch to another process. The preempt-rt patch allows these threads to be preempted which lowers the latency of thread switching. All processes are affected by the way the scheduler works without anything needing to be done to them. Things like the rt threads used by mpd were an attempt to mitigate the uncertainty of the traditional behavior, it’s unlikely they cause any harm when everything is preempt-able but afaik shouldn’t be needed.
Reply
#13
(08-21-2020, 12:28 PM)roberto.pierpaoli Wrote:
(08-21-2020, 05:11 AM)swizzle Wrote: The 64-bit kernel already has preempt-rt applied.

Thanks for pointing this out.
So the 64-bit image is enabled for real-time/low-latency out-of-the-box, is it?
Are there processes using the real-time scheduling policy in Moode per your knowledge?

Not preempt-rt but preempt.

Below are the preempt related compile options that are used for 32 and 64 bit raspberry pi kernels.

The 32 bit kernels are compiled with CONFIG_PREEMPT_VOLUNTARY=y
Code:
pi@rp3:~ $ uname -a
Linux rp3 5.4.49-v7+ #1323 SMP Fri Jun 26 14:34:26 BST 2020 armv7l GNU/Linux
pi@rp3:~ $ sudo modprobe configs
pi@rp3:~ $ zcat /proc/config.gz | grep PREEMPT
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_PREEMPTIRQ_TRACEPOINTS=y
# CONFIG_PREEMPTIRQ_EVENTS is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set

The 64-bit kernels are compiled with CONFIG_PREEMPT=y
Code:
pi@rp3:~ $ uname -a
Linux rp3 5.4.49-v8+ #1323 SMP PREEMPT Fri Jun 26 14:47:11 BST 2020 aarch64 GNU/Linux
pi@rp3:~ $ sudo modprobe configs
pi@rp3:~ $ zcat /proc/config.gz | grep PREEMPT
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_RCU=y
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_DEBUG_PREEMPT=y
CONFIG_PREEMPTIRQ_TRACEPOINTS=y
# CONFIG_PREEMPTIRQ_EVENTS is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set

Article on Linux kernel preemptive scheduling
https://www.codeblueprint.co.uk/2019/12/...ghput.html

MPD will use "real-time" prioritization and scheduling policies if they are available in the kernel.
https://www.musicpd.org/doc/html/user.ht...scheduling

Below shows CONFIG_RT_GROUP_SCHED is not set (disabled). This is for both 32 and 64-bit kernels.
Code:
pi@rp3:~ $ zcat /proc/config.gz | grep CONFIG_RT_GROUP_SCHED
# CONFIG_RT_GROUP_SCHED is not set
pi@rp3:~ $ zgrep ^CONFIG_RT_GROUP_SCHED /proc/config.gz
pi@rp3:~ $

Process status for MPD showing use of RT scheduler priorities and policies for certain threads
Code:
pi@rp3:~ $ ps H -q `pidof -s mpd` -o 'pid,tid,cls,rtprio,comm'
 PID   TID CLS RTPRIO COMMAND
1216  1216  TS      - mpd
1216  1220  TS      - io
1216  1221  FF     50 rtio
1216  1442  TS      - player
1216  1443  TS      - decoder:faad
1216  1485  FF     50 output:ALSA def
Reply


Forum Jump: