From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424020AbdD1Gj1 (ORCPT ); Fri, 28 Apr 2017 02:39:27 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33260 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968210AbdD1GjR (ORCPT ); Fri, 28 Apr 2017 02:39:17 -0400 Date: Fri, 28 Apr 2017 08:39:13 +0200 From: Ingo Molnar To: "Kirill A. Shutemov" Cc: Dan Williams , Ingo Molnar , akpm@linux-foundation.org, linux-mm@kvack.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Logan Gunthorpe , linux-kernel@vger.kernel.org, Kirill Shutemov Subject: Re: [PATCH] mm, zone_device: replace {get, put}_zone_device_page() with a single reference Message-ID: <20170428063913.iz6xjcxblecofjlq@gmail.com> References: <20170423233125.nehmgtzldgi25niy@node.shutemov.name> <149325431313.40660.7404075559824162131.stgit@dwillia2-desk3.amr.corp.intel.com> <20170427083317.vzfiw7up63draslc@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170427083317.vzfiw7up63draslc@node.shutemov.name> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kirill A. Shutemov wrote: > On Wed, Apr 26, 2017 at 05:55:31PM -0700, Dan Williams wrote: > > Kirill points out that the calls to {get,put}_dev_pagemap() can be > > removed from the mm fast path if we take a single get_dev_pagemap() > > reference to signify that the page is alive and use the final put of the > > page to drop that reference. > > > > This does require some care to make sure that any waits for the > > percpu_ref to drop to zero occur *after* devm_memremap_page_release(), > > since it now maintains its own elevated reference. > > > > Cc Ingo Molnar > > Cc: Jérôme Glisse > > Cc: Logan Gunthorpe > > Cc: Andrew Morton > > Suggested-by: Kirill Shutemov > > Signed-off-by: Dan Williams > > --- > > > > This patch might fix the regression that we found with the conversion to > > generic get_user_pages_fast() in the x86/mm branch pending for 4.12 > > (commit 2947ba054a4d "x86/mm/gup: Switch GUP to the generic > > get_user_page_fast() implementation"). I'll test tomorrow, but in case > > someone can give it a try before I wake up, here's an early version. > > + Ingo. > > This works for me with and without GUP revert. > > Tested-by: Kirill A. Shutemov > > > drivers/dax/pmem.c | 2 +- > > drivers/nvdimm/pmem.c | 13 +++++++++++-- > > There's a trivial conflict in drivers/nvdimm/pmem.c when applied to > tip/master. Ok, could someone please send a version either to Linus for v4.11, or a version against latest -tip so I can included it in x86/mm, so that x86/mm gets unbroken. Thanks, Ingo