Minimal Kernel Config for a F14 KVM guest
Eamon Walsh
ewalsh at tycho.nsa.gov
Fri Jul 1 16:04:41 UTC 2011
On 07/01/2011 11:49 AM, David Quigley wrote:
> On Fri, 01 Jul 2011 16:01:32 +0100, agraham wrote:
>> On 07/01/2011 04:12 AM, Dave Quigley wrote:
>>> Hello,
>>> I will be teaching a one day class in a few weeks and I am
>>> going to
>>> have the students do some kernel programming. Since it is only a one
>>> day
>>> course I need to pack as much info into it as possible so I would
>>> like
>>> to minimize the build times as much as possible. The modifications
>>> that
>>> they will be making will be touching core kernel headers so it will
>>> have
>>> to rebuild almost all of the kernel every time. Because of this I'd
>>> like
>>> to get a kernel config that can get F14 booting (the minimal
>>> install) in
>>> KVM with the shortest build time possible. I've gotten the build
>>> down to
>>> 9 minutes and 55 seconds but I would like it sub 5 minutes. Does
>>> anyone
>>> have or know of a place where I can find a bare minimum config. I've
>>> been working on trimming down the stock F14 kernel but there is so
>>> much
>>> to go through I'm thinking it might be best to build it up from an
>>> allnoconfig instead.
>>>
>>> Dave
>> When making the kernel use make -j8 (assuming you have 8 cores) that
>> should reduce your time by running 8 parallel processes, in addition,
>> install ccache, that only compiles the code if it has changed or is
>> dependant on some other change, this should result in recompile of
>> only
>> a few mins.
>>
>> Albert.
> I doubt that people will be allocating 8 cores to a VM. I have 2 cores
> and 1GB of memory allocated at the moment and use -j3 to compile. The
> problem is they will be touching security.h which in one way or another
> is pretty much included by every source file in the Linux kernel so
> ccache won't be of much help (my normal dev box has ccache installed and
> it doesn't save me much time). The biggest way to cut down on time seems
> to be remove all the drivers that I can from being built. I think I have
> this almost complete. It would be nice if there was a make kvmconfig
> which gave you the base for an x86 or x86_64 kvm kernel config and then
> you can turn on whatever else you want filesystem and driver wise for
> passthrough devices.
>
> Dave
>
Maybe you could try building allmodconfig, then boot the kernel and lsmod to see what has been loaded. Then disable everything except for those modules.
--Eamon
--
Eamon Walsh
National Security Agency
More information about the users
mailing list