|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] difference between alloc_vm_area() and balloon_alloc_empty_p
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!
lily
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] difference between alloc_vm_area() and balloon_alloc_empty_page_range(),
Lily Huang <=
|
|
|
|
|