W. H. Heydt
Posts: 9088
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: 64-bit operating system

Thu Oct 18, 2018 1:42 am

ejolson wrote:
Wed Oct 17, 2018 9:07 pm
W. H. Heydt wrote:
Wed Oct 17, 2018 8:47 pm
somehow, don't ask *me* how--there will be a newer version of the Pi0/Pi0W that is also compatible.
What makes the Pi Zero interesting for many is more the small size and low power consumption than the small price. With existing 64-bit SOC packages, where to place the memory becomes a problem unless components are mounted on both sides. With existing 64-bit SOC packages, power consumption is a problem unless all cores are disabled but one and that remaining core is clocked in the sub-gigahertz range. Would anyone be interested in a tiny Pi with one 64-bit ARMv8 core clocked at 700 Mhz, 1GB of memory and a single micro USB port at a price 5 times greater than the current Pi Zero? I think the answer to this question is why Raspbian has remained 32-bit so far.
I think the Pi0/Pi0W are *part* of what is preventing Raspbian from going 64-bit now, but by no means the full reason.

The real issue for upgrading the Pi0/Pi0W is going to be price. On a technical basis, it is probably possible to design a single-core (using, say, the Cortex-A53 like the BCM2837), clock it at or near 1GHz (which the Pi0/Pi0W are now) and keep the TDP in check enough to permit PoP RAM. Even better would be to use some of the tricks that went into the Pi3B+, like using the PCB as a heat sink. If the RAM had to be kept at 512MB to do that, so be it. It's enough for a single-core system. The "gotcha" is...who would ask for such a chip and/or how do you pay for the design work?

I will admit that if someone gifted me with the One True Lottery ticket, I would be sorely temped to walk into Broadcom and say, "This is what I want, and here is a check to cover the full cost of reducing it to manufactiring." Then the cost of the chips would be *just* the manufacturing cost and profit to the fab and Broadcom...which should make it possible to put such a hypothetical chip onto a Pi0/Pi0W board. Anyone got a spare $10 million to $20 million burning a hole in their pocket?

As to price increases... If you take the Pi0 to 5 times current one-off price of $5, you are more expensive than an A+, and at that price, a Pi3A+ should be feasible. At 5 times more than the off-off price of a Pi0W, you've got a board that in more expensive than a Pi3B+. Such price changes would completely alter the decision making process for what board to pick. The *only* places it would make sense to use the 'neo-Pi0"/"neo-Pi0W" would be where small size is *the* critical element and power requirements *might* affect the decision. After all, for many uses, would you rather a single-core 500MB 1GHz that is very small or a slightly to quite significantly cheaper quad-core 1.4GHz (or more) 1GB board that somewhat larger?

Heater
Posts: 10006
Joined: Tue Jul 17, 2012 3:02 pm

Re: 64-bit operating system

Thu Oct 18, 2018 5:57 am

W. H. Heydt,
Anyone got a spare $10 million to $20 million burning a hole in their pocket?
Hmm.... If I had a spare 10 or 20 million annoyingly clogging up my wallet I would be calling SiFive and getting them to build me a Pi like computer using a 64 bit RISC V core or cores. No point in giving my money to Softbank.
Even databases are a stretch. A Pi is able to run a reasonable database.
Yes indeed.
..what does one need to do that actually *needs* to be 64-bit
Hmmm... Count the human population. Can't do that in a teeny tiny 32 bit integer.

User avatar
rpdom
Posts: 12874
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

Re: 64-bit operating system

Thu Oct 18, 2018 6:27 am

Heater wrote:
Thu Oct 18, 2018 5:57 am
Hmmm... Count the human population. Can't do that in a teeny tiny 32 bit integer.
I was using 32 bit integers on an 8 bit machine back in the day. Ok, it may not be as fast as native 32 bit, but it wasn't that inefficient.

32 bit machines can handle integers of any size, given the right code.

jahboater
Posts: 3050
Joined: Wed Feb 04, 2015 6:38 pm

Re: 64-bit operating system

Thu Oct 18, 2018 8:14 am

rpdom wrote:
Thu Oct 18, 2018 6:27 am
Heater wrote:
Thu Oct 18, 2018 5:57 am
Hmmm... Count the human population. Can't do that in a teeny tiny 32 bit integer.
I was using 32 bit integers on an 8 bit machine back in the day. Ok, it may not be as fast as native 32 bit, but it wasn't that inefficient.

32 bit machines can handle integers of any size, given the right code.
That's true.
64-bit integer code (in C/C++ anyway) on the 32-bit OS works absolutely fine for anything you could ever want. Signed and unsigned. Without any special libraries. It is just slow. But for many applications that may not be noticeable.
NEON has some 64-bit integer operations that are available even in 32-bit mode.

The only tiny thing I have noticed that doesn't work is that conversions between double precision floating-point and 64-bit integers do not raise the "inexact" exception when the floating-point number was not an integer, or if the 64-bit integer could not be represented exactly as a double.
This is because on a 64-bit platform there are hardware instructions for the purpose, whereas on 32-bit it is done by a library routine, and math library functions do not set FE_INEXACT.
Not a big deal - most people wont notice.
(Its the same reason why sqrt() correctly sets inexact but cbrt() does not).

Heater
Posts: 10006
Joined: Tue Jul 17, 2012 3:02 pm

Re: 64-bit operating system

Thu Oct 18, 2018 8:54 am

rpdom,
I was using 32 bit integers on an 8 bit machine back in the day.
Me too. It's just a matter of code.

Anecdote: Some years ago I was using openssl to create certificates and keys for a VPN on a 32 bit Linux machine. My certs did not work. After some head scratching I realized I had set an expiry date for 40 years in the future. That date overflowed the Unix timestamp which wraped around to a date in the past. My certs were expired when I made them! Sure enough I could create those certs with the same expiry date on a 64 bit machine. I believe that openssl bug on 32 bit Linux has been fixed since then.

jahboater
Posts: 3050
Joined: Wed Feb 04, 2015 6:38 pm

Re: 64-bit operating system

Thu Oct 18, 2018 8:58 am

32 bits on an 8-bit platform obviously can be done. But I see nowadays they stick to "twice" the natural integer size. So 64-bit integers work on 32-bit platforms and 128-bit integers work on 64-bit platforms (presumably the code is similar) but 128-bit (integers or floats) do not work on 32-bit platforms.
64-bits is plenty for me!

jahboater
Posts: 3050
Joined: Wed Feb 04, 2015 6:38 pm

Re: 64-bit operating system

Thu Oct 18, 2018 9:04 am

Try 10000 ** 10000 in Python3 on the Pi - that's a big number for a 32-bit machine!

Heater
Posts: 10006
Joined: Tue Jul 17, 2012 3:02 pm

Re: 64-bit operating system

Thu Oct 18, 2018 9:29 am

That's a big number for a 64 bit machine!

User avatar
davidcoton
Posts: 3196
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: 64-bit operating system

Thu Oct 18, 2018 7:23 pm

Many years ago, when "state of the art" budget computing was Ti-58 programmable calculator, I wrote a program to calculate perfect numbers with something like 10 times the number of digits that the calculator handled natively. The code was possibly non-trivial, but not that complex. It would have been possible to extend further by using more registers, but finding each new perfect number was taking days of crunching so I didn't bother. The major problem was in verifying the results. :shock: :lol:
"Thanks for saving my life." See https://www.raspberrypi.org/forums/viewtopic.php?p=1327656#p1327656
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”

W. H. Heydt
Posts: 9088
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: 64-bit operating system

Thu Oct 18, 2018 8:29 pm

davidcoton wrote:
Thu Oct 18, 2018 7:23 pm
Many years ago, when "state of the art" budget computing was Ti-58 programmable calculator, I wrote a program to calculate perfect numbers with something like 10 times the number of digits that the calculator handled natively. The code was possibly non-trivial, but not that complex. It would have been possible to extend further by using more registers, but finding each new perfect number was taking days of crunching so I didn't bother. The major problem was in verifying the results. :shock: :lol:
Yeah... Arbitrary precision...which one could do natively on the IBM 1620, up to the limit of how much memory you had. As for programming such things, I wrote a FORTRAN program to run on a CDC 6400 to calculate e to 5000 places. It took 11 CP minutes to run. (That was around 1968.)

ejolson
Posts: 2028
Joined: Tue Mar 18, 2014 11:47 am

Re: 64-bit operating system

Thu Oct 18, 2018 11:01 pm

W. H. Heydt wrote:
Thu Oct 18, 2018 8:29 pm
Yeah... Arbitrary precision...which one could do natively on the IBM 1620, up to the limit of how much memory you had. As for programming such things, I wrote a FORTRAN program to run on a CDC 6400 to calculate e to 5000 places. It took 11 CP minutes to run. (That was around 1968.)
I think computing e without a Pi computer is better than computing pi. I wonder how much time that Fortran program would take on a Pi 3B+ and whether 64-bit mode would be noticeably faster than 32-bit mode?

W. H. Heydt
Posts: 9088
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: 64-bit operating system

Fri Oct 19, 2018 12:30 am

ejolson wrote:
Thu Oct 18, 2018 11:01 pm
W. H. Heydt wrote:
Thu Oct 18, 2018 8:29 pm
Yeah... Arbitrary precision...which one could do natively on the IBM 1620, up to the limit of how much memory you had. As for programming such things, I wrote a FORTRAN program to run on a CDC 6400 to calculate e to 5000 places. It took 11 CP minutes to run. (That was around 1968.)
I think computing e without a Pi computer is better than computing pi. I wonder how much time that Fortran program would take on a Pi 3B+ and whether 64-bit mode would be noticeably faster than 32-bit mode?
I don't think it would make a difference, since I was working with arrays of single digit numbers.

schmide
Posts: 8
Joined: Thu Nov 01, 2018 7:02 pm

Re: 64-bit operating system

Sun Nov 04, 2018 8:11 pm

Thank you sakaki the gentoo stuff has made a tool available for much of the work I plan to do.

I fear when I release it raspbian will probably still not support it.

It is sad to see the same old arguments the x86 community when through during the transition to 64. Most of them are basically wrong or at the very least half truths.

We don't need the extra addressing.

The size of the code will get bigger.

It will break compatibility with older code.

The same type of Luddites were there grasping at the past as I see here.

For all those arguing against it ask yourself. Did this happen in the x86 arena? PS it didn't. 32bit code runs fine on a 64 bit OS. In fact it is still the default for most programs. ARM basically follows the same recipe.

Yes some hardware will be forgotten and some programs will advance to use only the new instruction sets.

Just to put this in perspective. Staying at ARM7 is the same as staying at a Pentium level processor.

Basically in terms of SIMD processing.

ARM7 = mmx
ARM8 = sse
??? = avx
??? = avx2

Do you really want to hold at a generation that is a decade behind.

mfa298
Posts: 1322
Joined: Tue Apr 22, 2014 11:18 am

Re: 64-bit operating system

Sun Nov 04, 2018 11:57 pm

schmide wrote:
Sun Nov 04, 2018 8:11 pm
It is sad to see the same old arguments the x86 community when through during the transition to 64. Most of them are basically wrong or at the very least half truths.
I think your missing some of the key points there. Currently only 2.3(ish) of the (at least) 7 available consumer pis (im not counting the H models of zero, various CM boards or older pi models) support (at least partially) a 64 bit kernel. Of those two and a bit models (some pi2s might be 64 bit capable, the majority can't) the 64 bit support isn't complete (I think media decode, camera support and possibly other support is missing).

So currently the choice is a 32bit build that runs on absolutely everything without limitations or a 64 bit version that would run on the pi3s and some pi2s unless you want to use hardware media encoding/decoding or the camera, in which case you need a 32 bit image.

From a support point of view I'd be quite certain that offering up a standard "supported" 64 bit version of raspbian would turn into a nightmare quite quickly. However I'm sure if your willing to provide 24/7 support for free to the owners of 20+ million raspberry pis for a 64 bit "supported" OS I'm sure the folks at pi towers be willing to chat to you (I hope you don't have anything else you want to do with your time - like sleeping or eating).

As I think has already been discussed in this thread there are a range of 64 bit oses you can try on your pi if you want to but AIUI most of them fall very much into the "here be dragons" area of support. That's not a level of support that can apply to raspbian which is aimed for the beginners and uninitiated to start using with limited knowledge.

My understanding is a 64bit image is being worked on, although slowly so don't expect anything anytime soon. There are many more things that are more deserving of their time. At some point in the future a 64 bit will become required but that might only be at the release of the pi6 (that is a total guess as, like everyone else I know nothing of the pi4 let alone any models that may come after it).

Heater
Posts: 10006
Joined: Tue Jul 17, 2012 3:02 pm

Re: 64-bit operating system

Mon Nov 05, 2018 12:23 am

Everything you say schmide is kind of, sort of, true.

Turns out that:

1) A 64 bit OS is not required for the intended use of the Pi or by most people's applications.

2) A 64 bit OS would not be usable across all models of the Pi hardware. Supporting two operating systems is not an efficient way for the folks at the Pi Foundation to spend their time.

3) If anyone wants a 64 bit OS on their Pi then there are many to choose from. I myself have been using pi64.

4) No doubt the Pi Foundation will support a 64 bit OS when they can.

All in all, there is no problem.

ejolson
Posts: 2028
Joined: Tue Mar 18, 2014 11:47 am

Re: 64-bit operating system

Mon Nov 05, 2018 1:33 am

schmide wrote:
Sun Nov 04, 2018 8:11 pm
ARM7 = mmx
ARM8 = sse
??? = avx
??? = avx2
From what I understand, the NEON SIMD instructions available on the ARMv7 include 256-bit double-precision 4-vectors [edit: actually 128-bit single precision 4-vectors, as corrected by the following post] which are much closer to AVX-256 [edit: actually SSE for ARMv7 and SSE2 for ARMv8] than either MMX or SSE.

I don't think 64-bit became popular on x86 computers until manufacturers wanted to sell machines with more than 2GB of main memory. When the Raspberry Pi Foundation wants to do the same, then 64-bit will become standard. Although 64-bit has other advantages, when there is a need to address more than 2GB of physical memory 64-bit becomes an easy decision.
Last edited by ejolson on Mon Nov 05, 2018 8:09 am, edited 3 times in total.

jahboater
Posts: 3050
Joined: Wed Feb 04, 2015 6:38 pm

Re: 64-bit operating system

Mon Nov 05, 2018 1:59 am

ejolson wrote:
Mon Nov 05, 2018 1:33 am
schmide wrote:
Sun Nov 04, 2018 8:11 pm
ARM7 = mmx
ARM8 = sse
??? = avx
??? = avx2
From what I understand, the NEON SIMD instructions available on the ARMv7 include 256-bit double-precision 4-vectors which are much closer to AVX-256 than either MMX or SSE.
I believe, in this respect, that NEON is comparable to SSE2 (though nicer and better designed).
MMX is integer only, so not comparable
SSE/SSE2 are 128-bit (SSE is single-precision only)
VFP and NEON are 128-bit
AVX/AVX2 are 256-bit
AVX512 is 512-bit

In 64-bit mode there are 32 NEON vectors instead of 16.

ejolson
Posts: 2028
Joined: Tue Mar 18, 2014 11:47 am

Re: 64-bit operating system

Mon Nov 05, 2018 2:05 am

jahboater wrote:
Mon Nov 05, 2018 1:59 am
ejolson wrote:
Mon Nov 05, 2018 1:33 am
schmide wrote:
Sun Nov 04, 2018 8:11 pm
ARM7 = mmx
ARM8 = sse
??? = avx
??? = avx2
From what I understand, the NEON SIMD instructions available on the ARMv7 include 256-bit double-precision 4-vectors which are much closer to AVX-256 than either MMX or SSE.
I believe, in this respect, that NEON is comparable to SSE2 (though nicer and better designed).
MMX is integer only, so not comparable
SSE/SSE2 are 128-bit (SSE is single-precision only)
VFP and NEON are 128-bit
AVX/AVX2 are 256-bit
AVX512 is 512-bit

In 64-bit mode there are 32 NEON vectors instead of 16.
Thanks for the correction, I only dealt directly with NEON instructions once and must have been working with single precision. I've updated my previous post so it is hopefully more accurate.

schmide
Posts: 8
Joined: Thu Nov 01, 2018 7:02 pm

Re: 64-bit operating system

Mon Nov 05, 2018 2:37 am

Yeah I'm wrong about that.

so it would be ok to say

arm6 = mmx
arm7 = sse2
etc

jahboater
Posts: 3050
Joined: Wed Feb 04, 2015 6:38 pm

Re: 64-bit operating system

Mon Nov 05, 2018 7:58 am

The other reason 64-bits OS's will come along eventually is because the latest CPU's require it, irrespective of the memory size.
The new Cortex-A76 for example will run 32-bit apps in user space, but the OS has to be 64-bit.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: 64-bit operating system

Mon Nov 05, 2018 11:21 am

It's a well worn argument, and the answer is that it'll be done when it needs to be done.

Clearly there are some performance advantages to using 64bit, and some support disadvantages. At the moment, the support disdvantages win.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

yvette
Posts: 1
Joined: Mon Nov 05, 2018 11:33 am

Re: 64-bit operating system

Mon Nov 05, 2018 11:38 am

jamesh wrote:
Mon Nov 05, 2018 11:21 am
It's a well worn argument, and the answer is that it'll be done when it needs to be done.

Clearly there are some performance advantages to using 64bit, and some support disadvantages. At the moment, the support disdvantages win.
So, is there any ETA when the 64 bit will be available? I understand the pros and cons analysis, but we really need the 64 bit version.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11017
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 64-bit operating system

Mon Nov 05, 2018 12:27 pm

There is no ETA, even when the RPF would be planning such a thing, they would keep it a secret until the day they reveal it.
Which IMHO is years away.

There are 64-BIT OS's you can use already.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20752
Joined: Sat Jul 30, 2011 7:41 pm

Re: 64-bit operating system

Mon Nov 05, 2018 12:38 pm

No, we are not working on it at the moment AFAIK, so any sort of ETA would be complete guesswork.

Who is "we" btw?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Heater
Posts: 10006
Joined: Tue Jul 17, 2012 3:02 pm

Re: 64-bit operating system

Mon Nov 05, 2018 12:47 pm

yvette,
...we really need the 64 bit version.
I'm curious.

Could you say exactly what it is you are wanting to do with a Pi that absolutely requires a 64 bit OS?

If you really need a 64 bit OS on the Pi then there are many to choose from as suggested here already.

Return to “General discussion”