Hi Neha,<br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 12:25 AM, neha naik <span dir="ltr">&lt;<a href="mailto:nehanaik27@gmail.com" target="_blank">nehanaik27@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi All,<br> From what i have learnt vmalloc requires a minor page fault 
to sync the process page tables with the reference page tables. So, is 
it safe to use memory already allocated by vmalloc in io context/device 
driver code (especially when the io call has returned back to the device
 driver after finishing io on the device). I know that in general it is 
better to use kmalloc (for better efficiency  and so on....) but, i want
 to know if it is inaccurate to use vmalloc in this particular case and 
why (in terms of cannot service page faults in interrupt context etc)?<br>
<br></blockquote><div> </div><div>vmalloc doesn&#39;t result in any minor page fault. Once the page are allocated for vmalloc, pages will reside in the main memory till released.</div><div><br></div><div>The only difference between kmalloc-ed and vmalloc-ed memory is continuity of the pages in main memory.</div>

<div>Pages allocated using vmalloc is not suitable for purposes like dma since it may be fragmented across main memory.. Otherwise both are same.</div><div><br></div><div>There is no other advantage to kmalloc over vmalloc.</div>

<div>HTH.</div><div><br></div><div>Thanks,</div><div>Arun</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks in advance for your help.<br><br>Regards,<br>

Neha
<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>
<br></blockquote></div><br>