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

[Xen-devel] difference between alloc_vm_area() and balloon_alloc_empty_page_range()

  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Lily Huang" <ushuanglily@xxxxxxxxx>
  • Date: Mon, 10 Jul 2006 10:50:19 -0400
  • Delivery-date: Mon, 10 Jul 2006 07:51:20 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=TZejHch/4W+SZr8Mo/8flhYGi3iz6oVkTBWENJOHNG0V0YPnVXsjXdkxxOFfqL8aiCkyFJ8Sid8czm8OfqNPWhiWWakzJ0S5PgVQCkCC9m7MFr4vs+AsBJono641X24S7jhecDCNMHjCVlYZP5xWwiQPSSm4rusEPU4AYWRMQfM=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

When I read the blkfront.c and blkback.c, I noticed that in some places (e.g, map_frontend_page()) it uses alloc_vm_area() to allocate memory for foreign page mapping.  However, in some other places,
it used balloon_alloc_empty_page_range() to allocate memory for mapping.  What's the difference between these two functions? Why not just use one function like alloc_vm_area() or balloon_alloc_empty_page_range()?

More important, I noticed that with alloc_vm_area(), it requires lock_vm_area() to lock down the vm area. Why do we need this? Why don't we need some locking mechanisms on memory allocated with balloon_alloc_empty_page_range()?

thanks in advance for your kind help!

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.