From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f69.google.com (mail-it0-f69.google.com [209.85.214.69]) by kanga.kvack.org (Postfix) with ESMTP id 8654B6B0038 for ; Sun, 30 Apr 2017 22:45:10 -0400 (EDT) Received: by mail-it0-f69.google.com with SMTP id c26so48468627itd.16 for ; Sun, 30 Apr 2017 19:45:10 -0700 (PDT) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com. [2607:f8b0:4001:c06::233]) by mx.google.com with ESMTPS id p6si12880934iop.169.2017.04.30.19.45.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Apr 2017 19:45:09 -0700 (PDT) Received: by mail-io0-x233.google.com with SMTP id a103so102891261ioj.1 for ; Sun, 30 Apr 2017 19:45:09 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20170429141838.tkyfxhldmwypyipz@gmail.com> References: <20170428063913.iz6xjcxblecofjlq@gmail.com> <149339998297.24933.1129582806028305912.stgit@dwillia2-desk3.amr.corp.intel.com> <20170429141838.tkyfxhldmwypyipz@gmail.com> From: Dan Williams Date: Sun, 30 Apr 2017 19:45:08 -0700 Message-ID: Subject: Re: [PATCH v2] mm, zone_device: replace {get, put}_zone_device_page() with a single reference Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Ingo Molnar Cc: "linux-kernel@vger.kernel.org" , Linux MM , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ingo Molnar , Andrew Morton , Logan Gunthorpe , Kirill Shutemov On Sat, Apr 29, 2017 at 7:18 AM, Ingo Molnar wrote: > > * 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=C3=A9r=C3=B4me 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 crashe= s you > were seeing. > Kirill? It wasn't clear to me why the conversion to generic get_user_pages_fast() caused the reference counts to be off. -- 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