Re: kernel BUG at mm/truncate.c:475!

From: Peter Zijlstra
Date: Tue Dec 14 2010 - 04:10:53 EST


On Mon, 2010-12-13 at 23:31 -0800, Hugh Dickins wrote:
> > then I suspect all the vm_truncate_count/restart_addr stuff can go away?
>
> That would be lovely, but in fact no: it's guarding against operations on
> vmas, things like munmap and mprotect, which can shuffle the prio_tree
> when i_mmap_lock is dropped, without i_mutex ever being taken.
>
> However, if we adopt Peter's preemptible mmu_gather patches, i_mmap_lock
> becomes a mutex, so there's then no need for any of this (I think Peter
> just did a straight conversion here, leaving it in, but it becomes
> pointless and would gladly be removed).

I'm still trying to sell that series, so if you see any value in it,
please reply with positive feedback ;-)

Also, the whole vm_truncate_count/restart_addr isn't entirely useless,
its still a lock break which might help with long held locks. Imagine
someone trying to unmap several TB worth of pages at once (not entirely
beyond the realm of possibility today, and we all know tomorrow will be
huge).


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/