Re: Re: About Internal Fragmentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Kuncoro....

Here is my "not so smart" answer...hope it helps....

> I traced the code at __alloc_pages(). It seems that buddy allocator
> will wake up kswapd() when it can't fulfil the request.
> What is the role of kswapd here?

I think the reason is simple: since buddy allocator can't allocate 
enough page to satisfy your request, it is a signal toward kswapd to 
flush inactive page to the disk, thus freeing physical RAM. I believe 
the related function is something name shrink_cache and/or 
refill_inactive_page....


> However, I had changed kmalloc to vmalloc, and resulted in system
> panic. (page fault).
> Do you have any idea why?

The only explanation I can think now: since vmalloc() allocate memory 
that is only virtually contigous but not necessarily physically 
contigous, it made several function related with hardware device 
internal's work which always assume physically contigous memory fail to 
work properly. Read the "Linux kernel Development" 1st edition page 175 
about vmalloc(), there I got this raw conclusion

regards

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux