lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The 56 adress extension are not for use in the user space, no os allows you tonuse à si giant user space, it is used tobcreate severzl classes of storage (e.g. exécutable code vs readonly data, vs shared memory vs memory mapped i/o ports or memory mapped files)

Nothing in that is for Lua value types,

And even in that case, you can still discrimenzte Lua types if you want ro use différent classes of pointers: 50 bits are large enough to use them as handles or to convert memory aligned pointers to handles using basic bit shifting and masking of their 64-bit pattern in the tagged NaN (and you would typically need that transfirm of pointers only for user types or pointers to native C functions)

Si yes in oracticecthere's no limitation at all and there will never be until we have 128-bit OSes running on a computing grid and not a single host, or 256-bit OSes running on the whole internet as if it was a single computer.


Le jeu. 16 sept. 2021 à 03:12, Coda Highland <chighland@gmail.com> a écrit :
On Wed, Sep 15, 2021 at 4:45 PM Gé Weijers <ge@weijers.org> wrote:


On Wed, Sep 15, 2021 at 6:51 AM Philippe Verdy <verdyp@gmail.com> wrote:


Le mer. 15 sept. 2021 à 14:53, Flyer31 Test <flyer31@googlemail.com> a écrit :
 
No modern is allows any user space program to use adresses longer than 48 bit, and once you pack short strings in tagged NaN, you can also add alignement contraints for string buffers, and all other pointers needed for complexe types like table, and so allow adding 2bits for handles/objectids, leaning that you can use a giant user space with 50-bit pointers... In practice, this limit will not be reached at all.

Intel introduced 56-bit virtual addresses and 5 level page tables in Ice Lake, and support for this war merged into Linux in 2016. Laptop processors that support this have been shipping for 2 years. 

If you align everything to 8-byte boundaries (as you would if tagged doubles are your basic data structure) you can knock off the bottom three bits, fitting a 55-bit pointer into the mantissa. You can borrow two different NaNs to represent the high bit if you really need it.

But yes, the scaling limits are distinctly finite, which puts limit on the long-term viability of the techique.

/s/ Adam