From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH 2/2] move unneeded data to initdata section Date: Thu, 15 Nov 2007 11:19:26 -0700 Message-ID: References: <20071107120100.GA10185@iris.sw.ru> <473C5ABC.5090204@sw.ru> <20071115151429.GC22825@uranus.ravnborg.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <20071115151429.GC22825@uranus.ravnborg.org> (Sam Ravnborg's message of "Thu, 15 Nov 2007 16:14:29 +0100") Sender: netdev-owner@vger.kernel.org To: Sam Ravnborg Cc: "Denis V. Lunev" , "Denis V. Lunev" , davem@davemloft.net, containers@lists.osdl.org, netdev@vger.kernel.org, clg@fr.ibm.com, benjamin.thery@bull.net List-Id: containers.vger.kernel.org Sam Ravnborg 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