The functions vmalloc(), vmalloc_dma() and vmalloc_32() are provided to allocate a memory area that is contiguous in virtual address space. They all take a single parameter size which is rounded up to the nearest page size. They all return a linear address for the new allocated area.
As is clear from the call graph shown in Figure 7.3, there is two steps to allocating the area.
The first step with get_vm_area() finds a region large enough to store the request. It searches through a linear linked list of vm_structs and returns a new struct describing the allocated region.
The second step is to allocate the necessary PGD entries with vmalloc_area_pages(), PMD entries with alloc_area_pmd() and PTE entries with alloc_area_pte(). Once allocated there is a special case in the page fault handling code which will allocate the necessary pages as necessary.