Oh, sorry. I'm uploading pre-8 to ftp.kernel.org right now.
A lot of things actually became a lot cleaner with the "two counters"
approach. There may be something I missed, but it was a pleasure to do the
changes.
Whether it WORKS is another matter ;). It runs fine here, but I bet there
was some detail I missed.
Note that my implementation changed a bit from what I outlined yesterday
evening: the non-lazy mm's count as just "one" in mm_count. So instead of
doing
if (atomic_dec_and_test(&mm->mm_users)) {
drop user space parts
}
if (atomic_dec_and_test(&mm->mm_count) {
free the page table and the mm
}
if became
if (atomic_dec_and_test(&mm->mm_users)) {
drop user space parts
if (atomic_dec_and_test(&mm->mm_count) {
free the page table and the mm
}
}
instead. It made things simpler in some other areas.
> One comment: I don't think that fix for swap_out() (both in my old patch
> and in -pre7) is right. We might go through ->active_mm and be done with
> that. Comments?
We make all the "best" decisions on the mm anyway, so as far as I can see
we would find the same mm regardless of which approach we took. No?
The only difference is when somebody has an active_mm that doesn't even
exist as a non-lazy VM, but when that happens the VM should have been
cleared up already anyway, so that should be a non-issue as far as
swap_out() is concerned.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/