Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3183476imm; Mon, 16 Jul 2018 23:54:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe3sRgCMujyq2NZRdxSHrV1wndJ1rVVD5nYW5/ZT9SjIw3c+Zv8uGaUu7bA+qOBHDL6kMrV X-Received: by 2002:a65:5683:: with SMTP id v3-v6mr399957pgs.176.1531810481440; Mon, 16 Jul 2018 23:54:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531810481; cv=none; d=google.com; s=arc-20160816; b=Ew5ES9BThfQPXs7D2J7QF6dJrRnqdDp3LuqTL3QurXOGDSx6mTBm7OxT3Kov0E9skp ZGQb1MEXwMyAvX3OKdCJloZ7IOVz7Iipb52s4jS9j5Qkieg+Ze5eWpoFK8vonCsl9DwZ rkOMp3xRJmzPu7v4713Njb/plK/0wDXUzYjZYjqNZx5xQ6l296NdIlJod0Sw+z+3bSPi p2r9lSwU64twyBkXQmymseAbYy1jdHWT3EAgppZtYJHZ/4QVUKpjcyiX1o5v1IO0hC4s kWhunwZkUSzld6jRriwk8v0NXPUhUwdscTi+b++9rFlP248Ks31iZ6cOQD793vVUdhm/ uh0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=2Hd7oUkDuURum5xKzU9f3hpixVF62spvuhoa6QB2miE=; b=G7cOQ1pL9Ua1HRRi64Ob1o9f++oFwoEcb85pg+KSP3MdCfDW697RctLgTPfC1mbELh QZR1ACP3fFaxf54KnyllAzZEHowk9CpXg6GHlzdwW4XVJmqtntx5J7h7Hu55qGK/R+cA q8cREsCpmzKObiSKTqAeRPiNabxEpd16+SoLApnjddQjPNinCGkcMba0df6rRv+YRMHs 7ERYE2eMOWKHWdBvLAfqeBWLxNxNgG7vWkNLzMi8ctrQXNqFD6a/P0aIZFWgYy+f6Lg2 w8rGiR4/0L9eu7VHDtGO4znsENRFdpcFUIUjAp0sfs7cWNzzNq333HhD/P1d1yp2nl1e zl8g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61-v6si179025plz.290.2018.07.16.23.54.26; Mon, 16 Jul 2018 23:54:41 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729651AbeGQHYr convert rfc822-to-8bit (ORCPT + 99 others); Tue, 17 Jul 2018 03:24:47 -0400 Received: from tyo162.gate.nec.co.jp ([114.179.232.162]:47493 "EHLO tyo162.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727600AbeGQHYr (ORCPT ); Tue, 17 Jul 2018 03:24:47 -0400 Received: from mailgate01.nec.co.jp ([114.179.233.122]) by tyo162.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id w6H6rRPa010562 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Jul 2018 15:53:27 +0900 Received: from mailsv02.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate01.nec.co.jp (8.15.1/8.15.1) with ESMTP id w6H6rRoe012823; Tue, 17 Jul 2018 15:53:27 +0900 Received: from mail02.kamome.nec.co.jp (mail02.kamome.nec.co.jp [10.25.43.5]) by mailsv02.nec.co.jp (8.15.1/8.15.1) with ESMTP id w6H6rAqu031298; Tue, 17 Jul 2018 15:53:27 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.149] [10.38.151.149]) by mail01b.kamome.nec.co.jp with ESMTP id BT-MMP-1989084; Tue, 17 Jul 2018 15:52:05 +0900 Received: from BPXM23GP.gisp.nec.co.jp ([10.38.151.215]) by BPXC21GP.gisp.nec.co.jp ([10.38.151.149]) with mapi id 14.03.0319.002; Tue, 17 Jul 2018 15:52:04 +0900 From: Naoya Horiguchi To: Dan Williams CC: "linux-nvdimm@lists.01.org" , Michal Hocko , "hch@lst.de" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 07/13] mm, madvise_inject_error: Let memory_failure() optionally take a page reference Thread-Topic: [PATCH v6 07/13] mm, madvise_inject_error: Let memory_failure() optionally take a page reference Thread-Index: AQHUGy+MPceVQOK8wkK6AOOqXfBixqSSaBaA Date: Tue, 17 Jul 2018 06:52:03 +0000 Message-ID: <20180717065203.GA28797@hori1.linux.bs1.fc.nec.co.jp> References: <153154376846.34503.15480221419473501643.stgit@dwillia2-desk3.amr.corp.intel.com> <153154380652.34503.2174920161570183766.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <153154380652.34503.2174920161570183766.stgit@dwillia2-desk3.amr.corp.intel.com> Accept-Language: en-US, ja-JP Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.51.8.80] Content-Type: text/plain; charset="iso-2022-jp" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 13, 2018 at 09:50:06PM -0700, Dan Williams wrote: > The madvise_inject_error() routine uses get_user_pages() to lookup the > pfn and other information for injected error, but it does not release > that pin. The assumption is that failed pages should be taken out of > circulation. > > However, for dax mappings it is not possible to take pages out of > circulation since they are 1:1 physically mapped as filesystem blocks, > or device-dax capacity. They also typically represent persistent memory > which has an error clearing capability. > > In preparation for adding a special handler for dax mappings, shift the > responsibility of taking the page reference to memory_failure(). I.e. > drop the page reference and do not specify MF_COUNT_INCREASED to > memory_failure(). > > Cc: Michal Hocko > Cc: Naoya Horiguchi > Signed-off-by: Dan Williams Acked-by: Naoya Horiguchi