News for hackers. Stuff that matters.
Re:Build your own Linux by majewsky on Wednesday August 16, 2017 @03:17PM (#15030316)
That's not what "64-bit system" means. "64-bit system" means that addresses (i.e. pointers) are 64 bits wide, not ints.
Re:Build your own Linux by userbinator on Wednesday August 16, 2017 @11:07PM (#15033503)
n-bit system has always been a bit of a vague term --- think of all the CPUs out there described as "8-bit" --- the 8080/8085/Z80 family, 6502, 8051, etc. None of them have an 8-bit address space, since otherwise they would only be able to address 256 bytes.

Even defining the address space is not trivial, with things like virtual vs. physical ("32-bit" x86 since the Pentium Pro actually has 36-bit physical addresses) and bankswitching (common on MCUs).

Likewise, data width is equally as complex: the Z80, commonly known as 8-bit, actually has operations on 16-bit "register pairs". 32-bit x86 with MMX has 64-bit registers, and with x87 has 80-bit wide quantities manipulable in a single instruction.

It just so happens that we hit a sweet spot for many years with "32-bit" x86 which had 32-bit integers and pointers, but the subtleties of classifying a system as being n-bit remain.

That said, some systems (mostly mainframes/supercomputers) are "true 64/64-bit" with 64-bit registers and 64-bit address space.

Re:Build your own Linux by smitherfield on Wednesday August 16, 2017 @04:09PM (#15030868)
And I believe all the major 64-bit instruction sets actually use 48-bit addresses at present, so software/compilers can use the top 16 as tag bits. (In addition to the bottom 3, assuming alignment on 8-byte boundaries).
Re:Build your own Linux by wvenable on Wednesday August 16, 2017 @06:11PM (#15031810)
The address space in x86-64 is specifically designed to prevent the use of unused address bits for tag bits.

"The AMD specification requires that the most significant 16 bits of any virtual address, bits 48 through 63, must be copies of bit 47 (in a manner akin to sign extension). If this requirement is not met, the processor will raise an exception."

https://en.wikipedia.org/wiki/X86-64#Virtual_address_space_d...

Re:Build your own Linux by userbinator on Wednesday August 16, 2017 @11:10PM (#15033513)
That applies only when you are actually using such an address for an access; you are free to store anything in those upper 16 bits as long as they are masked off when it's actually used to access memory.
Re:Build your own Linux by dbcurtis on Wednesday August 16, 2017 @04:24PM (#15031051)
Decades ago I read an article that pointed out that a corollary to Moore's law is that address bits will be consumed at the rate of 1.5 address bits per year, so it is easy to predict when an architecture will run out of address bits.
Re:Build your own Linux by JoshTriplett on Wednesday August 16, 2017 @04:19PM (#15031006)
> And I believe all the major 64-bit instruction sets actually use 48-bit addresses at present, so software/compilers can use the top 16 as tag bits.

Not at all a safe assumption in general; architectures evolve over time, and in addition, that address space is split such that kernel addresses have those bits set, not cleared.

Re:Build your own Linux by smitherfield on Wednesday August 16, 2017 @05:26PM (#15031515)
Didn't mean to imply that was a good idea, just that it's possible. It looks like the top supercomputers are getting close to surpassing 64 petabytes (56 bits byte-addressed) of virtual memory space, so 16-bit tags are right out. A 48-bit byte-addressed memory space is 256 terabytes, which is getting snug for high-end servers but still 15±5 years out for consumer hardware.

  48-bit byte-addressed: 256 terabytes
  48-bit word-addressed:   2 petabytes
  56-bit byte-addressed:  64 petabytes
  56-bit word-addressed: 512 petabytes
Re:Build your own Linux by justincormack on Thursday August 17, 2017 @05:18AM (#15035036)
NVDIMMs are about to change this, addressed like memory but with around 10 times as much data, so address space is about to jump.
Re:Build your own Linux by signa11 on Thursday August 17, 2017 @04:07AM (#15034677)
> ... addresses (i.e. pointers) are 64 bits wide... i gues, what you mean is that the address bus is 64bits wide...