Posted Sep 9, 2011 18:12 UTC (Fri) by gmaxwell (subscriber, #30048)
[Link]
It would only take a single syscall to the kernel to tell it to never give this process access to _any_ address space outside of the first 4gb (not via sbrk, mmap, etc).
It would have ~all the performance benefits without doubling the libraries in memory. It wouldn't, however, retain the benefit of reduced porting benefit of existing 32bit crapware since pointers in library owned structures would be the other size. ::shrugs::
The x32 system call ABI
Posted Sep 11, 2011 3:23 UTC (Sun) by butlerm (subscriber, #13312)
[Link]
What you describe could be done, but it would be difficult to implement, require special compiler support to do well, and would break source compatibility even with special compiler support.
It would be essentially the same as adding support for 80286 style near and far pointers across the code base. In C, every structure, every header file, every shared pointer declaration would potentially have to be marked whether it was using large or small pointers. The compiler certainly wouldn't know that an arbitrary function or structure declaration was referring to something from a library, and some libraries would have to come in a non-standard flavor in any case.
Now as you say, there are certain advantages to that, in terms of memory and cache footprint. They did it back in the x286 era for a reason. But it is much more impractical to implement that sort of thing across the source code for practically everything then simply to compile under a new ABI, especially if the new ABI performs well enough to be the system default.
A reasonable distribution policy could be to replace x86 with x32, and not ship x86_64 libraries in x32 distributions. It could simply say that if you want have a 64 bit user space, you should use a full 64 bit version. 64 bit addressing could be reserved for the kernel. If I were to guess, half of the people currently planning to use x32 (e.g. in embedded applications) have that sort of thing in mind in any case.
The x32 system call ABI
Posted Apr 9, 2012 21:28 UTC (Mon) by snadrus (guest, #60224)
[Link]
What about building x32 off ia32 compatibility? There would be no kernel changes, but just compiler changes to use the additional registers. You may even be able to use ia32 or x32 libraries interchangeably if you're not passing by register.
The x32 system call ABI
Posted Apr 10, 2012 9:08 UTC (Tue) by khim (subscriber, #9252)
[Link]
1. Open wikipedia. Read.
2. Try to pretend you never asked this question.
Perhaps then you'll be considered seriously in some future architecture dispute.
Your worst yet, and for me your last
Posted Apr 13, 2012 6:37 UTC (Fri) by biged (subscriber, #50106)
[Link]
Khim, you have exceeded your usual levels of hostility and brashness with this comment, and so I have added you to my filter. (I mention this as a reminder to others: My Account -> Comment Filtering.)
Your response here is beyond rude: it is poisonous. You should realise that with more time and attention someone might be able to explain the misconception, help others and avoid insulting anyone.
Please stop treating LWN as your inbox: post less often, and more thoughtfully. For me, you have become a spammer.