<div dir="ltr"><div><p dir="ltr">Not exactly, vmalloc&#39;ed addresses can generate page faults.</p><p>vmalloc&#39;ed page entries live in kernel master page table, not in <br></p><p>every process&#39; page table. When a vmalloc page fault occurs,</p><p>kernel simply copy the page table entry from master page table to <br></p>the current process&#39; page table and fix the page fault.<br><br></div>MH<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 8:03 PM, Leon Romanovsky <span dir="ltr">&lt;<a href="mailto:leon@leon.nu" target="_blank">leon@leon.nu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Sep 10, 2014 at 5:52 PM, Manavendra Nath Manav<br>
&lt;<a href="mailto:mnm.kernel@gmail.com">mnm.kernel@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; On 10-Sep-2014 6:24 pm, &lt;<a href="mailto:Valdis.Kletnieks@vt.edu">Valdis.Kletnieks@vt.edu</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Wed, 10 Sep 2014 14:45:23 +0530, Manavendra Nath Manav said:<br>
&gt;&gt;<br>
&gt;&gt; &gt; But if the total RAM is limited (less than 896MB LOWMEM), for example as<br>
&gt;&gt; &gt; in<br>
&gt;&gt; &gt; embedded devices how the kernel code be kept in RAM all the time. Am I<br>
&gt;&gt; &gt; correct to assume that the kernel pre-fetches all pages when entering<br>
&gt;&gt; &gt; kernel mode from user mode?<br>
&gt;&gt;<br>
&gt;&gt; No, kernel code is loaded by your boot loader, and *it stays there*.<br>
&gt;&gt; Similarly,<br>
&gt;&gt; if you modprobe something, the kernel allocates the page, loads the code,<br>
&gt;&gt; and leaves it there.<br>
&gt;&gt;<br>
&gt;&gt; Particularly in embedded devices, where you know all the modules the<br>
&gt;&gt; kernel may<br>
&gt;&gt; need, it&#39;s common to just create a kernel with everything built in, no<br>
&gt;&gt; module<br>
&gt;&gt; support, and when the system boots, it loads into memory and never moves<br>
&gt;&gt; again.<br>
&gt;&gt;<br>
&gt;<br>
&gt; Linux kernel memory is not page-able, but memory allocated through vmalloc<br>
&gt; can still cause page fault. How device drivers using vmalloc handle this?<br>
</div></div>Pages allocated via vmalloc call won&#39;t generate page-faults.<br>
<span class="im HOEnZb"><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
&gt; <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
&gt;<br>
<br>
<br>
<br>
</span><span class="HOEnZb"><font color="#888888">--<br>
Leon Romanovsky | Independent Linux Consultant<br>
        <a href="http://www.leon.nu" target="_blank">www.leon.nu</a> | <a href="mailto:leon@leon.nu">leon@leon.nu</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div>