Kevin Lawton wrote:
> In alloc_vm_pages(), for the pages allocated for ad->guest,
> vmalloc() is used, then retrieve_vm_pages() to get the
> physical pages addresses, then mem_map_reserve(), so the
> swapper doesn't make these eligible.
> 
> Some other structures which need multiple pages, such
> as the IDT, GDT, LDT, and IDT stubs also use this
> same calling sequence except don't use mem_map_reserve().

Correct.  You need mem_map_reserve() only on pages that are mapped
to user space by the mmap() call.  Normal kernel memory is never
swapped, so you don't need to do anything special.  If you map
pages allocated as kernel memory to user space, however, the
swapper becomes confused, because all pages in user space are
by default swappable ...

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688

Reply via email to