<br><div class="gmail_quote">On Fri, Aug 17, 2012 at 12:19 AM, Ezequiel Garcia <span dir="ltr"><<a href="mailto:elezegarcia@gmail.com" target="_blank">elezegarcia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey Amar,<br>
<div class="im"><br>
On Thu, Aug 16, 2012 at 3:39 PM, Amarnath Revanna<br>
<<a href="mailto:amarnath.revanna@gmail.com">amarnath.revanna@gmail.com</a>> wrote:<br>
> Just want to add a little more for better understanding:<br>
><br>
> When I spoke about .init section of the final kernel image, please note that<br>
> this section is going to<br>
> contain all the __init data (and functions) coming from _All_ the drivers<br>
> and modules that were included<br>
> as part of the kernel image. Hence, after initialization when we look at the<br>
> print:<br>
><br>
> " [1.011596] Freeing unused kernel memory: 664k freed "<br>
><br>
> we see 664k bytes being freed.<br>
><br>
> This is a significant amount of contiguous physical memory that we can see<br>
> being released by the kernel.<br>
><br>
> The same cannot be held true for a single loadable module which may be<br>
> releasing just a few, virtually<br>
> contiguous memory.<br>
><br>
<br>
</div>It's crystal clear ;-) Nice explanation. It's important to add<br>
something to clearify a bit your<br>
explanation (please correct me if I'm wrong):<br>
<br>
When Amar is talking about "virtually contiguous" kernel memory he<br>
implies that this<br>
memory is physically *dis*contiguous, i.e. based on page-entries.<br>
This is the kind of memory used for loadable modules,<br>
for instance, modules that get loaded with modprobe.<br>
<br>
On the other hand, built-in modules are compiled *inside* the kernel<br>
image (bzImage).<br>
The memory used for this image is physically contiguous: it's a big<br>
contiguous block<br>
of memory pages. Contiguous memory is important for kernel, and therefore<br>
is *very* important to spend some effort minimizing it.<br></blockquote><div><br></div><div>Ezequiel,</div><div><br></div><div>Thanks for adding the clarification here :-)</div><div><br></div><div>Regards,</div><div>-Amar</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Ezequiel.<br>
</blockquote></div><br>