-
Notifications
You must be signed in to change notification settings - Fork 92
kernel: config: add config fragment support #314
kernel: config: add config fragment support #314
Conversation
Notes then:
and then
and then finally
So, really looking for feedback on - is this the right path forwards? Do the fragments look sensible? Any volunteers to help test and update/define the fragments. @amshinde @mcastelino - maybe you can cast an eye over the network fragment for me? |
I'll attach a diff between the current and the frag generated 4.19 kernel configs, as that probably will help review. Notable things from a quick browse then:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @grahamwhaley - this is great! I'd still prefer we create the fragments in YAML and then "build" the Kconfig fragments from that, but I think this is a really good first step.
Aside from my inline comments, I think the following scenarios need documenting:
-
What if two config fragments have conflicting config values? In other words, is there / should there be ordering of fragments?
If so, we should require them to have a numeric prefix like the ol' SysV init scripts in days of yore.
-
What if a full kernel config and a set of fragments exists? Which takes priority, or is that an error?
This PR has reminded me about the idea of providing |
We can trivially enable the kernel config options - but it will add a bit of size to the kernel (very small increase I'd guess). Adding them to the packaging would make them easier to get hold of, and cost no runtime space/time. |
Yes, the packaging option may be best approach initially. The general premise is that "the workload should not care about the guest kernel". But now we have multiple architectures and those have differing config options, there may be scenarios where a workload may find itself running in an environment that it cannot tolerate. Depending on what we think our chance of success is wrt making all arch configs entirely consistent from the userspace perspective (I'd say unlikely), we should consider providing a way for either the runtime or the workload itself to determine if the environment provided by the guest is suitable. If we provide kernel config details at the packaging level, that implies the runtime would need to offer a way for the "something" related to the workload querying those config details. If the env is not suitable, it would abort the Checking the packaging config details could be done by an admin of course. A manual step, but I'm wondering if we need the information in both places to support the automatic approach. Having said all this, maybe the workload should just check the guest env and error if it finds something it doesn't like. As long as we provide "a way" for the admin to determine easily what environment the workload is being provided with, I guess that's fine at this stage. |
Before I forget, @jodh-intel asked:
I've enabled 'checking' on the magic merge script - it will now complain, with debug, and stop if you get two settings with different values.
Fragments take priority - well, the code looks for a fragment first, and uses it if found. I'm going to say 'it is the new modern way, so takes priority' :-) |
@grahamwhaley - ta. I'd consider adding that details to the README. |
5017b37
to
c89c366
Compare
feedback fed in - updates pushed.
And, with additions comes growth. |
While dividing into fragments will make things a bit clearler, I'm wondering if its absolutely necessary to have the fragments be kernel version specific. What happens if we apply these fragments into 4.14, for example? I don't want to manage per kernel fragments, if feasible. |
That's a fair point @egernst - let me see if there is a sane way for us to keep a generic set of fragments, whilst still allowing kernel version specific bits. That should be easy if the CONFIG elements don't clash, but harder if we want to be able to over-ride on a per-version basis. I'll scrape the feedback, re-arrange and update rsn. |
c89c366
to
74b6980
Compare
@egernst reworked to remove kernel version from the fragment path. In its current state then it will use the fragments for all x86 kernel builds, and the existing premade configs for all other arch's. |
/test |
@grahamwhaley looks like you need to update config version:
|
I tried all i could to improve the entropy value of the system but nothing in my local tests have improved the value.
|
Heh, @ganeshmaharaj I'm pretty sure the entropy issue has arisen as I added in |
ae1975b
to
2f7f573
Compare
/test |
2f7f573
to
308462d
Compare
/test |
Add the framework to build kernel config files from trees of kernel fragments. If no fragment directory is found for the requested kernel version and architecture then revert to looking for a whole prebuilt kernel config file instead. Fixes: kata-containers#234 Signed-off-by: Graham Whaley <[email protected]>
Embellish the README a bit, and add some details about the new fragment method. Signed-off-by: Graham Whaley <[email protected]>
Add the base common fragments and x86_64 specific fragments for the 4.19.x kernel. Signed-off-by: Graham Whaley <[email protected]>
Now we are using the fragments, drop the x86_64 4.19 config file so we default to fragment mode. Signed-off-by: Graham Whaley <[email protected]>
In order to support kernel config fragments in the snap, the kernel should be built using the build_kernel.sh script. fixes kata-containers#438 Signed-off-by: Julio Montes <[email protected]>
Modifying configs, need to bump config version file. Signed-off-by: Graham Whaley <[email protected]>
308462d
to
f6eb061
Compare
/test |
Depends-on: github.com/kata-containers/packaging#314 Fixes: #123141234 Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Depends-on: github.com/kata-containers/packaging#314 Fixes: #123141234 Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
Depends-on: github.com/kata-containers/packaging#314 Fixes: #123141234 Signed-off-by: Ganesh Maharaj Mahalingam <[email protected]>
@grahamwhaley @ganeshmaharaj Whats the status of this PR? What needs to be done to land this PR? |
The PR is failing the firecracker CIs (see over on the parallel test PR at kata-containers/runtime#1588 Also, we really should test this against some SRIOV setup, as I'm almost sure it will not support that either at present. |
ping @grahamwhaley |
@grahamwhaley - branch conflicted. Any updates on this? Maybe now kata-containers/runtime#1813 has landed this may magically work? 😄 |
tests: reduce the amount of log displayed
ping @grahamwhaley Will #646 replace this PR? |
@caoruidong - yep, absolutely - #646 is a respin of this PR to continue the work. Closing this one now. |
Add support for building kernel configs from a set of 'fragment' files, rather than just copying fully pre-built config files.