todo
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Chris Wright
this is the only things left on the todo i made today.
Xen config
PREEMPT?
Remove. Should work; any problems are bugs.
Quoted 2 lines
Consistently wrap paravirt ops callsites
"ugh" - mingo
Had a thought. What if we do a kind of reverse/two-way module linkage? Somehow compile each pv-op implementation like a module, and then link the appropriate one in at boot time.
Tricky parts: it would need two-way unresolved references between kernel and module, and it would need to be able to run very early in the kernel's life. It would also limit us to plain old calls rather than any inlining (though that could be done separately).
On the upside, it removes pv_ops, and it might simplify the question of how normal module exports work, since by that time they would just be normal kernel functions. All the calls would be normal direct calls rather than indirect. And it would allow us to free the memory for the unused pv-ops backends.
Plausible?
J
Quoted 7 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 2 lines · Chris Wright
Consistently wrap paravirt ops callsites
"ugh" - mingoHad a thought. What if we do a kind of reverse/two-way module linkage? Somehow compile each pv-op implementation like a module, and then link the appropriate one in at boot time.
This is very similar to something Steve was chatting with me about this morning. The idea he was tossing around was something a bit like an initrd that a load_module analog could link up. In a sense, it's similar to the VMI ROM, with the exceptions that the ABI is just created by the compiler from a normal mutable kernel API and it's linkage with symbols available on both sides.
Quoted 3 lines
Tricky parts: it would need two-way unresolved references between kernel and module, and it would need to be able to run very early in the kernel's life.
This is the tricky part, and where Steve and I left off.
Quoted 8 lines
It would also limit us to plain old calls rather than any inlining (though that could be done separately).
On the upside, it removes
pv_ops, and it might simplify the question of how normal module exports work, since by that time they would just be normal kernel functions. All the calls would be normal direct calls rather than indirect. And it would allow us to free the memory for the unused pv-ops backends.
I suspect we could free the unused backends already. It also has one negative side-effect, which is promoting external module code that links with the kernel. IOW, there's much less incentive to get code merged if it's just a matter of linking.
thanks,
-chris
Quoted 12 lines · Chris Wright
Quoted 9 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 3 lines · Chris Wright
Consistently wrap paravirt ops callsites
"ugh" - mingoHad a thought. What if we do a kind of reverse/two-way module linkage? Somehow compile each pv-op implementation like a module, and then link the appropriate one in at boot time.
Quoted 7 lines
This is very similar to something Steve was chatting with me about this morning. The idea he was tossing around was something a bit like an initrd that a
load_moduleanalog could link up. In a sense, it's similar to the VMI ROM, with the exceptions that the ABI is just created by the compiler from a normal mutable kernel API and it's linkage with symbols available on both sides.
Yeah. It would have to happen a lot earlier than initrd. It would be more like a multiboot kernel module or something.
Quoted 7 lines
Quoted 4 lines
Tricky parts: it would need two-way unresolved references between kernel and module, and it would need to be able to run very early in the kernel's life.
This is the tricky part, and where Steve and I left off.
Fortunately the linker code should be pretty easy to make
self-contained. It shouldn't need to do memory allocations or anything
complex like that, so I think its just a matter of grovelling around and fixing up linkages.
Quoted 1 line
I suspect we could free the unused backends already.
We could; we just need to make sure they get their own section so they're easily separable.
Quoted 4 lines
It also has one
negative side-effect, which is promoting external module code that links with the kernel. IOW, there's much less incentive to get code merged if it's just a matter of linking.
It wouldn't be something we'd promote by making it easy to bind out-of-tree code to the interface. And it would still be a kernel-version-specific ABI; no guarantees of stability.
J
Quoted 9 lines · Jeremy Fitzhardinge
Quoted 5 lines
It also has one
negative side-effect, which is promoting external module code that links with the kernel. IOW, there's much less incentive to get code merged if it's just a matter of linking.It wouldn't be something we'd promote by making it easy to bind out-of-tree code to the interface. And it would still be a kernel-version-specific ABI; no guarantees of stability.
BTW, my intention is definitely that all the pv-ops implementations are linked into the kernel at build time; its just the binding references get updated at boot time, and the unused code pages can be recycled. But they're all part of the same kernel image.
J
[added Ingo since he'd probably be interested in this]
Quoted 21 lines · Jeremy Fitzhardinge
Quoted 12 lines · Chris Wright
Quoted 9 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 3 lines · Chris Wright
Consistently wrap paravirt ops callsites
"ugh" - mingoHad a thought. What if we do a kind of reverse/two-way module linkage? Somehow compile each pv-op implementation like a module, and then link the appropriate one in at boot time.
Quoted 7 lines
This is very similar to something Steve was chatting with me about this morning. The idea he was tossing around was something a bit like an initrd that a
load_moduleanalog could link up. In a sense, it's similar to the VMI ROM, with the exceptions that the ABI is just created by the compiler from a normal mutable kernel API and it's linkage with symbols available on both sides.
Quoted 2 lines
Yeah. It would have to happen a lot earlier than initrd. It would be more like a multiboot kernel module or something.
I was taking a look at kernel/module.c and arch/i386/kernel/module.c and it looks like we can copy/modify the former and use part of the later.
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
Tricky parts: it would need two-way unresolved references between kernel and module, and it would need to be able to run very early in the kernel's life.
This is the tricky part, and where Steve and I left off.
I think it's possible. It still be tricky. We need to handle percpu variables. But I have some ideas on how to do it though.
Quoted 4 lines
Fortunately the linker code should be pretty easy to make
self-contained. It shouldn't need to do memory allocations or anything
complex like that, so I think its just a matter of grovelling around and fixing up linkages.
Well, we still need to make sure the kernel knows about this image, so that it doesn't write over it. I guess that can be done like the initrd is.
Quoted 6 lines
Quoted 2 lines
I suspect we could free the unused backends already.
We could; we just need to make sure they get their own section so they're easily separable.
Quoted 8 lines
Quoted 4 lines
It also has one
negative side-effect, which is promoting external module code that links with the kernel. IOW, there's much less incentive to get code merged if it's just a matter of linking.It wouldn't be something we'd promote by making it easy to bind out-of-tree code to the interface. And it would still be a kernel-version-specific ABI; no guarantees of stability.
It will be very similar to how we handle modules (and out of tree modules).
-- Steve