Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everywhere: Remove i686 support #15467

Merged
merged 27 commits into from
Dec 28, 2022

Conversation

supercomputer7
Copy link
Member

Closes #15444. Relies on the work of #15465, as well as to support DWARF revision 5 quirks and to ensure UserspaceEmulator is supported on x86-64.

Copy link
Contributor

@Hendiadyoin1 Hendiadyoin1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things about the Math.h stuff, I can provide a solution on discord, but i can always hand in a PR later to clean that up.

@supercomputer7 supercomputer7 force-pushed the remove-i686 branch 3 times, most recently from 41e063d to 31c8376 Compare October 4, 2022 01:44
Copy link
Member

@ADKaster ADKaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments while you keep adding changes :)

@supercomputer7 supercomputer7 force-pushed the remove-i686 branch 11 times, most recently from 500a607 to 59841eb Compare October 4, 2022 14:00
@supercomputer7 supercomputer7 marked this pull request as ready for review October 4, 2022 16:39
@supercomputer7 supercomputer7 force-pushed the remove-i686 branch 3 times, most recently from be5efc8 to 53c5673 Compare October 4, 2022 17:17
@supercomputer7
Copy link
Member Author

@ADKaster All comments were addressed, thanks for the help!

@supercomputer7
Copy link
Member Author

Currently we force when compiling to generate DWARF version 4 for all binaries. We don't have UserspaceEmulator being supported in x86-64 because I need to finish #15465. Regardless, this is pretty much ready for merging as it is right now.
I will try to finish the work on supporting UserspaceEmulator, mainly because I don't want it to be sitting in the codebase without usage (there is a risk of code rot too).

@circl-lastname
Copy link
Contributor

circl-lastname commented Oct 5, 2022

Does this affect AK-based userspace apps on different platforms, for instance Ladybird and Jakt? It would be useful to at least keep Ladybird working on i686 platforms as it is quite a light but capable browser. I now checked an I see a bunch of Math functions no longer having optimized versions on i686.

@ADKaster
Copy link
Member

ADKaster commented Oct 5, 2022

Who is running a 32-bit desktop computer in $CURRENT_YEAR? feels like a best effort thing if anyone with such a computer wants to keep the code working. For math, those optimized versions only mattered when using AK Math for Serenity LibM. Your non-serenity platforms LibM version of those functions is surely better.

@supercomputer7
Copy link
Member Author

Does this affect AK-based userspace apps on different platforms, for instance Ladybird and Jakt? It would be useful to at least keep Ladybird working on i686 platforms as it is quite a light but capable browser. I now checked an I see a bunch of Math functions no longer having optimized versions on i686.

Andrew is right about this, nobody uses an i686 desktop these days in a sanely manner. Even if someone dug up some old dinosaur with Pentium 3 on it (which is probably at least 20 years old?), I don't think they would prefer Ladybird as a browser, to be honest. I am cautious when it comes to speaking for others, but I hardly believe we would want to support and optimize our code for those people too.
As for keeping the support, I am not convinced that it's worth it in 2022. If so many people actually care about i686 for this project then one of them should step up and take responsibility to maintain this platform target. For such old machines, our kernel and userland is quite not optimized for, I hardly believe anyone will deliberately use our OS on that setup.

Now, I am not super happy about this decision. However, I see the benefits of the decision. I know some people are disappointed because their hardware will not be supported by our OS anymore. We will basically lose support on the v86 project too, which I personally very admire. In some place, I knew this decision will come sooner or later, and I decided to try do it my way so I can see what are the consequences of this plan and the actual benefits from this. I truly believe that in the long term only good things will come out of this, both in the Kernel side and Userland side too.

@circl-lastname
Copy link
Contributor

Why would someone run 32-bit software in current year? For fun, I say, to see how usable it is, but if the maintenance cost outweighs the fun and support then no problem.

@supercomputer7
Copy link
Member Author

supercomputer7 commented Oct 5, 2022

Why would someone run 32-bit software in current year? For fun, I say, to see how usable it is, but if the maintenance cost outweighs the fun and support then no problem.

Exactly for the reason you wrote, it was decided to drop i686 support. By using 32 bit software on a 64-bit capable machine you just limit yourself to a constraint that hardware does not impose - it is you that harm performance and usability of your environment. We don't want to encourage such behavior and although i686 boots a bit faster than x86-64 now, it will change in the future as we keep improving it. In virtualization aspect of the decision - there's basically no justification for keeping i686. It can only be justified for legacy hardware setup.
Maintenance cost at this point is quite high enough to consider this an appropriate measure - we can't introduce kernel fixes to take advantage of the huge virtual memory space in x86-64 without either introducing code duplication or making the code much less readable by using #ifdef soup all over the place. Keeping i686 has great implication on (K)ALSR effectiveness, TmpFS performance and stability issues I try to fix (which is much easier to do with x86-64), and many code paths that are specific to i686 which just add more cost to whoever that needs to maintain it with x86-64 (and in the future, aarch64 as well).

@trflynn89
Copy link
Member

FYI I pushed the branch earlier to fix the CI error, and just pushed again to resolve conflicts against master.

@supercomputer7
Copy link
Member Author

As soon as CI is green let's get this merged @trflynn89 :)

@trflynn89
Copy link
Member

As soon as CI is green let's get this merged @trflynn89 :)

I'll leave the merging of this one up to @awesomekling, just wanted to help push this along 🙃

@Citrullin
Copy link

Just to get this right. You are building a *unix OS that is focused on the 90s aesthetic, just to remove support for such systems?
Do I get you right here?

@Citrullin
Copy link

Exactly for the reason you wrote, it was decided to drop i686 support. By using 32 bit software on a 64-bit capable machine you just limit yourself to a constraint that hardware does not impose - it is you that harm performance and usability of your environment. We don't want to encourage such behavior and although i686 boots a bit faster than x86-64 now, it will change in the future as we keep improving it. In virtualization aspect of the decision - there's basically no justification for keeping i686.

You are quite a funny bunch of people. Ngl. Not even seeing how you are contradicting yourself.

@circl-lastname
Copy link
Contributor

@Citrullin They're not building a 90s OS, but an OS that looks like the 90s. There is a large difference.

@trflynn89 trflynn89 removed the ✅ pr-maintainer-approved-but-awaiting-ci PR has been approved by a maintainer and can be merged after CI has passed label Dec 28, 2022
@supercomputer7
Copy link
Member Author

Exactly for the reason you wrote, it was decided to drop i686 support. By using 32 bit software on a 64-bit capable machine you just limit yourself to a constraint that hardware does not impose - it is you that harm performance and usability of your environment. We don't want to encourage such behavior and although i686 boots a bit faster than x86-64 now, it will change in the future as we keep improving it. In virtualization aspect of the decision - there's basically no justification for keeping i686.

You are quite a funny bunch of people. Ngl. Not even seeing how you are contradicting yourself.

There's simply one thing you don't understand - we don't live in 90s, but we take ideas that were great from the 90s in the computing space.
Also, it is quite rude to come up as a complete stranger on the Internet to this project, telling people they are "funny" just because you don't agree with them. We have (at least I do) some plans on what to do now that i686 is gone, and I will personally dedicate time to work towards implementing those features and optimizations.
It is also very rude to think you can tell people what to do, without even giving a little thought on what is the actual maintenance burden (that of course, you are not the one to handle it) of keeping i686 along with 64bit code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kernel: Remove i686 Support