Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753085AbbELKmE (ORCPT ); Tue, 12 May 2015 06:42:04 -0400 Received: from mta-out1.inet.fi ([62.71.2.227]:38218 "EHLO kirsi1.inet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932134AbbELKmB (ORCPT ); Tue, 12 May 2015 06:42:01 -0400 Date: Tue, 12 May 2015 13:40:55 +0300 From: "Kirill A. Shutemov" To: Konstantin Khlebnikov Cc: linux-mm@kvack.org, Naoya Horiguchi , linux-kernel@vger.kernel.org, Andrew Morton , Mark Williamson , Pavel Emelyanov , linux-api@vger.kernel.org, Andy Lutomirski , Vlastimil Babka , Pavel Machek , Mark Seaborn , Linus Torvalds , Daniel James , Finn Grimwood Subject: Re: [PATCH v2 1/3] pagemap: add mmap-exclusive bit for marking pages mapped only here Message-ID: <20150512104055.GB18365@node.dhcp.inet.fi> References: <20150512090156.24768.2521.stgit@buzz> <20150512094303.24768.10282.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150512094303.24768.10282.stgit@buzz> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 863 Lines: 20 On Tue, May 12, 2015 at 12:43:03PM +0300, Konstantin Khlebnikov wrote: > This patch sets bit 56 in pagemap if this page is mapped only once. > It allows to detect exclusively used pages without exposing PFN: > > present file exclusive state > 0 0 0 non-present > 1 1 0 file page mapped somewhere else > 1 1 1 file page mapped only here > 1 0 0 anon non-CoWed page (shared with parent/child) > 1 0 1 anon CoWed page (or never forked) Probably, worth noting that file-private pages are anon in this context. -- Kirill A. Shutemov -- 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/