Moode Forum

Full Version: On choosing the 64-bit kernel vs the 32-bit kernel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
<tl;dr> Don't select the 64-bit kernel, especially if you are a new moOde user

<verbosity>

The moOde player is built on Linux. Because we target only Raspberry Pi boards, the flavor of Linux we use is the Raspberry Pi OS (formerly known as Raspbian), which includes a number of changes necessary to run in the RPi hardware. Like all Unix/Linux-based systems, moOde comes with its code partitioned into two major components: 
  • the kernel code which runs at a highly privileged level of hardware protection in its own restricted memory space and which has direct access to the hardware.
  • the userland code which runs in a least privileged mode outside the kernel code and which has access to the hardware through the Linux APIs to its device drivers.
In the distributed moOde disk image, the kernel code is contained in the boot filesystem in the first, "boot" partition while the userland code is contained in the root filesystem in the second, "rootfs" partition. [Nothing magical about "boot" and "rootfs" here, they are just labels.]

From the beginning, the Raspberry Pi OS---kernel and all---has been available only as a 32-bit distribution so that it can run on every model of RPI ever made.

This 32-bit Raspberry Pi OS works fine and the 32-bit moOde player built on it works fine with it. Full stop.

A year ago, a Raspberry Pi Foundation engineer (username "dom") made a 64-bit kernel available for testing with the recent RPi models which can run it. In his words, "[T]his is for bleeding edge testers." Subsequently, Tim added the choice of 32-bit vs 64-bit kernel as a "testing" option in moOde's System Config.

Pay attention here: this is a 64-bit kernel but everything in the userland code is still 32-bit code. There are only marginal advantages (and disadvantages) to this combination which typically show up clearly only in specific unit tests which only a bithead could love. 

In general, all the 32-bit userland code in moOde has proved to run without issue on the 64-bit kernel but exceptions keep crawling out of the woodwork. This is why we consider the choice of the 64-bit kernel to be a testing option. 

A key component of moOde called MPD (Music Player Daemon) appears to be one of the exceptions. A number of recent issues posted to this forum have been traced to MPD sometimes dying but only when running on the 64-bit kernel. We don't know yet why this is occurring.

There is movement in the Raspberry Pi Foundation toward a full 64-bit Raspberry Pi OS, meaning both kernel and userland code. A beta test version was made available in May and as of today it remains in beta as bugs continue to be stomped out. There is not yet even a beta test version of a 64-bit Raspberry Pi OS Lite, which would be the basis of a 64-bit moOde player.

There is light at the end of the tunnel. On an experimental basis, I created my own version of what I thought a 64-bit Raspberry Pi OS Lite would be and then liberally interpreted the moOde build recipe to create in it what I call a "64-bit clean" moOde. I had to leave off a couple of features (until I can understand how to work them in 64-bits) but so far the result seems to be working. No, it hasn't been tested thoroughly enough to see if the MPD issue recurs.

This was strictly a manual effort and won't be made available to others. Once the Raspberry Pi Foundation releases an official 64-bit Raspberry Pi OS Lite, we'll create and test an appropriate build recipe and builder scripts.

It isn't obvious to me that a listener will ever be able to detect the difference between a 32-bit version and a 64-bit version of moOde but eventually you'll have the choice.

</verbosity>

So, to amend my lead, don't select the 64-bit kernel or at least not unless you know you are a tester.

Regards,
Kent

PS - it remains necessary for vendors of RPi Hats to make sure that 64-bit versions of their software drivers are available.
Well said Kent.
Not sure if you seen my post in another thread.

I have been using the 64-bit kernel, MPD 0.22~git (test) with the input_cache on my RaspDac mini kit (pi 3b+) since July with no problems.
(10-13-2020, 11:55 AM)kit1cat Wrote: [ -> ]Not sure if you seen my post in another thread.

I have been using the 64-bit kernel, MPD 0.22~git (test) with the input_cache on my RaspDac mini kit (pi 3b+) since July with no problems.

Sure, and it's working for me too, but that's not what this thread is about.
(10-13-2020, 01:25 PM)TheOldPresbyope Wrote: [ -> ]
(10-13-2020, 11:55 AM)kit1cat Wrote: [ -> ]Not sure if you seen my post in another thread.

I have been using the 64-bit kernel, MPD 0.22~git (test) with the input_cache on my RaspDac mini kit (pi 3b+) since July with no problems.

Sure, and it's working for me too, but that's not what this thread is about.

Ah, should have looked up the meaning of the word verbosity before replying.  Big Grin
Maybe I should have said "bloviation"? I've been accused of both and not without cause  Tongue
(10-13-2020, 05:59 PM)TheOldPresbyope Wrote: [ -> ]Maybe I should have said "bloviation"? I've been accused of both and not without cause  Tongue

We hear a fair bit of that here in UK  Smile
(10-13-2020, 06:38 PM)kit1cat Wrote: [ -> ]
(10-13-2020, 05:59 PM)TheOldPresbyope Wrote: [ -> ]Maybe I should have said "bloviation"? I've been accused of both and not without cause  Tongue

We hear a fair bit of that here in UK  Smile

Never, in the field of human oration, have so many words been said, by so many people, to say so little.
(10-13-2020, 07:13 PM)the_bertrum Wrote: [ -> ]Never, in the field of human oration, have so many words been said, by so many people, to say so little.
So you're reading these all aloud then?
(10-13-2020, 11:07 PM)seashell Wrote: [ -> ]
(10-13-2020, 07:13 PM)the_bertrum Wrote: [ -> ]Never, in the field of human oration, have so many words been said, by so many people, to say so little.
So you're reading these all aloud then?

Aloud is allowed... Smile
Pages: 1 2