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

Simpler clone #2196

Closed
wants to merge 21 commits into from
Closed

Simpler clone #2196

wants to merge 21 commits into from

Conversation

fwsGonzo
Copy link
Member

@fwsGonzo fwsGonzo commented Feb 9, 2020

This replaces the syscall-based cooperative threads with call-based, which will be much much faster. Also removes the children-management, which never had any use. Threads are much slimmer now.

Also improves reliability of blocking calls. It was possible for the system to go to sleep while the event that would have unblocked had already been processed. Fixed now.

This PR needs musl 1.1.24 to work.

Allows the underlying devices to know about the old CPU as well as the ability to
migrate a network stack to any CPU. It is still recommended to only migrate to
the CPU you are currently on, and to make sure the OS is quiet during this operation.
With -march=native enabled, the compiler generates some broken code. It's almost
impossible to solve, so I don't even bother trying. Disabling optimizations and
inlining all the PCI read/write functions had no effect. Virtionet driver won't
initialize past the probe_resources() function, but the other drivers do.
@alfreb
Copy link
Contributor

alfreb commented May 11, 2024

We'll get to this once everything is building again 😊

@alfreb
Copy link
Contributor

alfreb commented Jun 2, 2024

Hi, I've finally gotten around to this. As we've discussed offline, we will branch off 0.16.x from v0.15.0 to recover the original SMP implementation without pthreads (which we have thanks to you), but I'd be also be happy to have the "all pthreads" approach as a separate platform. We could split x86_pc into

  1. x86_smp, the v0.15 SMP model and
  2. x86_pthread, the full-on SMP with pthreads kernel currently on master.
    As it seems that we both want the x86_smp without pthreads to be the default, I've now created a branch https://github.com/includeos/IncludeOS/tree/pthread-kernel where you can continue this work if you'd like, until we figure out if and how to integrate everything. That branch boots with ./minimal-test.sh - but there's at last one ghost 👻

I've also tried to merge this PR and upgraded to musl 1.1.24 in a new branch, https://github.com/includeos/IncludeOS/tree/pthread-kernel-musl-1.1.24

That branch however, fails to initialize libc and keeps rebooting for me. I don't think this PR causes that issue - on the contrary I think there's been a latent ghost on master, probably since before v0.15, which may be related to the new toolchain and new compiler, to my mmap / allocator changes that we shoehorned in, or something else entirely. I'll be reworking the boot sequence in the new release branch to try to simplify all of that and will then revisit both of the mentioned pthread branches once we get to a state where we have something running with the original SMP library again, and importantly, tests and ideally CI.

If you decide to get this into a working state, feel free to take ownership over pthread-kernel at any time, and cherry pick what you find useful from pthread-kernel-musl-1.1.24 (I have newer musl working there). You can then reintegrate this PR on top of pthread-kernel and delete pthread-kernel-musl-1.1.24. We can then leave it as a prototype until we get v0.16.0 into a decent shape and consider creating a separate platform for the pthread kernel.

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.

None yet

2 participants