Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757825Ab0LNJKr (ORCPT ); Tue, 14 Dec 2010 04:10:47 -0500 Received: from canuck.infradead.org ([134.117.69.58]:33940 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754719Ab0LNJKn convert rfc822-to-8bit (ORCPT ); Tue, 14 Dec 2010 04:10:43 -0500 Subject: Re: kernel BUG at mm/truncate.c:475! From: Peter Zijlstra To: Hugh Dickins Cc: Andrew Morton , Miklos Szeredi , Michael Leun , linux-kernel@vger.kernel.org, linux-mm@kvack.org In-Reply-To: References: <20101130194945.58962c44@xenia.leun.net> <20101201124528.6809c539@xenia.leun.net> <20101202084159.6bff7355@xenia.leun.net> <20101202091552.4a63f717@xenia.leun.net> <20101202115722.1c00afd5@xenia.leun.net> <20101203085350.55f94057@xenia.leun.net> <20101206204303.1de6277b@xenia.leun.net> <20101213142059.643f8080.akpm@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Tue, 14 Dec 2010 10:10:07 +0100 Message-ID: <1292317807.6803.1324.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1263 Lines: 27 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/