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

Build rootfs image after building kernel #170

Closed
wants to merge 2 commits into from

Conversation

chantra
Copy link
Contributor

@chantra chantra commented Nov 9, 2022

This is the complementary part of libbpf/ci#74.

In this change, we build the VM's rootfs right after building the kernel/selftests....

Then, when running qemu, we pass the name of the test we want to run.

The location of root.img was also changed from /tmp to workspace. The reason behind this change is that on bare-metal runners, workspace is mounted on tmpfs and this will help removing some more IOs from those hosts.

libbpf/ci#74 handles the case if root.img is on tmpfs, it will not use the "cache=none" options, which relies on O_DIRECT, and is not available on tmpfs.

@chantra chantra marked this pull request as draft November 9, 2022 22:36
@chantra chantra force-pushed the build_kernel_and_vm branch 3 times, most recently from eea4b03 to b8f2a5b Compare November 10, 2022 17:39
@chantra chantra marked this pull request as ready for review November 10, 2022 17:45
@chantra chantra requested review from danielocfb and anakryiko and removed request for danielocfb November 10, 2022 17:45
@danielocfb
Copy link
Contributor

Can you share more of the motivation for this change, please? Is it to speed up CI? It seems as if all artifacts are now 30+ MiB larger in size, so intuitively it's not clear whether we gain anything performance-wise, if that's the goal.

I also see that s390 are still failing and you still seemed to be investigating. Should this be converted back to Draft state?

@chantra chantra force-pushed the build_kernel_and_vm branch from b8f2a5b to f0879c2 Compare November 12, 2022 00:15
@chantra
Copy link
Contributor Author

chantra commented Nov 15, 2022

Can you share more of the motivation for this change, please? Is it to speed up CI? It seems as if all artifacts are now 30+ MiB larger in size, so intuitively it's not clear whether we gain anything performance-wise, if that's the goal.

The motivation is 2 folds:

  • build the vm once and run it for every tests. We trade bigger artifacts for CPU win. e.g when we use to have 4 test runners building the VM, we now only have the kernel build runner doing this. end to end time should be relatively the same, but we while runners are not creating the vm, they can do other stuff (running test, building kernels).
  • second, having the VM directly available from the artifacts to download means that operators can easily access them, download them and run the VM locally on their computer in order to troubleshoot issues.

I also see that s390 are still failing and you still seemed to be investigating. Should this be converted back to Draft state?

yes

@chantra chantra marked this pull request as draft November 15, 2022 22:42
chantra added 2 commits March 9, 2023 15:17
Currently, each test job is rebuilding the artifacts.
We can do this just once after we built the kernel and prepare the
rootfs.
The tests than get ran by invoking the vm with "run_tests={test},{test2}" appended
to boot command.

Signed-off-by: Manu Bretelle <chantr4@gmail.com>
@chantra chantra force-pushed the build_kernel_and_vm branch from f0879c2 to 2cb8b5e Compare March 9, 2023 23:18
@chantra
Copy link
Contributor Author

chantra commented Jan 26, 2024

With #243 landed, this is not needed anymore.

@chantra chantra closed this Jan 26, 2024
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.

2 participants