12 ms·
The future of 32-bit Linux
- exikyut 6y agoNitpick/unclear area: why doesn't this highlight the legacy of the 386 and the i386 architecture? > Linux was first written as a desktop system for IBM PC compatibles, ... > The earliest i386, ... processors all got phased out over time, ... > The table shows the 32-bit desktop platforms that proved popular enough to make it into mainline Linux and stay there, supported mainly by loyal hobbyists: > ... > Platform: IBM compatible PC > Architectures: ia32 > Earliest supported machine: PS/2 model 70 486 Wha...? Where is i386 in the table? "Nuke 386-SX/DX support" was submitted to 3.8 in Dec 2012 (http://lkml.iu.edu/hypermail/linux/kernel/1212.1/01152.html http://lkml.iu.edu/hypermail/linux/kernel/1212.1/01152.html), but explicit support existed up to that point since Linux's inception in 1991. I mean, Linux was written for the 386! That was the chip you had to be using since Linux's memory manager was built on top of its MMU. I accept I may be completely misreading/misunderstanding something here.
- jeppesen-io 6y agoIf 86-SX/DX support was dropped in 2012, how is that relevant today? From what I understand, that table shows current or recently supported archs ia32 seems to be a a more relevant descrition
- wahern 6y agoAlthough I realize the table and most of the article is primarily concerned with 32-bit CPUs, it's unfortunate that the article fails to mention 64-bit DEC Alpha, which was the second architecture after i386 supported by Linux. And unlike i386 it's still supported. When the article says > Linux was first written as a desktop system for IBM PC compatibles, and was eventually ported to almost every other desktop platform available in the 1990s, including a lot of the early Unix workstations across all architectures. Because of the juxtaposition with the subsequent platform table, I think a lot of people might be misled into think that both 64-bit CPUs and 64-bit Linux was late to the game. But 64-bit Linux existed as a first-class environment before it supported any other 32-bit architectures like MIPS, PowerPC, or SPARC; before Linux gained any commercial attention (DEC notwithstanding); and AFAIU before there was any kind of serious commitment to syscall ABI stability. GCC supported "long long" on 32-bit architectures since at least 1989, before Linux even existed.[1] I think some Unix environments supported 64-bit off_t on 32-bit architectures before Linux was ever ported to Alpha, and possibly before Linux existed. In any event, using long long for off_t was a done deal by January 1995 at the first Large File Summit (LFS) meeting. The first two slides at https://web.archive.org/web/20000903063117/http://ftp.sas.com/standards/large.file/950105/index.html https://web.archive.org/web/20000903063117/http://ftp.sas.co... suggest using long long for off_t was assumed; the year-long summit was apparently concerned with all the other details. That suggests long long was a relatively well worn and mature type in Unix C environments. Moreover, Linux didn't even get LFS support until several years after the LFS POSIX API was formally published in 1996.[2] It could have implemented a similar solution for time_t and time-related syscalls at the same time it did for off_t and file operations. LFS support has been the default for such a long time even on Linux that today nobody even questions whether 32-bit binaries support 64-bit file operations. Instead Linux apparently waited another 15+ years just to implement that exact solution. In other words, the potential to recognize and address the representation of time_t--and 64-bit types on 32-bit architectures more generally--existed basically from the very beginning of Linux and only grew more pressing and easier to implement, at least in terms of toolchain support, with each subsequent year. That's noteworthy. Not because it proves the Linux developers were mistaken or had the wrong priorities, but because it shows they weren't blindsided by the issue. The history can provide guidance for people to navigate similar dilemmas today, regardless of whether one would have left the issue on the table until later in the day, like Linux did, or chosen to address it earlier on. [1] In 1989 GCC supported long long by calling into a library, similar to what it does for some intrinsics when not natively supported. I'm not sure when GCC began open coding 64-bit operations (i.e. generating inline assembly for all operations on 64-bit types). [2] Not until 2.4.0 judging by http://linuxmafia.com/faq/VALinux-kb/2gb-filesize-limit.html http://linuxmafia.com/faq/VALinux-kb/2gb-filesize-limit.html
- justincormack 6y agoThe large files transition was quite painful and took a long time, and informed the time offset changes.
- arnd 6y agoI tried not to talk too much about 64-bit architectures, but that's a good point. Indeed not just Alpha but also MIPS R4000, UltraSPARC, PA-8000 were already around in the 1990s when the 32-bit kernel support got merged, while ppc64, s390x and TileGX hardware came a little later than the corresponding 32-bit ports. For time_t, I remember it first getting discussed seriously among kernel developers around 2010 as it became clearer that we had misjudged how long 32-bit systems would be around for, how much work it would be to fix it, and how long before 2038 things would fall apart from bugs. Before then, the general thinking was we could either delay dealing with it until the 2030s or 32-bit Linux would just not be there any more. I would consider the LFS transition a user space failure, as glibc never made that the default and Debian still builds some packages with 32-bit off_t to avoid breaking the interface between libraries. As late as 2018, glibc was still merging architecture ports (csky) that default to a 32-bit off_t, despite the kernel having 64-bit off_t since 1994 (linux-1.1.46) before any non-i386 ports were added, and all new architectures in the kernel only supporting 64-bit off_t since 2011.
- pram 6y agoia32 is just the Intel marketing term to encompass i386 through i786
- brnt 6y agoBoth are marketing terms.
- userbinator 6y agoIt is well understood that many 32-bit systems will stop working in the year 2038 when the 32-bit time_t overflows. On the other hand, MS-DOS, which internally uses a 1980 year-epoch with a byte-sized year counter (and does not use a seconds-based epoch unlike Unixes), will be fine up to 2107, and Windows NT's timekeeping has a range of approximately 30000 years. Despite the elegance of the 1970 seconds-epoch, it's interesting to see how other systems designed roughly around that time period, a little later but not by much, chose to do something else, and as a result became quite a bit more future-proof.
- jolux 6y agoMS-DOS was released in 1981, UNIX considerably before then. Windows NT was not released until 1993. A decade has always been a long time in software, and it used to be longer.
- burade 6y agoIt's still pointless because no MS-DOS system will be alive in 2107.
- exikyut 6y agoYes it will; it (the last one) will host a single file documenting the true source of the "640K of RAM" quote. And it will make it available over PC/TCP, using a chain of adaptors and converters from 100BASE-TX.
- userbinator 6y ago"Wanna bet...?" I wouldn't be surprised at all if there were some original embedded systems still running machinery and the like in a century from now, catastrophic events notwithstanding. The sort of low-power embedded systems likely to be running DOS don't really experience any wear. There's quite a bit of equipment in the "low-level" manufacturing industry which is around a century old, and has basically been in continuous operation since it was installed.
- kevin_thibedeau 6y ago
- ncmncm 6y agoApplications that would have difficulty moving to a 64-bit time_t, typically for object-size and alignment in legacy protocols, can often be recompiled to use an unsigned 32-bit value there, taking them up into 2106. So, a 32-bit kernel, typically forked from 2.6 or 3.x and with unsigned 32-bit time_t, is a viable alternative for rescuing legacy embedded uses. Probably by 2106 the machines will be responsible for coding, and it will then be their problem; or, civilization might collapse, so any people remaining will have bigger worries. Or (best case) both.
- saurik 6y agoI think a core problem is that merely changing the type and recompiling it is likely to cause other issues with code that is using time_t--for right or for wrong--to store the result of subtracting two other time_t values; it also could easily be that a piece of software just sort of looks like it works after that edit but doesn't die to some less-used corner case. (And, FWIW: my expectation is that civilization will have collapsed because of the machines taking over, and the only thing that will save humanity is when they all keel over and die on February 7, 2106.)
- hakfoo 6y agoWhy isn't moving the epoch a reasonable option? You go through and subtract 50 years from all date values you have in storage, change the date display code to show everything based on 2020, and you've kicked the can on the problem down to 2088.
- jabl 6y agoBecause you're breaking backwards compatibility by changing the interpretation of those timestamp fields. If you do that, you might as well switch to a 64-bit time_t. Treating a 32-bit timestamp field as unsigned seconds since the epoch at least keeps backwards compatibility with existing software up until 2038.
- jabl 6y agoFor handling legacy protocols and file formats, can't you just use uint32_t for the timestamp, and then convert that to time_t for the in-memory representation. No need to fork the kernel. That's probably what you needed to do anyway, if you want the code to compile correctly on systems with 32 and 64-bit time_t.
- ngcc_hk 6y agoUnlike cobol, dos based technology could be at least learnt and maintained easily. And you can easy find ways to test it. Not cobol.
- charliebrownau 6y agoIf anyone is still using 32bit in 2020 Upgrade your FUCKING CPU/MOBO ffs Pentium 4 3hz did EMT64 Intel i5 2500/2400s are cheap globally Go check Amazon USA , Second hand forums (ebay/craiglist/gumtree/fakebook/etc) or use aliexpress Stop fucking holding back 64bit
- jayp1418 6y agoWelcome my son Welcome to the NetBSD Where have you been? It's alright we know where you've been.
- deleted 6y ago[deleted]
- neverartful 6y agoAnd have a cigar!!
- usr1106 6y agoThe whole discussion is about legacy systems. What about sustainability? Of course it's cheap to build ever more powerful systems and to ruin the planet with more energy consumption and more waste. 32 bit systems are good enough for many purposes. By law of physics they could be built using less resources during production and during their lifetime. Don't tell me it's such a small change that it does not matter. That's the attitude everywhere, and the results can be seen. Those living at the US west coast experienced the fires, not to mentio Australia. Myself I used to ski 3 months 20 years ago, maybe 1 month in a warm winter. Now I hardly get over 3 weeks, less than 1 week in a warm winter.
- ashneo76 6y agoI 1000% agree. Not everything needs 64bit. This is forced manufactured obsolescence
- WJW 6y agoLinux is pretty much the original open source project. Just fork the repo and maintain 32 bit code yourself if you want to keep it.
- hnlmorg 6y ago> Linux is pretty much the original open source project It's not. GNU pre-dates Linux by nearly 10 years. But even if you're talking strictly about kernels, 386BSD and Hurd were started before Linux. > Just fork the repo and maintain 32 bit code yourself if you want to keep it. I've often noticed -- and not just on here -- that when commenters prefix "just" to a sentence, the work involved is usually non-trivial.
- WJW 6y ago> I've often noticed -- and not just on here -- that when commenters prefix "just" to a sentence, the work involved is usually non-trivial. That was the joke, yes. The post I was responding to was complaining about "forced" obsolescence while there is nothing of the sort. Upstream maintainers want to drop some legacy code so they can spend more time on newer machines. GP apparently does not want to upgrade and is now complaining that other people don't do the non-trivial work of keeping 32 bit linux updated for free.
- gaul 6y agoThe article mentions 32-bit Raspbian which is moving to 64-bit to better support the Raspberry Pi 4 with 8 GB of RAM. Both the RPi 3 and 4 have 64-bit support but earlier models, including the popular and still-on-sale Zero, do not support 64-bit. This platform will likely stick around for a long time; we need to continue to fix issues like this size_t/off_t one in s3fs: https://github.com/s3fs-fuse/s3fs-fuse/pull/1039 https://github.com/s3fs-fuse/s3fs-fuse/pull/1039
- kzrdude 6y agoI think 32-bit is still recommended on most Rpi 4 installs, because of greater software compatibility (across the established ecosystem). So it's going to change slowly.
- war1025 6y agoWe just got a raspberrypi 400 in the mail yesterday to use is a media center pc. From what I understand reading things, Netflix will only work on 32bit because ChromeOS is 32 bit and they steal the Widevine blob out of ChromeOS to make Netflix and Amazon Prime work. The other kind of lame consequence of that is I have to use Chromium rather than Firefox, which irks me just a little. Other than that, the RaspberryPi 400 is a really nicely put together little machine.
- deleted 6y ago[deleted]
- Throwaway1771 6y agoNot that it matters tons for a media center, but, for general knowledge: Chromium variants with the Google removed or deactivated are both more secure AND private.