David Howells wrote: > David Howells wrote: > >> Yes. I found the major leak this morning. There may be a minor leak, but I'm >> not convinced it's in the mmap stuff. See revised patch. > > Oops. That was the old patch. Try this one instead. > Here are some changes to make it more stable on my system. In do_mmap_private, I've commented out the logic to free excess pages, as it fragments terribly and causes a simple while true; do cat /proc/buddyinfo; done loop to go oom. Also, I think you're freeing high-order pages unaligned to their order? In shrink_vma, we must save the mm across calls to remove_vma_from_mm (oops when telnetting into the box). In do_munmap, we can deal with freeing more than one vma. I've not touched the rb-tree logic in the shared file case, as I have no idea what it's trying to do given that only exact matches are allowed. It still does not survive my mmap stress-tester, so I'll keep looking. Why do we need vm_regions for anonymous memory? Wouldn't it be enough to just have a VMA? Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif