vamsi_krishna@xxxxxxxxxx wrote:
>
> Admittedly, not a significant amount of memory is wasted in the current
> scheme of always linking arch-specific code into the kernel. and there is
> no compilation problem as of now. However, the code that we will eventually
> add to __dump_silence{resume}_system will need access to dump_flags and
> possibly some other global variables of the dump driver, which won't be
> available in the kernel if dump.o is built as a module.
>
> I agree with drivers/dump/dump.c, drivers/dump/i386/dump.c etc. I have done
> something very similar recently when modifying our dprobes utility to work
> as a module. I will look at doing this if there are no other comments.
None at this time. Go ahead and move it. BTW, if there are variables
that will remain static at all times (such as dump_function_ptr), make
sure they are declared in one file. If this means moving dump_function_ptr
to init/main.c and declaring everything there, or moving them all to
kernel/panic.c, that's fine.
This means I shouldn't touch the tree until you're done. Let me know when
that is so I can update the files in their new location(s).
--Matt
> Regards.. Vamsi.
>
> Vamsi Krishna S.
> Linux Technology Center,
> IBM Software Lab, Bangalore.
> Ph: +91 80 5262355 Extn: 3959
> Internet: vamsi_krishna@xxxxxxxxxx
>
> "Matt D. Robinson" <yakker@xxxxxxxxxxxxxx> on 09/12/2001 12:34:49 PM
>
> Please respond to "Matt D. Robinson" <yakker@xxxxxxxxxxxxxx>
>
> To: S Vamsikrishna/India/IBM@IBMIN
> cc: lkcd@xxxxxxxxxxx
> Subject: Re: issues with dump compiled as a module
>
> vamsi_krishna@xxxxxxxxxx wrote:
> >
> > Matt,
> >
> > Even when we compile LKCD as a module, arch/i386/kernel/dump.c gets built
> > into the kernel, which does not seem to be right.
>
> This is actually correct (for now) -- we can change it, but if we do,
> I'd recommend something like drivers/dump/<arch> instead of
> arch/i386/kernel.
> We were in arch/<arch>/kernel for a few reasons:
>
> - built with architecture-specific flags;
> - normally statically built into the kernel;
> - uses fields in arch/i386/kernel/*.[ch]
>
> > Problems:
> > - arch/i386/kernel/dump.c requires global variables in
> drivers/block/dump.c
> > when __dump_silence_system etc are implemented. However, this cannot
> > compile when LKCD is a module.
>
> I didn't get a compile error, and I've been building strictly as a
> module for now. Are you CONFIG_SMP?
>
> > - it should not be linked into the kernel, wastes kernel memory when
> dump.o
> > is not loaded.
>
> How much memory?
>
> > We should probably move arch/i386/kernel/dump.c into a different location
> > and link it to drivers/block/dump.o.
>
> I don't mind moving it to drivers/dump/<arch> and moving
> drivers/block/dump.c
> to a new location. Thoughts?
>
> > Comments?
>
> Let me know what you think of the above, and if you want, go ahead and
> move them. Note, you'll need to change the Makefiles as well.
>
> Thanks, Vamsi.
>
> --Matt
>
> > Regards.. Vamsi.
> >
> > Vamsi Krishna S.
> > Linux Technology Center,
> > IBM Software Lab, Bangalore.
> > Ph: +91 80 5262355 Extn: 3959
> > Internet: vamsi_krishna@xxxxxxxxxx
|