Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5987241imm; Mon, 23 Jul 2018 09:24:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4aPKPuAlZwCyc7HGU2svCMNdqM8FP1jdi35dgeW35E9g+L/6Dp8V+kDVSCU7x0KMjVY11 X-Received: by 2002:a62:4308:: with SMTP id q8-v6mr14120215pfa.86.1532363064809; Mon, 23 Jul 2018 09:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532363064; cv=none; d=google.com; s=arc-20160816; b=CuCmMbBQbsCO7pTrvkad9d7oD+4y9cBmhkLnD9tYV6EPus9ngoFjAPOR2AUfsDESvG zsS1BqlJEM4wfgA7wOXFL5GWv51kbl+rkzJ9TZI4fZM2Otqk0QFEhDlQJaqXWWbQsOtW XZS+MKdbFBZY3gO3EcGrlWntsiqldEDluM9JnhmPa348kbpmjwjhxgr0xGb1ix8he3iS UEKiDkWsg8EtvgM/TYL/oeqPJGsDYauUeVTWKWzk3MynRPom3ua/jVbWM8iUt0TmHlZa V5qgcje3Ob2/QyPsPX7+bRfnh4JlpjkphnFa9JmWy3TT67D/+dn2egET3Taa4H0DwrMb 3kJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=XTRVduFV6rmbZev/10llsBi0Yj7EbRolU70hnzc/ARE=; b=xGI2jRnFMVS/3aKbIq9pbte4+x02jMUsOG2IpcbLFDllFYgsQZVk0r+/8yNltfd4go ISjRt1UNE5nP9jPTaK9c018nMqC8e9NRUueOJI0eB3FD+hx1Nh/Gdh44SYICVWb1DiQ/ /Xth+b7QDwPTHHMd6PmWWhq8KmnDoLOrDxCw+upaIK2sxvafkFUX4tu3stCuQ3qF1X9a S0UvVYQqxldywBjfyo88Tmhx8KYnKTys9hqo578Dr78CR2ofpbouA84zuBji6sR5Rpg2 YCMUDuAWUjXAus76L5vB4fi3rmSNJCkRQnQcv65JxGMMGN5SODXuNJv1Tiww8TRdlD8C Mutw== ARC-Authentication-Results: i=1; mx.google.com; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z125-v6si8802268pfz.10.2018.07.23.09.24.09; Mon, 23 Jul 2018 09:24:24 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388744AbeGWRZM (ORCPT + 99 others); Mon, 23 Jul 2018 13:25:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57862 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388240AbeGWRZM (ORCPT ); Mon, 23 Jul 2018 13:25:12 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5BC684059FF8; Mon, 23 Jul 2018 16:23:13 +0000 (UTC) Received: from redhat.com (ovpn-123-156.rdu2.redhat.com [10.10.123.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C26D111CB8C; Mon, 23 Jul 2018 16:23:10 +0000 (UTC) Date: Mon, 23 Jul 2018 12:23:08 -0400 From: Jerome Glisse To: Dave Jiang Cc: Dan Williams , linux-nvdimm@lists.01.org, Jan Kara , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Andrew Morton , hch@lst.de Subject: Re: [PATCH v6 06/13] mm, dev_pagemap: Do not clear ->mapping on final put Message-ID: <20180723162308.GA4704@redhat.com> References: <153154376846.34503.15480221419473501643.stgit@dwillia2-desk3.amr.corp.intel.com> <153154380137.34503.3754023882460956800.stgit@dwillia2-desk3.amr.corp.intel.com> <3fcb3c8a-2a41-7c78-edde-066c10110d34@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3fcb3c8a-2a41-7c78-edde-066c10110d34@intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Jul 2018 16:23:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 23 Jul 2018 16:23:13 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jglisse@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 23, 2018 at 09:12:06AM -0700, Dave Jiang wrote: > Jerome, > Is it possible to get an ack for this? Thanks! > > On 07/13/2018 09:50 PM, Dan Williams wrote: > > MEMORY_DEVICE_FS_DAX relies on typical page semantics whereby ->mapping > > is only ever cleared by truncation, not final put. > > > > Without this fix dax pages may forget their mapping association at the > > end of every page pin event. > > > > Move this atypical behavior that HMM wants into the HMM ->page_free() > > callback. > > > > Cc: > > Cc: Jan Kara > > Cc: Andrew Morton > > Cc: Ross Zwisler > > Fixes: d2c997c0f145 ("fs, dax: use page->mapping...") > > Signed-off-by: Dan Williams Acked-by: J?r?me Glisse > > --- > > kernel/memremap.c | 1 - > > mm/hmm.c | 2 ++ > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/memremap.c b/kernel/memremap.c > > index 5857267a4af5..62603634a1d2 100644 > > --- a/kernel/memremap.c > > +++ b/kernel/memremap.c > > @@ -339,7 +339,6 @@ void __put_devmap_managed_page(struct page *page) > > __ClearPageActive(page); > > __ClearPageWaiters(page); > > > > - page->mapping = NULL; > > mem_cgroup_uncharge(page); > > > > page->pgmap->page_free(page, page->pgmap->data); > > diff --git a/mm/hmm.c b/mm/hmm.c > > index de7b6bf77201..f9d1d89dec4d 100644 > > --- a/mm/hmm.c > > +++ b/mm/hmm.c > > @@ -963,6 +963,8 @@ static void hmm_devmem_free(struct page *page, void *data) > > { > > struct hmm_devmem *devmem = data; > > > > + page->mapping = NULL; > > + > > devmem->ops->free(devmem, page); > > } > > > > > > _______________________________________________ > > Linux-nvdimm mailing list > > Linux-nvdimm@lists.01.org > > https://lists.01.org/mailman/listinfo/linux-nvdimm > >