From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759917Ab0KRRN4 (ORCPT ); Thu, 18 Nov 2010 12:13:56 -0500 Received: from gir.skynet.ie ([193.1.99.77]:58408 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755198Ab0KRRNz (ORCPT ); Thu, 18 Nov 2010 12:13:55 -0500 Date: Thu, 18 Nov 2010 17:13:39 +0000 From: Mel Gorman To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov Subject: Re: [PATCH 02 of 66] mm, migration: Fix race between shift_arg_pages and rmap_walk by guaranteeing rmap_walk finds PTEs created within the temporary stack Message-ID: <20101118171339.GM8135@csn.ul.ie> References: <20101118111349.GG8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20101118111349.GG8135@csn.ul.ie> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 18, 2010 at 11:13:49AM +0000, Mel Gorman wrote: > > This patch fixes the problem by using two VMAs - one which covers the temporary > > stack and the other which covers the new location. This guarantees that rmap > > can always find the migration PTE even if it is copied while rmap_walk is > > taking place. > > > > Signed-off-by: Andrea Arcangeli > > This old chestnut. IIRC, this was the more complete solution to a fix that made > it into mainline. The patch still looks reasonable. It does add a kmalloc() > but I can't remember if we decided we were ok with it or not. Can you remind > me? More importantly, it appears to be surviving the original testcase that > this bug was about (20 minutes so far but will leave it a few hours). Assuming > the test does not crash; > Incidentally, after 6.5 hours this still hasn't crashed. Previously a worst case reproduction scenario for the bug was around 35 minutes. -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id A763E6B004A for ; Thu, 18 Nov 2010 12:13:56 -0500 (EST) Date: Thu, 18 Nov 2010 17:13:39 +0000 From: Mel Gorman Subject: Re: [PATCH 02 of 66] mm, migration: Fix race between shift_arg_pages and rmap_walk by guaranteeing rmap_walk finds PTEs created within the temporary stack Message-ID: <20101118171339.GM8135@csn.ul.ie> References: <20101118111349.GG8135@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20101118111349.GG8135@csn.ul.ie> Sender: owner-linux-mm@kvack.org To: Andrea Arcangeli Cc: linux-mm@kvack.org, Linus Torvalds , Andrew Morton , linux-kernel@vger.kernel.org, Marcelo Tosatti , Adam Litke , Avi Kivity , Hugh Dickins , Rik van Riel , Dave Hansen , Benjamin Herrenschmidt , Ingo Molnar , Mike Travis , KAMEZAWA Hiroyuki , Christoph Lameter , Chris Wright , bpicco@redhat.com, KOSAKI Motohiro , Balbir Singh , "Michael S. Tsirkin" , Peter Zijlstra , Johannes Weiner , Daisuke Nishimura , Chris Mason , Borislav Petkov List-ID: On Thu, Nov 18, 2010 at 11:13:49AM +0000, Mel Gorman wrote: > > This patch fixes the problem by using two VMAs - one which covers the temporary > > stack and the other which covers the new location. This guarantees that rmap > > can always find the migration PTE even if it is copied while rmap_walk is > > taking place. > > > > Signed-off-by: Andrea Arcangeli > > This old chestnut. IIRC, this was the more complete solution to a fix that made > it into mainline. The patch still looks reasonable. It does add a kmalloc() > but I can't remember if we decided we were ok with it or not. Can you remind > me? More importantly, it appears to be surviving the original testcase that > this bug was about (20 minutes so far but will leave it a few hours). Assuming > the test does not crash; > Incidentally, after 6.5 hours this still hasn't crashed. Previously a worst case reproduction scenario for the bug was around 35 minutes. -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org