[Devel] Re: [PATCH 2/2] move unneeded data to initdata section
Eric W. Biederman
ebiederm at xmission.com
Thu Nov 15 10:19:26 PST 2007
Sam Ravnborg <sam at ravnborg.org> writes:
> On Thu, Nov 15, 2007 at 05:42:04PM +0300, Denis V. Lunev wrote:
>>
>> nothing is discarded after module load. Though, I can be wrong. Could
>> you point me to the exact place?
> If __initdata is not discarded after module load then we should do it.
> There is no reason to waste __initdata RAM when the module is loaded.
Down at the bottom of sys_init_module we have:
/* Drop initial reference. */
module_put(mod);
unwind_remove_table(mod->unwind_info, 1);
module_free(mod, mod->module_init);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
mod->module_init = NULL;
mod->init_size = 0;
mod->init_text_size = 0;
mutex_unlock(&module_mutex);
return 0;
Which frees the memory for the .init sections.
Eric
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list