From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755728Ab0EKQa6 (ORCPT ); Tue, 11 May 2010 12:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44818 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753153Ab0EKQay (ORCPT ); Tue, 11 May 2010 12:30:54 -0400 Date: Tue, 11 May 2010 18:29:09 +0200 From: Andrea Arcangeli To: Mel Gorman Cc: Christoph Lameter , Andrew Morton , Linux-MM , LKML , Minchan Kim , KAMEZAWA Hiroyuki , Rik van Riel Subject: Re: [PATCH 2/2] mm,migration: Avoid race between shift_arg_pages() and rmap_walk() during migration by not migrating temporary stacks Message-ID: <20100511162909.GI10631@random.random> References: <1272529930-29505-1-git-send-email-mel@csn.ul.ie> <1272529930-29505-3-git-send-email-mel@csn.ul.ie> <20100504094522.GA20979@csn.ul.ie> <20100510175654.GL26611@csn.ul.ie> <20100511151142.GS26611@csn.ul.ie> <20100511161516.GU26611@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100511161516.GU26611@csn.ul.ie> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2010 at 05:15:16PM +0100, Mel Gorman wrote: > On Tue, May 11, 2010 at 10:56:00AM -0500, Christoph Lameter wrote: > > On Tue, 11 May 2010, Mel Gorman wrote: > > > > > Or just identify the temporary stack from the migration side instead of > > > adding to the cost of exec? > > > > Adding one off checks to a generic mechanism isnt really clean > > programming. Using the provided means of disabling a generic mechanism is. > > > > Andrea's solution is likely lighter than yours as it is one kmalloc and > an insertion into the VM as opposed to a page table walk with reference > counting. Better yet, it exists as a patch that has been tested and it > fits in with the generic mechanism by guaranteeing that rmap_walk finds > all the migration PTEs during the second walk. > > The problem remains the same - that class of solution increases the cost of > a common operation (exec) to keep a much less operation (migration) happy. page table walk adding reference counting is still a one off check, the generic rmap_walk mechanism won't care about the reference counting, still only migrate checks the page count... so it doesn't move the needle in clean programming terms.