News for hackers. Stuff that matters.
Re:Lots of bugs in 32-bit x86 Linux entry code by jdsully on Thursday December 12, 2019 @04:13PM (#21776544)
I remember being an early adopter of 64-bit Linux with my Athlon64 back in the day. Lots of stuff was broken and I got a lot of debate on whether it was any faster or worthwhile at all. It's really cool to see the technology curve go full circle.
Re:Lots of bugs in 32-bit x86 Linux entry code by nickysielicki on Thursday December 12, 2019 @07:18PM (#21777969)
My dad bought me an Anthlon64 machine for Christmas and we put it together. Not know much about anything, I remember being pissed off/confused that I didn’t have Windows XP 64-bit in spite of having that Anthlon64 sticker on the front.

A few years later my brother was starting a web server to host a forum for the Digital TV switch-over focused on the Madison, WI market, shout-out and RIP madcityhd.com

Watching him setup Fedora on the box on the floor of his bedroom and using Compiz wobbly-windows was enough to hook me. I stole his install CD and nuked my drive (much to the irritation of my dad, who knew that I would be stealing one of his nights to reinstall Windows when I eventually realized could no longer play counter-strike), It was fun to see it come full-circle a year or two after I was ticked-off about my Anthlon64 not running a 64 bit operating system, when I started trying other distos and realized, “Hey, I can actually use the 64 bit one now!”

Fun times. I wonder how many kids got hooked on Linux by wobbly windows. I know that’s what brought me in, haha.

Re:Lots of bugs in 32-bit x86 Linux entry code by Ellipsis753 on Thursday December 12, 2019 @09:04PM (#21778542)
Wobbly windows were the main reason I switched to Linux. Been using it for everything ever since... Kind of amazing that could be a "killer app".
Re:Lots of bugs in 32-bit x86 Linux entry code by BuildTheRobots on Friday December 13, 2019 @09:23PM (#21787370)
There was actually a 64bit version of Windows XP which I inflicted on my dad for a while - sounds like you did well to avoid it ;)

https://en.wikipedia.org/wiki/Windows_XP_Professional_x64_Ed...

Re:Lots of bugs in 32-bit x86 Linux entry code by gdxhyrd on Thursday December 12, 2019 @05:45PM (#21777422)
Worthwhile? We had PAE for a long time, sure, but I think it was fairly obvious when the Athlon 64 appeared that 4GB was not going to cut it, given some people already had 1GB at home...
Re:Lots of bugs in 32-bit x86 Linux entry code by jandrese on Thursday December 12, 2019 @06:29PM (#21777685)
PAE was always a terrible hack though. It caused so many problems that I'm super glad native 64 bit became the norm shortly before it would have had to become widespread.
Re:Lots of bugs in 32-bit x86 Linux entry code by devit on Thursday December 12, 2019 @07:00PM (#21777866)
It's not a terrible hack, it's just 32-bit virtual addresses with a larger physical address space.

It only caused problems because some kernels used to expect that all physical memory is mapped at all times (and some hardware could only DMA to 32-bit physical addresses, but that's a problem with 64-bit CPUs as well).

Re:Lots of bugs in 32-bit x86 Linux entry code by jdsully on Thursday December 12, 2019 @05:50PM (#21777474)
At the time 1GB was a ton of memory and few applications would use anywhere near that. A 64-bit kernel took on fairly quickly but actually compiling 64-bit applications took a lot longer. Consensus at the time was the memory overhead of larger pointers outweighed the benefits of extra registers.
Re:Lots of bugs in 32-bit x86 Linux entry code by wahern on Thursday December 12, 2019 @07:06PM (#21777896)
> Consensus at the time

I wouldn't call it consensus, just a persistent claim by a large fraction of developers. They finally got to prove their claims with x32 ABI, which was ILP32 in amd64 mode, including the additional registers. Few if any people used it, nor did it show better performance in practice.

Regarding 64-bit support: by the time amd64 chips shipped people had been writing software for the 64-bit Alpha for 10 years, and 7 years for sparc64. IME most open source software was already 64-bit clean and worked well out-of-the-box. Back then the open source community, and especially GNU projects, heavily emphasized platform and hardware portability.

Perhaps the situation on Windows was different. It also didn't help that Windows kept long 32 bits, which had the effect of breaking code that cast between pointers and long (intptr_t didn't come until C99). The 64-bit ABI for all Unix platforms (AFAIU) carried forward the relationship between long and pointer. I don't think I ever recall seeing Unix or open source code casting a pointer type to int, only long; it was Windows software that presumed pointer->int conversions worked.

Re:Lots of bugs in 32-bit x86 Linux entry code by sprash on Friday December 13, 2019 @01:20AM (#21779518)
> Few if any people used it, nor did it show better performance in practice.

We use it for our specialized analysis framework. The real world performance gain is just shy of 30% which is impressive since all it took was a bunch of compiler flags.

Personally I think x32 is a vastly underused ABI. Every application that is unlikely to use more than 2GB should use it. It is literally free performance.

Re:Lots of bugs in 32-bit x86 Linux entry code by nwmcsween on Friday December 13, 2019 @12:53AM (#21779415)
There were a few benchmarks IIRC where it showed a big improvement, the problem was that x32 ABI was horribly botched.
Re:Lots of bugs in 32-bit x86 Linux entry code by srgpqt on Thursday December 12, 2019 @06:29PM (#21777686)
1GB is still a lot of memory. If anything, we've only learned to squander all available memory.
Re:Lots of bugs in 32-bit x86 Linux entry code by IvyMike on Thursday December 12, 2019 @09:43PM (#21778724)
> If anything, we've only learned to squander all available memory.

If I've learned anything in my computer career, it is that this is an evergreen comment. I remember reading Q-Link posts from Commodore 64 users with this complaint when the wasteful C128 came out.

Re:Lots of bugs in 32-bit x86 Linux entry code by derefr on Thursday December 12, 2019 @07:00PM (#21777865)
Go ahead and buffer 4k video streams to disk, I dare you :) There's a reason that even modern appliance platforms like Apple/Android TV need multiple GBs of memory, and it ain't bloat.
Re:Lots of bugs in 32-bit x86 Linux entry code by hvidgaard on Friday December 13, 2019 @04:38AM (#21780311)
If we aim high and say we need 50mbps of bitrate for 4k HDR, we still only need 6-7mb/s. So buffering 30 seconds is still less than 200mb.

It is entirely possible to make a modern system that use far less than they do today. If you're gaming it's a different beast, but for normal OS and programs it's certainly bloat.

Re:Lots of bugs in 32-bit x86 Linux entry code by mehrdadn on Thursday December 12, 2019 @08:25PM (#21778320)
What are you calling "disk" here? It's not every day that I see a machine with a disk slower than its network connection.
Re:Lots of bugs in 32-bit x86 Linux entry code by eru on Thursday December 12, 2019 @11:34PM (#21779160)
An aside: that's often true in Google's data centres. So much, that someone wrote a system to sort-of swap out memory to other machines' RAM over the network (instead of to disk, which Google doesn't do in general).
Re:Lots of bugs in 32-bit x86 Linux entry code by tedunangst on Thursday December 12, 2019 @09:55PM (#21778764)
That might describe every rpi running off SD.
Re:Lots of bugs in 32-bit x86 Linux entry code by boring_twenties on Friday December 13, 2019 @02:07AM (#21779706)
I dunno, not sure about the latest Pi models but the network performance was horrid on the earlier ones, like 20Mbits/sec tops.
Re:Lots of bugs in 32-bit x86 Linux entry code by Piskvorrr on Friday December 13, 2019 @06:45AM (#21780787)
If you're talking RPi1, perhaps. That's 2012, however...and one of the first things to get better in every further model.
Re:Lots of bugs in 32-bit x86 Linux entry code by trasz on Friday December 13, 2019 @04:05AM (#21780167)
The irony is, on the other end the inverse is true - filesystem cache hit ratio on Netflix servers isn’t particularly high.
Re:Lots of bugs in 32-bit x86 Linux entry code by saagarjha on Thursday December 12, 2019 @07:08PM (#21777903)
I wouldn’t be so sure.
Re:Lots of bugs in 32-bit x86 Linux entry code by vokep on Thursday December 12, 2019 @06:37PM (#21777742)
This. The basic stuff they did back then didn't magically inflate. Except, it seems from afar that thats exactly what happened. But it didn't, and it doesn't have to look like that from afar.
Re:Lots of bugs in 32-bit x86 Linux entry code by BruiseLee on Thursday December 12, 2019 @10:28PM (#21778933)
Consensus? I would call it dissensus actually.
Re:Lots of bugs in 32-bit x86 Linux entry code by cptskippy on Thursday December 12, 2019 @05:00PM (#21777014)
Completely off topic but...

Althlon64 was a swift kick in the nuts for Intel, but AMD really didn't followup until Ryzen. I wonder if they're going to stick around and fight this time.

Re:Lots of bugs in 32-bit x86 Linux entry code by kbenson on Thursday December 12, 2019 @07:10PM (#21777921)
Sometimes when the swift kick in the nuts is delivered to an 800-pound gorilla, it doesn't matter if you stay around to fight, you're outclassed.

This time, AMD may have stepped up with a steel pipe. We'll see how well they can use it...

Re:Lots of bugs in 32-bit x86 Linux entry code by lsofzz on Friday December 13, 2019 @05:59AM (#21780642)
> This time, AMD may have stepped up with a steel pipe. We'll see how well they can use it...

:-))))

Re:Lots of bugs in 32-bit x86 Linux entry code by robothread on Thursday December 12, 2019 @10:59PM (#21779044)
Well Intel wasn’t exactly sitting idle during the Athlon 64 era. It was just unfortunate that none of their plans worked out.

NetBurst was a bust. IA-64 flopped too. Both were attempts to progress from the P6 architecture - which they felt had reached its limits.

In the end, the market spoke, they want the P6. No one was willing to rewrite software (or even recompile). So back to the P6 in the form of the Pentium M followed by the Core /Core dual series and finally the i3/5/7/9 that we use today - which you would notice hasn’t improved much per core; as mentioned the P6 style design is pretty much tapped out and all they can do is “squeeze blood from stone” for a few percentage improvements here and there.

AMD recently caught up but frankly, they aren’t doing much better. Performance per core is just on par with Intel. Their main selling point is that they made it cheaper by splitting the L3 cache in 2 - the Ryzen is basically 2 quad-cores glued together for better yields.

Re:Lots of bugs in 32-bit x86 Linux entry code by benou on Friday December 13, 2019 @05:20AM (#21780484)
> which you would notice hasn’t improved much per core

Not sure which data you refer to? I just made a comparison on a single-threaded integer-heavy code between my old Core2 Duo and a Skylake, and just got x16 normalized perf improvement (from 2.5-cycles/byte to 0.15). Same code, same compiler.

So sure, progress have slowed down and they are adding more and more specialized stuff (AVX-512, AES-NI...) but still.

Edited for clarity.

Re:Lots of bugs in 32-bit x86 Linux entry code by topbanana on Thursday December 12, 2019 @05:32PM (#21777294)
They've got momentum on their side now, but intel won't bow down without a fight. I expect we'll see some real innovation over the next five years.
Re:Lots of bugs in 32-bit x86 Linux entry code by cptskippy on Thursday December 12, 2019 @10:04PM (#21778816)
The real question isn't if Intel will fight back but how. They've been known to innovate shady marketing tactics just as much as their CPU architecture.
Re:Lots of bugs in 32-bit x86 Linux entry code by lozaning on Thursday December 12, 2019 @07:28PM (#21778039)
I've still got my AMD Athlon 64 3200+ in a bin somewhere. I remember being in sheer awe that i could just drop in a dual core cpu into my nforce4 based mobo. It felt revolutionary at the time.
Re:Lots of bugs in 32-bit x86 Linux entry code by tyingq on Thursday December 12, 2019 @07:19PM (#21777972)
Back then, AMD kind of had to license the x64 stuff to Intel for cross license reasons. They aren't under any pressure this time to give away anything.
Re:Lots of bugs in 32-bit x86 Linux entry code by cptskippy on Thursday December 12, 2019 @10:03PM (#21778806)
Really? When did that change? I thought they had some sort of in-perpetuity cross licensing agreement going back to when AMD was a second source for x86 for Intel with Government contracts.
Re:Lots of bugs in 32-bit x86 Linux entry code by tyingq on Thursday December 12, 2019 @10:04PM (#21778817)
Their advantage this time isn't the ISA. There's no "cross licensing" for the silicon design, fab choice, etc.
Re:Lots of bugs in 32-bit x86 Linux entry code by lazyguy2 on Thursday December 12, 2019 @07:42PM (#21778129)
For several years I ran a 64bit kernel with 32bit userland.

That way I was compatible with games and most other things without having to deal with increased memory usage and compatibility hacks.

Re:Lots of bugs in 32-bit x86 Linux entry code by koolba on Thursday December 12, 2019 @08:36PM (#21778376)
There’s an even better target, x32, but sadly it never got much traction and is deprecated: https://en.wikipedia.org/wiki/X32_ABI

The idea is to expose the 64-bit instruction set and registers, but keep memory and pointers per-process 32-bit as most apps use less than 4 GB of memory.

Re:Lots of bugs in 32-bit x86 Linux entry code by nwmcsween on Friday December 13, 2019 @12:51AM (#21779402)
x32 failed due to the horribly botched ABI that was created.
Re:Lots of bugs in 32-bit x86 Linux entry code by noobermin on Thursday December 12, 2019 @09:31PM (#21778678)
Let's just hope we don't go through the same thing when we switch to 128-bit. We ought to learn from our mistakes when we do this whole thing again.

And yes, before people flare me for this, don't pretend it isn't possible, recall that once upon a time 640K ought to be enough for anybody.

Re:Lots of bugs in 32-bit x86 Linux entry code by eru on Thursday December 12, 2019 @11:30PM (#21779142)
Why would we want to switch to 128 bit addresses?

Do you know how much memory we can address with 64 bit?

(64 bit for addresses was arguably a mistake. 48 bit word size would probably have been better, but doesn't sound as cool.)

Having said that, 128 bit can make sense for certain calculations. So floating point calculations and GPUs support long registers for some of what they are doing.

(And having said that, Google figured out that they don't actually need all that precision when using GPUs for machine learning, and made TPUs with much smaller words.)

Re:Lots of bugs in 32-bit x86 Linux entry code by jnwatson on Friday December 13, 2019 @12:07AM (#21779266)
Your modern Intel chip only has 48 addressable virtual address bits. The recent Ice Lake processors support 57 bits. I deal daily with Python processes that have "6.1t" in the "resident" column in top. Hitting the 48-bit 256 TiB limit isn't science fiction to me. I can already hit that with a moderate amount of effort (by memory mapping ~100 large kv-stores). It isn't that I need to do it, but I could imagine that someone does.

It is well and proper that Intel rounded up to 64 bits. It should serve us well for the next 40ish years, which is good enough for my professional lifetime at least.

Re:Lots of bugs in 32-bit x86 Linux entry code by eru on Friday December 13, 2019 @12:51AM (#21779404)
Yes, that's partially why I mentioned the 48 bits.

It's interesting that you mention hitting that with memory mapping in practice. That is a valid concern.

Re:Lots of bugs in 32-bit x86 Linux entry code by usr1106 on Friday December 13, 2019 @01:30AM (#21779564)
> Why would we want to switch to 128 bit addresses

Predicting the future is difficult. 30 years ago (I am old enough to remember) it was hard to imagine that every household would have 10s of devices connected to the internet. My university VAX for 16 concurrent student users had less memory than required to show the splash screen when today's phone boots.

So if in 30 years the computing paradigm has changed and we directly address memory over the internet? I must admit that in my imagination we have reached a point where growth will slow down. But I have learned that my imagination is not always good enough.

Re:Lots of bugs in 32-bit x86 Linux entry code by hvidgaard on Friday December 13, 2019 @04:26AM (#21780255)
Direct addressing that way seems unfeasible, it would require a extending the IP stack to support direct addressing for it to work, and it already support 128 bit addresses. A far more feasible model is direct addressing through a unique IP, and we do not need a bigger address space for that.

That said, considering the current amounts of data Google holds, I could see the theoretical point about unique addressing every single byte they have. 64bit addressing only allow for a single order of magnitude of growth in that scenario.

Re:Lots of bugs in 32-bit x86 Linux entry code by exikyut on Friday December 13, 2019 @12:58AM (#21779431)
The fact that you can put everything, ever into 128-bit means you can easily shove ten thousand 20-terabyte storage devices into a single 128-bit system's memory-mapped I/O space and still have 3 exabytes left over.

No more packet-switched serial storage I/O. You now have first-class ability to ask for any byte anywhere, really really really fast.

Because I/O request speed is now only limited by the the memory controller (which already goes at TB/sec in x86 hardware), a fast storage controller now has the opportunity to optimize and batch requests downstream to storage devices much much more efficiently. Because if the storage devices go at a certain speed but suddenly the addressing infrastructure is A LOT LOT faster, your optimization window just went through the roof and you can coordinate much more effectively.

I forget the exact architecture, but one of IBM's 128-bit boxen already does this. Various random bits of the hardware use MMIO as a first-class addressing strategy. The OS does the rough equivalent of `disk = mmap2(/dev/sda)` at bootup. Maybe this is a z series thing.

Re:Lots of bugs in 32-bit x86 Linux entry code by anticensor on Friday December 13, 2019 @02:30AM (#21779787)
What about DMA over IPv6? Using a single 256-bit address, you would be able to address any byte in any IPv6-enabled computer directly.
Re:Lots of bugs in 32-bit x86 Linux entry code by hvidgaard on Friday December 13, 2019 @04:34AM (#21780292)
The calculations are off. 128 bit addressing allow for more than 3.40 x 10^38 addresses, and your storage example is 1.76 x 10^18 bits. That is, if we address the individual bits (we do not), we don't even have a name for the unit denoting that magnitude of space addressable left when using 128 bit addresses.
Re:Lots of bugs in 32-bit x86 Linux entry code by mannschott on Friday December 13, 2019 @02:22AM (#21779756)
Re:Lots of bugs in 32-bit x86 Linux entry code by trasz on Friday December 13, 2019 @04:02AM (#21780154)
Thing is, an “address” could be much more than an address. One example is the CHERI hardware capability stuff and its Arm counterpart, Morello: sizeof(void *) is 16 there.

And yeah, getting real world software, such as Postgres or Nginx, to work requires some fixes, but it’s really not that bad.

Re:Lots of bugs in 32-bit x86 Linux entry code by imron on Thursday December 12, 2019 @11:36PM (#21779167)
> Why would we want to switch to 128 bit addresses?

How else are you going to have more than 16 exabytes of RAM?

Re:Lots of bugs in 32-bit x86 Linux entry code by eru on Friday December 13, 2019 @12:50AM (#21779396)
Exactly, you probably won't.

And I don't mean that in an absolute sense. People might very well get up to those orders of magnitude of RAM; but you are unlikely to have that amount of RAM available to a single processor.

The extra margin of the 64 bit might help with address space randomization, though.

Re:Lots of bugs in 32-bit x86 Linux entry code by jagger27 on Friday December 13, 2019 @04:55AM (#21780369)
Memory banking is the obvious and ancient solution. PAE is another.
Re:Lots of bugs in 32-bit x86 Linux entry code by amluto on Friday December 13, 2019 @12:12PM (#21783367)
PAE is a kludge because the architects needed to add another tiny page table level to keep 32 bits of virtual space, but didn’t really want to add another level.

The concept of having more physical address bits than virtual bits is reasonable, although it falls apart a bit with virtualization. The idea of having magic registers that fill themselves in for you and can’t be read at all (such as the PAE PDPTR registers) is a bad idea that unfortunately repeats itself in x86 design. Architects: don’t do this.

Re:Lots of bugs in 32-bit x86 Linux entry code by dexen on Friday December 13, 2019 @12:51AM (#21779400)
"Why would we want to switch to 128 bit addresses?" - eru, 2019

I am gonna hold onto your quote, for enjoyment and giggles in 2032 :^)

Re:Lots of bugs in 32-bit x86 Linux entry code by dependenttypes on Friday December 13, 2019 @01:47AM (#21779632)
This is only 13 years from now. I really doubt that people will need 16 EiB by then in a single processor for a single process. Plus by that point you will probably have moved to message passing between distributed systems or something.
Re:Lots of bugs in 32-bit x86 Linux entry code by eru on Friday December 13, 2019 @03:10AM (#21779930)
My prediction is what we'll mostly see more of the same, with existing trends continuing.

Ie more mobile, and more parallelism on the server side.

But yeah, no 16 EiB on a single processor.

(Though we might see people memory map crazy amounts, without ever actually accessing all of them, of course.)

Re:Lots of bugs in 32-bit x86 Linux entry code by tedunangst on Thursday December 12, 2019 @09:47PM (#21778739)
Nobody ever thought that, and mindlessly repeating just means we don't learn anything.