Well Rik and I missed it. Not that this requires much subtlety ;)
> Just undo the broken patch by Rik, and we should all be home free again.
Problem is that the rmap VM doesn't perform swapout via pagetables.
It performs it via the LRU.
If someone is sleeping on a pagefault against a mmapped file, and a
truncate happens meanwhile, that page comes back as an anonymous
page. It's not on the LRU any more so it has become unswappable.
Maybe we can check i_size in filemap_nopage and deliver a SIGBUS
or something.
For now we can go back to the explicit lru_cache_del() in truncate;
the little bit of unswappable memory is preferable to a deadlock
in TCP. I'll send the patch after a bit of testing.
But (squeaky wheel), longer-term I want to make pagemap_lru_lock
irq safe. This reduces contention on that lock by 30% (bringing
the total reduction for that patch series to around 98% - wiped off
the map). And it fixes this problem. And it allows us to move
pages between LRU lists at IO completion, if we want to do that.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/