Re: demand paging of vmalloced memory

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

 



Sourav Sen wrote:
> 
> On Wed, 17 Oct 2001, Rik van Riel wrote:
> 
> > Exactly, not swapping kernel memory is so much simpler that
> > the complexity and space saved by that assumption are probably
> > as large as the amount of kernel memory we could save by swapping
> > it out ;)
> >
> > regards,
> 
>         I have a question for Rik, If the vmallocd memory is immediately
> backed by physical pages by something like get_free_pages(), then why the
> need for vmalloc is there at all? I mean we may as well use kmalloc.  Is
> it the case that vmalloc is used when one  is not too sure if required
> contiguous physical memory will be available or not?

It's best to use vmalloc if you need a large chunk of kernel
RAM to be virtually contiguous, but you don't care if it's
physically contiguous. High-order allocations of contiguous
physical memory are very likely to fail once the machine
has been up and running ro a while (since physical RAM
gets fragmented by lots of low-order allocs and frees), but
as long as there is enough free or freeable memory available,
even very large vmalloc requests will succeed, because vmalloc
allocates single pages and maps them contiguously.

Cheers,

-- Joe
# "You know how many remote castles there are along the
#  gorges? You can't MOVE for remote castles!" - Lu Tze re. Uberwald
# Linux MM docs:
http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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