vm: weird behaviour when munmapping
Quoted 5 lines · Peter Zijlstra
No indeed. You seem confused with remaining and new.
It has one VMA (A) it needs to split that into two pieces, it happens to do it like (B,A') where A' is the old VMA object with new a start address, and B is a new VMA object.
Is there any rules to decide which VMA is the new one ?
Quoted 1 line
From what you wrote it seems that we call B the new object because
it has a new end address...
Quoted 1 line
From my point of view, I called B the old VMA simply because it's
going to be destroyed...
Francis
___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com
Quoted 8 lines · moreau francis
Quoted 5 lines · Peter Zijlstra
No indeed. You seem confused with remaining and new.
It has one VMA (A) it needs to split that into two pieces, it happens to do it like (B,A') where A' is the old VMA object with new a start address, and B is a new VMA object.
Is there any rules to decide which VMA is the new one ?
The new object is the one allocated using:
new = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
Quoted 2 lines
From what you wrote it seems that we call B the new object because it has a new end address...
No, because its newly allocated.
Quoted 2 lines
From my point of view, I called B the old VMA simply because it's going to be destroyed...
Please read Mel Gorman's book on memory management to gain a better understanding.
http://www.phptr.com/bookstore/product.asp?isbn=0131453483&rl=1