From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426802AbdD2OSu (ORCPT ); Sat, 29 Apr 2017 10:18:50 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:33645 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425826AbdD2OSn (ORCPT ); Sat, 29 Apr 2017 10:18:43 -0400 Date: Sat, 29 Apr 2017 16:18:38 +0200 From: Ingo Molnar To: Dan Williams Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, =?iso-8859-1?B?Suly9G1l?= Glisse , Ingo Molnar , Andrew Morton , Logan Gunthorpe , Kirill Shutemov Subject: Re: [PATCH v2] mm, zone_device: replace {get, put}_zone_device_page() with a single reference Message-ID: <20170429141838.tkyfxhldmwypyipz@gmail.com> References: <20170428063913.iz6xjcxblecofjlq@gmail.com> <149339998297.24933.1129582806028305912.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <149339998297.24933.1129582806028305912.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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: Andrew Morton > Reviewed-by: Logan Gunthorpe > Suggested-by: Kirill Shutemov > Tested-by: Kirill Shutemov > Signed-off-by: Dan Williams This changelog is lacking an explanation about how this solves the crashes you were seeing. Thanks, Ingo