From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by kanga.kvack.org (Postfix) with ESMTP id D80CE828F3 for ; Mon, 11 Jan 2016 04:22:18 -0500 (EST) Received: by mail-wm0-f48.google.com with SMTP id f206so257779988wmf.0 for ; Mon, 11 Jan 2016 01:22:18 -0800 (PST) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com. [2a00:1450:400c:c09::22d]) by mx.google.com with ESMTPS id wt9si197415002wjc.42.2016.01.11.01.22.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jan 2016 01:22:17 -0800 (PST) Received: by mail-wm0-x22d.google.com with SMTP id b14so257667141wmb.1 for ; Mon, 11 Jan 2016 01:22:17 -0800 (PST) Message-ID: <56937446.1050308@plexistor.com> Date: Mon, 11 Jan 2016 11:22:14 +0200 From: Boaz Harrosh MIME-Version: 1.0 Subject: Re: [PATCHSET 0/2] Allow single pagefault in write access of a VM_MIXEDMAP mapping References: <569263BA.5060503@plexistor.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Dan Williams Cc: "Kirill A. Shutemov" , Andrew Morton , Matthew Wilcox , "linux-mm@kvack.org" , Ross Zwisler , Oleg Nesterov , Mel Gorman , Johannes Weiner On 01/11/2016 03:19 AM, Dan Williams wrote: > On Sun, Jan 10, 2016 at 5:59 AM, Boaz Harrosh wrote: >> Hi >> >> Today any VM_MIXEDMAP or VM_PFN mapping when enabling a write access >> to their mapping, will have a double pagefault for every write access. >> >> This is because vma->vm_page_prot defines how a page/pfn is inserted into >> the page table (see vma_wants_writenotify in mm/mmap.c). >> >> Which means that it is always inserted with read-only under the >> assumption that we want to be notified when write access occurs. >> >> But this is not always true and adds an unnecessary page-fault on >> every new mmap-write access >> >> This patchset is trying to give the fault handler more choice by passing >> an pgprot_t to vm_insert_mixed() via a new vm_insert_mixed_prot() API. >> >> If the mm guys feel that the pgprot_t and its helpers and flags are private >> to mm/memory.c I can easily do a new: vm_insert_mixed_rw() instead. of the >> above vm_insert_mixed_prot() which enables any control not only write. >> >> Following is a patch to DAX to optimize out the extra page-fault. >> >> TODO: I only did 4k mapping perhaps 2M mapping can enjoy the same single >> fault on write access. If interesting to anyone I can attempt a fix. >> >> Dan Andrew who needs to pick this up please? > > This collides with the patches currently pending in -mm for 4.5, lets > take a look at this for 4.6. > OK thanks, I will try to work this over current linux-next and sure we will wait for 4.5-rc1 to look at this again. Do you have any comments in general about this? Thanks Boaz -- 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