Various notes on /usr unification
Posted Feb 28, 2012 21:35 UTC (Tue) by khim
In reply to: Various notes on /usr unification
Parent article: Various notes on /usr unification
Often it does not really matter just why this or that decision was made. Other, different things start depending on it. And often even if the initial decision was done on a whim it can not be changed later because other, different things start to depend on it.
One example from my own practice: when I've developed compiler for x86-64 NaCl I've noticed that our security model makes it actually impossible to address more then 4GiB of address space and this makes 8bytes pointers (normal for x86-64) kinda pointless. We've talked a bit about it, I've tried to switch GCC to model with 4 byte pointers in memory (which was easy enough to do) and we used the result (it was faster and used less memory: what's not to like?). For about month or two our compiler had insane model where pointers were 4 bytes long and "longs" were 8 bytes long, but we've found out quite soon that such combination just triggers too many bugs in programs. Eventually we've standardized on ILP32 model. Later, when PNaCl effort was started they found out that all NaCl compilers (X86-32, X86-64 and ARM) are using ILP32 model - and this was embedded in the bitcode format!
Now, if we'll try to change x86-64 NaCl memory model we'll find out that it'll not be easy to do. Even if the initial motivation was just to save some memory by removing useless zero bytes (and to get slightly better results on benchmarks as a bonus) today there are another justification.
And this happened just in a few last years! As you can guess Linux has somewhat longer history and / vs /usr split was used for different things along these years. It looks like today they all are not really valid (Linux does not include one set of programs in /bin and another, totally different, in /usr, for example) but it's not enough to say "hey, Ken and Dennis leaked their OS into the equivalent of home because an RK05 disk pack on the PDP-11 was too small thus today it's all is not needed because we don't use RK05 disk packs". No, we should evaluate situation today and look on the use of said split today.
Why it was done in first place is not important question (unless you like UNIX folklore). Why it's used today is an important question. That's why 40 years old fairy tales are not even mentioned in the appropriate place.
to post comments)