SetPageForeign in netback
hi,
in netback init mmap_pages,
SetPageForeign(page, netif_page_release);
that is, page->index = netif_page_release
while netif_page_release is a function.
so what's the meaning of SetPageForeign?
And when the function netif_page_release() will be called?
thanks in advance.
Zang Hongyong
[email protected]
2008-06-15
Quoted 5 lines
hi,
in netback initmmap_pages,SetPageForeign(page, netif_page_release);that is,
page->index=netif_page_release
whilenetif_page_releaseis a function.
netif_page_release is a function, and therefore:page->index = netif_page_release
will store netif_page_release function pointer in 'index'
Quoted 1 line
so what's the meaning of SetPageForeign?
Setting a page foreign means that the page is owned by another domain, and that some care needs to be taken when freeing it.
Quoted 1 line
And when the function
netif_page_release()will be called?
Whenever PageForeignDestructor is called (as it calls the destructor function stored in the 'index' field). PageForeignDestructor is called from:__free_pages_ok
andfree_hot_cold_page
Hope this helps.
Cheers
Gr(z)egor(z)