Does anyone know when the close function pointer of the struct vm_operations_struct (linux/mm.h) is called? Is it when munmap is called for the specified region?
If so is th开发者_运维技巧is synchronous, meaning that the close should have been called after returning from munmap?
If I remember correctly it is in the munmap, It is not necessarily synchronous but it does require some locks/semaphores for the critical sections so that get_user_pages and access cannot read from an munmap'ed area incorrectly. If by synchronous you mean that the close happens in the munmap (by which you mean serially) then yes the vma area is removed from the linked list and then handed back to the kernel for allocating for other processes (the physical addresses).
精彩评论