From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753469AbbFXQlN (ORCPT ); Wed, 24 Jun 2015 12:41:13 -0400 Received: from mga01.intel.com ([192.55.52.88]:65530 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752735AbbFXQlD (ORCPT ); Wed, 24 Jun 2015 12:41:03 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,673,1427785200"; d="scan'208";a="716942654" Date: Wed, 24 Jun 2015 12:40:59 -0400 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nvdimm@ml01.01.org Subject: Re: [PATCH] mm: make GUP handle pfn mapping unless FOLL_GET is requested Message-ID: <20150624164059.GF1971@linux.intel.com> References: <1435141503-100635-1-git-send-email-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435141503-100635-1-git-send-email-kirill.shutemov@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2015 at 01:25:03PM +0300, Kirill A. Shutemov wrote: > With DAX, pfn mapping becoming more common. The patch adjusts GUP code > to cover pfn mapping for cases when we don't need struct page to > proceed. > > To make it possible, let's change follow_page() code to return -EEXIST > error code if proper page table entry exists, but no corresponding > struct page. __get_user_page() would ignore the error code and move to > the next page frame. > > The immediate effect of the change is working MAP_POPULATE and mlock() > on DAX mappings. > > Signed-off-by: Kirill A. Shutemov > Reviewed-by: Toshi Kani > Cc: Matthew Wilcox Acked-by: Matthew Wilcox