Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.raspberry-pi > #25585 > unrolled thread
| Started by | Folderol <general@musically.me.uk> |
|---|---|
| First post | 2021-01-07 17:26 +0000 |
| Last post | 2021-01-08 22:54 -0500 |
| Articles | 9 on this page of 29 — 13 participants |
Back to article view | Back to comp.sys.raspberry-pi
RT Kernel Folderol <general@musically.me.uk> - 2021-01-07 17:26 +0000
Re: RT Kernel Jim Jackson <jj@franjam.org.uk> - 2021-01-07 19:55 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-07 20:27 +0000
Re: RT Kernel Jim Jackson <jj@franjam.org.uk> - 2021-01-07 20:35 +0000
Re: RT Kernel Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2021-01-08 06:55 +0000
Re: RT Kernel Deloptes <deloptes@gmail.com> - 2021-01-08 09:56 +0100
Re: RT Kernel Ahem A Rivet's Shot <steveo@eircom.net> - 2021-01-08 09:27 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-08 11:16 +0000
Re: RT Kernel Deloptes <deloptes@gmail.com> - 2021-01-08 12:42 +0100
Re: RT Kernel The Natural Philosopher <tnp@invalid.invalid> - 2021-01-08 13:10 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-08 16:28 +0000
Re: RT Kernel Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2021-01-08 18:06 +0000
Re: RT Kernel nospam.Richard.Falken@f1.n770.z6534.fidonet.org (Richard Falken) - 2021-01-08 10:49 +1300
Re: RT Kernel Jim Jackson <jj@franjam.org.uk> - 2021-01-08 18:06 +0000
Re: RT Kernel Scott Alfter <scott@alfter.diespammersdie.us> - 2021-01-08 20:18 +0000
Re: RT Kernel Deloptes <deloptes@gmail.com> - 2021-01-08 21:36 +0100
Re: RT Kernel Scott Alfter <scott@alfter.diespammersdie.us> - 2021-01-10 22:28 +0000
Re: RT Kernel not@telling.you.invalid (Computer Nerd Kev) - 2021-01-08 23:54 +0000
Re: RT Kernel Martin Gregorie <martin@mydomain.invalid> - 2021-01-07 21:56 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-07 22:25 +0000
Re: RT Kernel Martin Gregorie <martin@mydomain.invalid> - 2021-01-07 23:37 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-08 10:35 +0000
Re: RT Kernel Martin Gregorie <martin@mydomain.invalid> - 2021-01-08 11:31 +0000
Re: RT Kernel druck <news@druck.org.uk> - 2021-01-08 20:40 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-09 09:45 +0000
Re: RT Kernel not@telling.you.invalid (Computer Nerd Kev) - 2021-01-08 23:38 +0000
Re: RT Kernel Folderol <general@musically.me.uk> - 2021-01-09 10:05 +0000
Re: RT Kernel Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2021-01-09 17:16 -0500
Re: RT Kernel Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2021-01-08 22:54 -0500
Page 2 of 2 — ← Prev page 1 [2]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2021-01-07 23:37 +0000 |
| Message-ID | <rt85vv$4le$2@dont-email.me> |
| In reply to | #25594 |
On Thu, 07 Jan 2021 22:25:31 +0000, Folderol wrote: > On Thu, 7 Jan 2021 21:56:05 -0000 (UTC) > Martin Gregorie <martin@mydomain.invalid> wrote: > >>On Thu, 07 Jan 2021 17:26:20 +0000, Folderol wrote: >> >>> Does anyone know if it is reasonably easy to get an RT kernel running >>> on the Pi? >>> >>Have you talked to Microware? http://www.microware.com/ >> >>They are in the process of porting OS/9 to the RaspberryPi and >>Beaglebone. >> >>OS-9 was originally implemented on a 6809 and was designed from the >>ground up as a real-time OS rather than a general purpose, multi user >>one, which was how I used it. I ran the 68000 port for several years as >>my main computer. This was on a 68020 system, where it did everything I >>needed for several years (until the hardware collapsed) and I was >>pleasantly surprised by its performance and the lack of bugs in both OS >>and compilers/utilities. >> >>The only thing that moved me off it and onto Linux was the death of its >>hardware. > > I had looked at it when I heard about it, but it would require a *total* > rewrite of Yoshimi, and would no longer be free - so not going to happen > on my watch! Does this mean that OS/9 doesn't have C++ yet? Pity, because its process scheduler beats the crap out of Linux. -- -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | Folderol <general@musically.me.uk> |
|---|---|
| Date | 2021-01-08 10:35 +0000 |
| Message-ID | <20210108103524.7c61053e@devuan> |
| In reply to | #25595 |
On Thu, 7 Jan 2021 23:37:36 -0000 (UTC) Martin Gregorie <martin@mydomain.invalid> wrote: >On Thu, 07 Jan 2021 22:25:31 +0000, Folderol wrote: > >> On Thu, 7 Jan 2021 21:56:05 -0000 (UTC) >> Martin Gregorie <martin@mydomain.invalid> wrote: >> >>>On Thu, 07 Jan 2021 17:26:20 +0000, Folderol wrote: >>> >>>> Does anyone know if it is reasonably easy to get an RT kernel running >>>> on the Pi? >>>> >>>Have you talked to Microware? http://www.microware.com/ >>> >>>They are in the process of porting OS/9 to the RaspberryPi and >>>Beaglebone. >>> >>>OS-9 was originally implemented on a 6809 and was designed from the >>>ground up as a real-time OS rather than a general purpose, multi user >>>one, which was how I used it. I ran the 68000 port for several years as >>>my main computer. This was on a 68020 system, where it did everything I >>>needed for several years (until the hardware collapsed) and I was >>>pleasantly surprised by its performance and the lack of bugs in both OS >>>and compilers/utilities. >>> >>>The only thing that moved me off it and onto Linux was the death of its >>>hardware. >> >> I had looked at it when I heard about it, but it would require a *total* >> rewrite of Yoshimi, and would no longer be free - so not going to happen >> on my watch! > >Does this mean that OS/9 doesn't have C++ yet? >Pity, because its process scheduler beats the crap out of Linux. > It's not that, it's more a matter of all the linux based dependencies, the GUI and the drivers for the Pi GPU. Then there's the theading. Yoshimi uses 4 separate threads. Highest priority for the audio, lowest for the CLI and GUI. -- W J G
[toc] | [prev] | [next] | [standalone]
| From | Martin Gregorie <martin@mydomain.invalid> |
|---|---|
| Date | 2021-01-08 11:31 +0000 |
| Message-ID | <rt9fqa$93r$1@dont-email.me> |
| In reply to | #25601 |
On Fri, 08 Jan 2021 10:35:24 +0000, Folderol wrote: > On Thu, 7 Jan 2021 23:37:36 -0000 (UTC) > Martin Gregorie <martin@mydomain.invalid> wrote: > >>On Thu, 07 Jan 2021 22:25:31 +0000, Folderol wrote: >> >>> On Thu, 7 Jan 2021 21:56:05 -0000 (UTC) >>> Martin Gregorie <martin@mydomain.invalid> wrote: >>> >>>>On Thu, 07 Jan 2021 17:26:20 +0000, Folderol wrote: >>>> >>>>> Does anyone know if it is reasonably easy to get an RT kernel >>>>> running on the Pi? >>>>> >>>>Have you talked to Microware? http://www.microware.com/ >>>> >>>>They are in the process of porting OS/9 to the RaspberryPi and >>>>Beaglebone. >>>> >>>>OS-9 was originally implemented on a 6809 and was designed from the >>>>ground up as a real-time OS rather than a general purpose, multi user >>>>one, which was how I used it. I ran the 68000 port for several years >>>>as my main computer. This was on a 68020 system, where it did >>>>everything I needed for several years (until the hardware collapsed) >>>>and I was pleasantly surprised by its performance and the lack of bugs >>>>in both OS and compilers/utilities. >>>> >>>>The only thing that moved me off it and onto Linux was the death of >>>>its hardware. >>> >>> I had looked at it when I heard about it, but it would require a >>> *total* >>> rewrite of Yoshimi, and would no longer be free - so not going to >>> happen on my watch! >> >>Does this mean that OS/9 doesn't have C++ yet? >>Pity, because its process scheduler beats the crap out of Linux. >> >> > It's not that, it's more a matter of all the linux based dependencies, > the GUI and the drivers for the Pi GPU. Then there's the theading. > Yoshimi uses 4 separate threads. Highest priority for the audio, lowest > for the CLI and GUI. Fair point. -- -- Martin | martin at Gregorie | gregorie dot org
[toc] | [prev] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2021-01-08 20:40 +0000 |
| Message-ID | <rtag0l$6tq$1@dont-email.me> |
| In reply to | #25585 |
On 07/01/2021 17:26, Folderol wrote: > Does anyone know if it is reasonably easy to get an RT kernel running on the Pi? > I'm using devuan beowulf to get a small footprint install *without* either > systemd or pulseaudio. This was the second link in a google search for "Raspberry Pi real time extensions" https://lemariva.com/blog/2019/09/raspberry-pi-4b-preempt-rt-kernel-419y-performance-test ---druck
[toc] | [prev] | [next] | [standalone]
| From | Folderol <general@musically.me.uk> |
|---|---|
| Date | 2021-01-09 09:45 +0000 |
| Message-ID | <20210109094516.7efc7d3c@devuan> |
| In reply to | #25623 |
On Fri, 8 Jan 2021 20:40:51 +0000 druck <news@druck.org.uk> wrote: >On 07/01/2021 17:26, Folderol wrote: >> Does anyone know if it is reasonably easy to get an RT kernel running on the Pi? >> I'm using devuan beowulf to get a small footprint install *without* either >> systemd or pulseaudio. > >This was the second link in a google search for "Raspberry Pi real time >extensions" > >https://lemariva.com/blog/2019/09/raspberry-pi-4b-preempt-rt-kernel-419y-performance-test > >---druck Thanks for that. Very interesting indeed. It seems there is far less difference overall than on Intel/AMD CPUs, and although latency is considerably improved it's at the cost of overall performance. For light to medium amounts of audio processing it's not worth the bother. -- W J G
[toc] | [prev] | [next] | [standalone]
| From | not@telling.you.invalid (Computer Nerd Kev) |
|---|---|
| Date | 2021-01-08 23:38 +0000 |
| Message-ID | <rtaqe6$1q5a$1@gioia.aioe.org> |
| In reply to | #25585 |
Folderol <general@musically.me.uk> wrote: > Does anyone know if it is reasonably easy to get an RT kernel running on the Pi? > I'm using devuan beowulf to get a small footprint install *without* either > systemd or pulseaudio. > > Actually, this is already better than the official OS when running purely with > ALSA. You don't say what you're actually doing. I gather that it's some software audio synth, and I don't know anything about that application. I'm guessing it's probably existing Linux software though, so suggestions such as building for bare-metal or another OS are presumably not worthwhile. There's a lot of info here, though not Pi-specific. Setting CPU frequency scaling to "performance" was important for my application (I also needed to disable video output on HDMI/Composite): https://wiki.linuxaudio.org/wiki/system_configuration Real-Time patches for the Linux Kernel: PREEMPT_RT: https://wiki.linuxfoundation.org/realtime/start Xenomai RTAI There is a PREEMPT_RT patched Linux distro for the Pi (this one worked alright for me on a Pi Zero and seems to be fairly actively developed, there might be others that I've forgotten about): https://guysoft.wordpress.com/2017/10/09/realtimepi/ When I say "worked alright", I mean that it booted and probably did everything that could be expected from it. Fiddling with the scheduler settings and process priority still wasn't enough to prevent _any_ task switching by the scheduler during the timing-critical part of the code I was trying to run. Either PREEMPT_RT or one of the other projects had some special calls that controlled the kernel at a deeper level from user-space, but the documentation was too light for me to really figure it out. Projects such as LinuxCNC are possibly optimised for the real-time Linux kernel in more advanced ways that I couldn't figure out myself. In Debian/Devuan it may be possible to install a pre-built Real-Time patched kernel as a package, depending on which Pi model you're using (more details in these questions please!). Based on this page: https://wiki.debian.org/RaspberryPi This should work on the Pi3: https://packages.debian.org/buster/kernel/linux-image-4.19.0-8-rt-arm64 And this with the Pi2: https://packages.debian.org/buster/kernel/linux-image-4.19.0-12-rt-armmp It doesn't look like there's a PREEMPT_RT armel package to suit the Pi 1 and Pi Zero. I'm not sure which Debian arch. the Pi4 is compatible with (arm64, like the Pi3?). [you can probably ignore the rest if you are trying to run audio software, because I doubt it will work] It's also possible on the Pi to disable all the system interrupts from user-space (newest versions of the example code are later in the thread): https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=52393 I used a variation of that, where before disbling the interrupts and starting the protected bit of code, I checked that there weren't any "tick" interrupts due before it would be finished. That at the very least keeps the system clock accurate, if not also preventing other problems. RPi OS's default dwc_otg USB driver written by the Pi Foundation crashes when the FIQ (Fast Interrupt) is disabled while USB device is connected (testing on a Pi Zero). At one point there was an undocumented setting to tell it not to use FIQ, but it doesn't seem to work anymore. I'm using the alternative dwc2 driver (an "official" Linux one) which doesn't have that problem. You configure that by adding this line to /boot/config.txt: dtoverlay=dwc2,dr_mode=otg Note that disabling interrupts is probably only a good idea if your program is doing everything you need by itself at that time. I don't imagine that it would work if you're outputting audio through ALSA, or writing to a file, or anything else "Linuxy" at the same time. The "proper" way to disable interrupts is within a linux kernel driver module, using function calls such as local_irq_disable. But you're probably not going to want to split this program you're trying to run into one piece that runs in user-space and another that runs in kernel-space. I've been trying to do that for my application, and as of yesterday have given up for the moment. -- __ __ #_ < |\| |< _#
[toc] | [prev] | [next] | [standalone]
| From | Folderol <general@musically.me.uk> |
|---|---|
| Date | 2021-01-09 10:05 +0000 |
| Message-ID | <20210109100511.770dce5a@devuan> |
| In reply to | #25628 |
On Fri, 8 Jan 2021 23:38:47 +0000 (UTC) not@telling.you.invalid (Computer Nerd Kev) wrote: >Folderol <general@musically.me.uk> wrote: >> Does anyone know if it is reasonably easy to get an RT kernel running on the Pi? >> I'm using devuan beowulf to get a small footprint install *without* either >> systemd or pulseaudio. >> >> Actually, this is already better than the official OS when running purely with >> ALSA. > >You don't say what you're actually doing. I gather that it's some >software audio synth, and I don't know anything about that >application. I'm guessing it's probably existing Linux software >though, so suggestions such as building for bare-metal or another >OS are presumably not worthwhile. > >There's a lot of info here, though not Pi-specific. Setting CPU >frequency scaling to "performance" was important for my application >(I also needed to disable video output on HDMI/Composite): >https://wiki.linuxaudio.org/wiki/system_configuration > >Real-Time patches for the Linux Kernel: >PREEMPT_RT: https://wiki.linuxfoundation.org/realtime/start >Xenomai >RTAI > >There is a PREEMPT_RT patched Linux distro for the Pi (this one >worked alright for me on a Pi Zero and seems to be fairly actively >developed, there might be others that I've forgotten about): >https://guysoft.wordpress.com/2017/10/09/realtimepi/ Thanks for all this further information. It is indeed a software synthesiser, but a very unusual one. Whereas most of these either work on sound samples, or previously generated wavetables, Yoshimi creates everything on-the-fly from mathematical formulae. These can make dynamic changes within individual cycles, resulting in incredibly rich sounds. I do quite a lot of work on the overall structure but don't touch these sound 'engines' - I leave that to those with far better understanding or the mathematics! -- W J G
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2021-01-09 17:16 -0500 |
| Message-ID | <aaakvf9jjhkjk48aat76742k66p075lqrf@4ax.com> |
| In reply to | #25646 |
On Sat, 9 Jan 2021 10:05:11 +0000, Folderol <general@musically.me.uk> declaimed the following: >Thanks for all this further information. >It is indeed a software synthesiser, but a very unusual one. Whereas most of >these either work on sound samples, or previously generated wavetables, Yoshimi >creates everything on-the-fly from mathematical formulae. These can make >dynamic changes within individual cycles, resulting in incredibly rich sounds. > Sounds like something inspired by Casio Phase-Distortion (CZ series in the 80s). While there /was/ a cosine table stored in memory, the system adjusted the "phase" during readout (essentially reading part of the table faster than other parts while keeping the same total cycle time) to change the wave shape of the DCO (a square wave effectively was read the rising part of the curve so fast is looked vertical, then the top so slow it looked flat, fast drop, slow bottom...). https://en.wikipedia.org/wiki/Phase_distortion_synthesis -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
[toc] | [prev] | [next] | [standalone]
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Date | 2021-01-08 22:54 -0500 |
| Message-ID | <22aivfl5r34qasnsu1f9ul9ka1q99qf55v@4ax.com> |
| In reply to | #25585 |
On Thu, 7 Jan 2021 17:26:20 +0000, Folderol <general@musically.me.uk> declaimed the following: >Does anyone know if it is reasonably easy to get an RT kernel running on the Pi? >I'm using devuan beowulf to get a small footprint install *without* either >systemd or pulseaudio. > https://www.raspberrypi.org/forums/viewtopic.php?t=206750 """ This means that if you want to try it out you'll have to build it yourself. The general kernel-building instructions are here: https://www.raspberrypi.org/documentati ... uilding.md You will need to amend the instructions slightly - where it says Code: Select all git clone --depth=1 https://github.com/raspberrypi/linux you will need: Code: Select all git clone --depth=1 https://github.com/raspberrypi/linux -b rpi-4.14.y-rt """ https://www.raspberrypi.org/documentation/linux/kernel/building.md -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.sys.raspberry-pi
csiph-web