Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3627311ybd; Fri, 28 Jun 2019 12:00:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxpoLHqctc7vGEO1YornOU9QKvpftJtgBXgFK56ABbwIqfEszZhgr3Di/f5dIUQJE3r0aeO X-Received: by 2002:a17:902:27a8:: with SMTP id d37mr13381148plb.150.1561748430365; Fri, 28 Jun 2019 12:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561748430; cv=none; d=google.com; s=arc-20160816; b=IKVBBjRIhJR/emd+HskH2NHODy8a6Vrk7lNL/eDMcYEdXvHyICeiyqzJIUtBEwBr04 ktBv/7xfpR93/p9WlXyuFGSnrU/4RFYFz5os1PMTXq0Go6+oueh0bCDbXxob4juQI/Xj pShdnbt1O8OrYRrbUD65YBi7hXxoxL+T38H7bDpcWQu6pEL+MPDlkWeArAezljAIUSSy aQ7S2y7ywL2tp+IE5lHKtY7zoY0Rwb9SSRETObKGRDf5sCShJUoMM9JWutrqIIycPjt7 xPVPPbDFNTICN8CbIl4J12gNjKuwJD535fU4LZAHk2O6kN1g+7Ok4cmlwwha/KaVStp0 1/CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xZKi8dPs5bce5TA+lDYDR67LZgo76bXK/epIzKFvivc=; b=GzPvrQdQ0mnHh/FrOOWJ1fn6gKgyUMyr5iZ7j4YUfAhVp2gGiLOYy1coBLk5syo3T9 uPiFjwz4Oupkquw23XHmPjXqwrxy+Y54+I/4sfnehyGhsxpVSKMYgnHKjUcY88Pfjujw bosK1+fASEt4Qf/fdXmVZP+SibFmwZihXf3w2rBt1p/i2KXNURvikBASgDa6OSMSv/0m DYZNV+wMXAvihosiRWVXR4r5jh0qFG9lI6FSMWyuA9gCsxLZiGSRcLsBat/EG/HdcSk3 v1jmxBHz6drlu/HLGgA64bmvAgtJSKa5YlVAzR1gR6Z4je3vgCGvGxOi9QgA+sE8tRa2 ZNbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=w73nxePK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a130si3401708pfa.7.2019.06.28.12.00.07; Fri, 28 Jun 2019 12:00:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=w73nxePK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726707AbfF1S7b (ORCPT + 99 others); Fri, 28 Jun 2019 14:59:31 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:35986 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbfF1S7a (ORCPT ); Fri, 28 Jun 2019 14:59:30 -0400 Received: by mail-ot1-f66.google.com with SMTP id r6so7023476oti.3 for ; Fri, 28 Jun 2019 11:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xZKi8dPs5bce5TA+lDYDR67LZgo76bXK/epIzKFvivc=; b=w73nxePK59nSfEruxrF1M0kHpQTfXV+T0BR3rvgPNUWzxDsJQPeaM7uFD7eKRrxE9Y 9ImwGmBtt6yXJ6nlctHx0FbYi1ua/8g/5ZblEqYZrPEU8IkQx9AAwyacMH73KkUPSZW4 2CnxLw8FBn5LZR6QuLzXXkPegk+n9WnVTkvOy7EQwUeDTJ/KqrjyTyioxg0mlKF5l5Fl pBgbtoepm7/tvV+XTP8uNL6F6V5682w/nGp9yu+fmrqAAOl3CXi6A8E63DaUmygnIHBK Lo3TxfO9CsdVEHmVkApvqnki+XHSFnPPV047Ep963nO0SUi6VwELdrivAHXWP8JUXEYH XM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xZKi8dPs5bce5TA+lDYDR67LZgo76bXK/epIzKFvivc=; b=saY5MWd1MOHhyhesqJEYWQsqNciDo677MVDX7MyfR3gMwJR6nBJaD6Ym7Jhfw58lhf Mj8tlC0G3An6fl7xrbz4N91dWCbV3tQf6FlDiO/vEzRI+tcqjOamvttyrPfKAyj0jt1b RWYSRjq0Q7fH6ZiwXW6JVY8gj0+yVNHLNQ++uyrlbCDwCAuxdw6q9nhXXdDauSkKFYbV Da4BmTLZJG8gPoMdaSgZCthNmvfjZQvJsDGarguysvKVS9oALPkfq8nvZom7OkHPo3bI Na0V8W65lJRUzj2OYSMLqFhn3H9u0F0Utjt1+WfkmAu4Oj8EdQ5zkEWebUT03T3n8hhV 9Wcw== X-Gm-Message-State: APjAAAV50KDYfcFID2R2hdYIb9ECiwk5P2ZXzwF55Nw9sKvwEWIKULPv jT42HFy0rWCjG8qktPb9aYgrf6xL10UnbHnYoAYPGQ== X-Received: by 2002:a9d:7a8b:: with SMTP id l11mr8858325otn.247.1561748370285; Fri, 28 Jun 2019 11:59:30 -0700 (PDT) MIME-Version: 1.0 References: <20190626122724.13313-1-hch@lst.de> <20190626122724.13313-17-hch@lst.de> <20190628153827.GA5373@mellanox.com> <20190628170219.GA3608@mellanox.com> <20190628182922.GA15242@mellanox.com> <20190628185152.GA9117@lst.de> In-Reply-To: <20190628185152.GA9117@lst.de> From: Dan Williams Date: Fri, 28 Jun 2019 11:59:19 -0700 Message-ID: Subject: Re: [PATCH 16/25] device-dax: use the dev_pagemap internal refcount To: Christoph Hellwig Cc: Jason Gunthorpe , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ben Skeggs , "linux-mm@kvack.org" , "nouveau@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-nvdimm@lists.01.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 11:52 AM Christoph Hellwig wrote: > > On Fri, Jun 28, 2019 at 11:44:35AM -0700, Dan Williams wrote: > > There is a problem with the series in CH's tree. It removes the > > ->page_free() callback from the release_pages() path because it goes > > too far and removes the put_devmap_managed_page() call. > > release_pages only called put_devmap_managed_page for device public > pages. So I can't see how that is in any way a problem. It's a bug that the call to put_devmap_managed_page() was gated by MEMORY_DEVICE_PUBLIC in release_pages(). That path is also applicable to MEMORY_DEVICE_FSDAX because it needs to trigger the ->page_free() callback to wake up wait_on_var() via fsdax_pagefree(). So I guess you could argue that the MEMORY_DEVICE_PUBLIC removal patch left the original bug in place. In that sense we're no worse off, but since we know about the bug, the fix and the patches have not been applied yet, why not fix it now?