From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Micay Subject: Re: [PATCH v3] mm: add mremap flag for preserving the old mapping Date: Tue, 30 Sep 2014 22:32:33 -0400 Message-ID: <542B67C1.9080303@gmail.com> References: <1412052900-1722-1-git-send-email-danielmicay@gmail.com> <542A79AF.8060602@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org To: Andy Lutomirski Cc: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , Jason Evans , Linux API List-Id: linux-api@vger.kernel.org On 30/09/14 01:49 PM, Andy Lutomirski wrote: >=20 > I think it might pay to add an explicit vm_op to authorize > duplication, especially for non-cow mappings. IOW this kind of > extension seems quite magical for anything that doesn't have the > normal COW semantics, including for plain old read-only mappings. This sounds like the best way forwards. Setting up the op for private, anonymous mappings and having it check vm_flags & VM_WRITE dynamically seems like it would be enough for the intended use case in general purpose allocators. It can be extended to other mapping types later if there's a compelling use case. -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751738AbaJACci (ORCPT ); Tue, 30 Sep 2014 22:32:38 -0400 Received: from mail-ie0-f181.google.com ([209.85.223.181]:43296 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbaJACcg (ORCPT ); Tue, 30 Sep 2014 22:32:36 -0400 Message-ID: <542B67C1.9080303@gmail.com> Date: Tue, 30 Sep 2014 22:32:33 -0400 From: Daniel Micay User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Andy Lutomirski CC: "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , Jason Evans , Linux API Subject: Re: [PATCH v3] mm: add mremap flag for preserving the old mapping References: <1412052900-1722-1-git-send-email-danielmicay@gmail.com> <542A79AF.8060602@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/14 01:49 PM, Andy Lutomirski wrote: > > I think it might pay to add an explicit vm_op to authorize > duplication, especially for non-cow mappings. IOW this kind of > extension seems quite magical for anything that doesn't have the > normal COW semantics, including for plain old read-only mappings. This sounds like the best way forwards. Setting up the op for private, anonymous mappings and having it check vm_flags & VM_WRITE dynamically seems like it would be enough for the intended use case in general purpose allocators. It can be extended to other mapping types later if there's a compelling use case.