From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 5C8306B0038 for ; Mon, 25 Sep 2017 08:35:14 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id x78so13255399pff.7 for ; Mon, 25 Sep 2017 05:35:14 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id u31si4076627pgn.98.2017.09.25.05.35.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Sep 2017 05:35:12 -0700 (PDT) Date: Mon, 25 Sep 2017 14:35:08 +0200 From: Michal Hocko Subject: Re: [patch] mremap.2: Add description of old_size == 0 functionality Message-ID: <20170925123508.pzjbe7wgwagnr5li@dhcp22.suse.cz> References: <20170915213745.6821-1-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Florian Weimer Cc: Mike Kravetz , mtk.manpages@gmail.com, linux-man@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Andrea Arcangeli , "Kirill A . Shutemov" , Vlastimil Babka , Anshuman Khandual , linux-mm@kvack.org On Tue 19-09-17 14:11:19, Florian Weimer wrote: > On 09/18/2017 07:11 PM, Mike Kravetz wrote: [...] > > I can drop this wording, but would still like to suggest memfd_create as > > the preferred method of creating duplicate mappings. It would be good if > > others on Cc: could comment as well. > > mremap seems to work with non-anonymous mappings, too: only for shared mappings in fact. Because once we have CoW then mremap will not provide you with the same content as the original mapping. [...] > > Just curious, does glibc make use of this today? Or, is this just something > > that you think may be useful. > > To my knowledge, we do not use this today. But it certainly looks very > useful. What would be the usecase. I mean why don't you simply create a new mapping by a plain mmap when you have no guarantee about the same content? -- Michal Hocko SUSE Labs -- 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/ . Don't email: email@kvack.org