Hey folks. This isn't a completely formed idea yet, but I was thinking about how to improve the config situation and wanted to throw an idea I had out there.
It seems to me that a lot of things people want to set up are "like X except" where they take, for instance, an x86 PC like setup, or something like some android phone, or etc., etc., and then want to tweak it some way to use a different CPU, or to use a different disk layout, or whatever. Currently, there are three ways to do that. 1. Copy the whole config and modify the copy. This is impractical since there are a lot of dependencies that would need to be copied too. 2. Modify the config in place, likely with a new option in front of it to preserve existing behavior. This isn't great because the complexity accumulates, probably non-linearly, and we end up somewhere like where we are today. 3. Copy fs.py (or equivalent), do the standard stuff with the standard helper functions, and then go back and patch up the config to be what you actually wanted. This is a bit fragile and not very user friendly. None of these options are great, and I was thinking if there was a way to avoid them. What if we had a sort of environment or namespace or the like where you could set properties, and then various canned objects were constructed in the context of that environment? For instance, what if there was an ambient setting which said CPU == SimpleAtomicCPU, and then the thing putting the system together would just dereference "CPU" when it wanted to add a CPU? I don't know how far this could be extended, but perhaps we could have lists of peripherals we wanted, like sets of disks or network devices or... and? With a mechanism like that, you could tweak the context things were built in to get your special adjustment in there, there could still be generic constructs so you wouldn't have to build everything from scratch, and you could even potentially fold together more than one of those contexts to have, say, one that added in KVM CPUs and one that added in bridging the network to the real world, all without having to have a cross product of configs or some elaborate series of scripts to run. Anyway, like I said, not fully thought out, but I wanted to mention it before I forgot about it. Gabe _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
