Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932204AbbHGP2x (ORCPT ); Fri, 7 Aug 2015 11:28:53 -0400 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:49572 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932068AbbHGP2w (ORCPT ); Fri, 7 Aug 2015 11:28:52 -0400 Date: Fri, 7 Aug 2015 10:28:49 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: "Kirill A. Shutemov" cc: Hugh Dickins , "Kirill A. Shutemov" , Andrew Morton , Andrea Arcangeli , David Rientjes , Dave Hansen , Mel Gorman , Rik van Riel , Vlastimil Babka , Naoya Horiguchi , Steve Capper , "Aneesh Kumar K.V" , Johannes Weiner , Michal Hocko , Jerome Marchand , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: page-flags behavior on compound pages: a worry In-Reply-To: <20150807145056.GB12177@node.dhcp.inet.fi> Message-ID: References: <1426784902-125149-1-git-send-email-kirill.shutemov@linux.intel.com> <1426784902-125149-5-git-send-email-kirill.shutemov@linux.intel.com> <20150806153259.GA2834@node.dhcp.inet.fi> <20150807145056.GB12177@node.dhcp.inet.fi> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1584 Lines: 40 On Fri, 7 Aug 2015, Kirill A. Shutemov wrote: > On Thu, Aug 06, 2015 at 03:45:31PM -0500, Christoph Lameter wrote: > > On Thu, 6 Aug 2015, Hugh Dickins wrote: > > > > > > I know a patchset which solves this! ;) > > > > > > Oh, and I know a patchset which avoids these problems completely, > > > by not using compound pages at all ;) > > > > Another dumb idea: Stop the insanity of splitting pages on the fly? > > Splitting pages should work like page migration: Lock everything down and > > ensure no one is using the page and then do it. That way the compound pages > > and its metadata are as stable as a regular page. > > That's what I do in refcounting patchset. Looks like you make refcounting easier and avoid splitting in some cases maybe only splitting the pmd. But the fundamental issue still remains. Complexity is high since individual pages of a compound can be mapped and unmapped in multiple processes. The compound would need to be always treated as a single order N entity in order to really get things simplified and make code cleaner. Either all pages are mapped or none. Otherwise you have to manage the a schizoprenic view of pages. Sometimes an order N size entity is managed and sometimes a base page size page which is a fraction of the whole. Such a view of a memory object is pretty difficult to manage. -- 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/