[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] GNTTABOP_unmap_grant_ref
On 1/24/06, King, Steven R <steven.r.king@xxxxxxxxx> wrote: > Vma->close() didn't work. Thanks for the great suggestion though. :^) I've run up against this in the past. Linux vmas don't have a hook point that allows you to clean things up before the associated PTEs are zapped, and so you are forced to take the implicit unmap path if you unexpectedly destroy an mmaped region containing grants without cleaning them up properly. One solution would be to add a new vma destructor op that gets called prior to the zap and then let your driver clean things up there. I have no idea if this would fly with the LKML folk though. ;) Fixing the implicit unmap code to automagically clean up on (e.g.) vma destruction is not the correct solution. There isn't enough information to associate a mapped PTE to the appropriate active grant, and i don't think we want to add the space overhead in Xen required to track this sort of thing just to babysit VMs that don't clean things up correctly. If a grant is mapped multiple times, the implicit unmap code has no way to tell which active grant to garbage collect, and things can go terribly wrong. As other people have said, grants to user space are rather less thoroughly tested, but an extra vma op seems to me to be a good solution. a. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |