From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,ed01ba30049b53f2 X-Google-Attributes: gid111c93,public From: Jeff Sturm Subject: Re: 64-bit Linux? Date: 1999/06/27 Message-ID: #1/1 X-Deja-AN: 494467116 References: Content-Type: TEXT/PLAIN; charset=US-ASCII X-Complaints-To: abuse@home.net X-Trace: news.rdc1.mi.home.com 930502167 24.7.252.3 (Sun, 27 Jun 1999 09:49:27 PDT) Organization: @Home Network MIME-Version: 1.0 NNTP-Posting-Date: Sun, 27 Jun 1999 09:49:27 PDT Newsgroups: comp.os.linux.alpha On Sat, 26 Jun 1999, Brent Davies wrote: > You know, I find a lot of undocumented and unreliable FUD on the Web these > days. I see manufactures, advocacy groups, and other people (all of whom > stand to make a buck on Linux) talking about "64-bit Linux running on the > 21264 Alpha processor." > > I know that the Linux port to Alpha is almost 2 years old (or older). It's older. Early on there were two independent ports taking place, one was 32-bit and the other was 64-bit. The 32-bit port (BLADE?) disappeared long ago. I don't remember many details, but I read all about it in LJ... check backissues if you're curious. > My question: Would someone please point me toward a reputable source that > can clear up this 64-bit Linux question? What is the question exactly? That Linux supports 64-bit memory addressing? Run the following code on any Alpha/Linux distribution: #include int main(void) { printf("sizeof(int) = %d\n", sizeof(int)); printf("sizeof(long) = %d\n", sizeof(long)); printf("sizeof(void *) = %d\n", sizeof(void *)); return 0; } It will tell you: sizeof(int) = 4 sizeof(long) = 8 sizeof(void *) = 8 So the pointer type on Alpha is 64-bits. That suggests Alpha supports full 64-bit virtual addressing, and it does. Physical addressing is more constrained... Linux currently supports up to 2GB of physical memory on Alpha, although some machines can have more (the DS20 for example supports up to 4GB). (The 2GB limit will probably disappear though sometime during the 2.x kernel's lifetime.) One benefit of large virtual addresses is that you can map extrememly large files to memory: #include #include #include #include #include #define SIXTEEN_GB (1L << 34) int main(void) { int fd; char *p; /* Create a 16GB + 4 file */ fd = open("/tmp/junk", O_RDWR|O_CREAT, 0777); llseek(fd, SIXTEEN_GB, 0); write(fd, "16GB", 4); /* Map it to an array and read the last 4 bytes */ p = mmap(NULL, SIXTEEN_GB + 4, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); write(1, p + SIXTEEN_GB, 4); close(fd); } (Warning: do NOT try this code with older kernels or if you don't want to risk filesystem corruption... bugs in ext2 prevented large files from working in 2.0.) In short, you can create a 16GB file and address the whole thing as a char array. You can't do this on any Intel machine today, or on anything besides an Alpha or possibly Ultra-SPARC. > I have clients that want to know if they can run Linux instead of Tru64 > Unix, but still get the 64-bit processor throughput. Exactly what do you mean by "64-bit processor throughput"? There are no guarantees that an Alpha will be better or faster than a 32-bit machine for your applications... though many apps clearly benefit, like those that need 64-bit arithmetic or large addressing. > Any _reputable_ light that can be shed on this topic will be greatly > appreciated. My "reputable source" is my 164SX, Linux 2.2.10 and egcs 1.1.2... good enough? Jeff