From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757538Ab0KRNN5 (ORCPT ); Thu, 18 Nov 2010 08:13:57 -0500 Received: from gir.skynet.ie ([193.1.99.77]:52501 "EHLO gir.skynet.ie" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757020Ab0KRNN4 (ORCPT ); Thu, 18 Nov 2010 08:13:56 -0500 Date: Thu, 18 Nov 2010 13:13:40 +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 23 of 66] add pmd_huge_pte to mm_struct Message-ID: <20101118131340.GQ8135@csn.ul.ie> References: <8497eaf69975ceba0c79.1288798078@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <8497eaf69975ceba0c79.1288798078@v2.random> 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 Wed, Nov 03, 2010 at 04:27:58PM +0100, Andrea Arcangeli wrote: > From: Andrea Arcangeli > > This increase the size of the mm struct a bit but it is needed to preallocate > one pte for each hugepage so that split_huge_page will not require a fail path. > Guarantee of success is a fundamental property of split_huge_page to avoid > decrasing swapping reliability and to avoid adding -ENOMEM fail paths that > would otherwise force the hugepage-unaware VM code to learn rolling back in the > middle of its pte mangling operations (if something we need it to learn > handling pmd_trans_huge natively rather being capable of rollback). When > split_huge_page runs a pte is needed to succeed the split, to map the newly > splitted regular pages with a regular pte. This way all existing VM code > remains backwards compatible by just adding a split_huge_page* one liner. The > memory waste of those preallocated ptes is negligible and so it is worth it. > > Signed-off-by: Andrea Arcangeli > Acked-by: Rik van Riel Acked-by: Mel Gorman -- 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 mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 20B726B0087 for ; Thu, 18 Nov 2010 08:13:59 -0500 (EST) Date: Thu, 18 Nov 2010 13:13:40 +0000 From: Mel Gorman Subject: Re: [PATCH 23 of 66] add pmd_huge_pte to mm_struct Message-ID: <20101118131340.GQ8135@csn.ul.ie> References: <8497eaf69975ceba0c79.1288798078@v2.random> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <8497eaf69975ceba0c79.1288798078@v2.random> 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 Wed, Nov 03, 2010 at 04:27:58PM +0100, Andrea Arcangeli wrote: > From: Andrea Arcangeli > > This increase the size of the mm struct a bit but it is needed to preallocate > one pte for each hugepage so that split_huge_page will not require a fail path. > Guarantee of success is a fundamental property of split_huge_page to avoid > decrasing swapping reliability and to avoid adding -ENOMEM fail paths that > would otherwise force the hugepage-unaware VM code to learn rolling back in the > middle of its pte mangling operations (if something we need it to learn > handling pmd_trans_huge natively rather being capable of rollback). When > split_huge_page runs a pte is needed to succeed the split, to map the newly > splitted regular pages with a regular pte. This way all existing VM code > remains backwards compatible by just adding a split_huge_page* one liner. The > memory waste of those preallocated ptes is negligible and so it is worth it. > > Signed-off-by: Andrea Arcangeli > Acked-by: Rik van Riel Acked-by: Mel Gorman -- 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