On Fri, Aug 20, 2010 at 10:43 AM, Ian Campbell <ijc@hellion.org.uk> wrote:
Exactly.
It should be a pretty straightforward search-and-replace. And almost
all of it would be real cleanups.
And it would be trivial to change the loops like
for (vma = mm->mmap; vma; vma = vma->vm_next)
into basically just
list_for_each_entry(vma, &mm->mmap, vm_list)
etc.
I'm not convinced a tunable is really the right thing, but in this
case it might be acceptable, since you really are doing something
rather specific and odd. Changing the VM to use doubly-linked lists
would be a lot _cleaner_, though.
I'd really hate to try to do something subtle that doesn't have
obvious semantics. Subtle code is buggy code. Maybe not today, but two
years from now..
Linus
--