Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3181084imm; Mon, 16 Jul 2018 23:51:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfn4QBcA2i2pW412eTbrjmEN9suGqebJvoBPOnhWG2eVXaZBCTOTyYj2H7XceqzCFma5D85 X-Received: by 2002:a17:902:6b86:: with SMTP id p6-v6mr402877plk.75.1531810267812; Mon, 16 Jul 2018 23:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531810267; cv=none; d=google.com; s=arc-20160816; b=VwMkbq9W7f3MCDp1LOV7wNJV9ccxl4RW91tz6yIG+CxPKWGK6Eyh8/XsR3Ev5houko rVZBe5fHJdw2F7HC8gYJ6kXcg5k7Bg3Jk6oc2x2aPVCMOrbjvFag9RW4O6M04hjJmdQM kfX/FuC/mOsV/PkD4Uld3EPOcUWTVCY4w9M48NEp2KuivqWSlCL0V99QW1hCGxldMhqY x5pRhlSMNcsFR5Hzvofu19UrwPkD7HdQ4YOoXkoRKjXaJYzSVzWoaxnf0EbqnzktOETW F0puHlNqtLElDUnold63S+d6+0/jMgKKjqfyzQySD7hrbwFgqVhNaZ8HkSfsQM/i1c1u D6Mg== 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=10oqTeu9M80fLBLnuldE8u0nsYCRTOVuZHNXMeaQtA0=; b=XtdLA/os9PKX9XYIv0xoz9eDb0WG6UdJeuHzMmGQxhz/uoXE7fcWuYQzlVM4iRmFoR Daq8e/8a13505q4+F1H4xILfWXodhjggj6b8lyTHmq0G72b4Sx76zkbigUewMOCi8uzR FeB0WZdoaMPRmy3n7PIu+EcRWDqxtc1ac1AJe3RquVSjquvI+NBdCBaOZqMFN4wDi8Pn HD3APHezTADle4vV3nodZC0iuMcSN9YxUCzaoL9NRKdJJzJ2z/xrsZYov36dGigMRINb iHn6M/6Ogpm3Pbe9d4Mu14o0GPCgdMmqsgOfcvKwZZZDOCSXZvXx0XG3ZrG49qS0d/S3 r+aw== 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 u6-v6si206117pfu.143.2018.07.16.23.50.52; Mon, 16 Jul 2018 23:51:07 -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 S1728601AbeGQHUi convert rfc822-to-8bit (ORCPT + 99 others); Tue, 17 Jul 2018 03:20:38 -0400 Received: from tyo161.gate.nec.co.jp ([114.179.232.161]:37664 "EHLO tyo161.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbeGQHUi (ORCPT ); Tue, 17 Jul 2018 03:20:38 -0400 Received: from mailgate02.nec.co.jp ([114.179.233.122]) by tyo161.gate.nec.co.jp (8.15.1/8.15.1) with ESMTPS id w6H6nQ0U032601 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Jul 2018 15:49:26 +0900 Received: from mailsv02.nec.co.jp (mailgate-v.nec.co.jp [10.204.236.94]) by mailgate02.nec.co.jp (8.15.1/8.15.1) with ESMTP id w6H6nQ9q016962; Tue, 17 Jul 2018 15:49:26 +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 w6H6ltO1027684; Tue, 17 Jul 2018 15:49:26 +0900 Received: from bpxc99gp.gisp.nec.co.jp ([10.38.151.149] [10.38.151.149]) by mail02.kamome.nec.co.jp with ESMTP id BT-MMP-2024306; Tue, 17 Jul 2018 15:47:39 +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:47:38 +0900 From: Naoya Horiguchi To: Dan Williams CC: "linux-nvdimm@lists.01.org" , "hch@lst.de" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v6 05/13] mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages Thread-Topic: [PATCH v6 05/13] mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages Thread-Index: AQHUGy+CnxxJQOMWZEWRbp9wlx02hKSSZtmA Date: Tue, 17 Jul 2018 06:47:37 +0000 Message-ID: <20180717064736.GA27953@hori1.linux.bs1.fc.nec.co.jp> References: <153154376846.34503.15480221419473501643.stgit@dwillia2-desk3.amr.corp.intel.com> <153154379606.34503.17311881160518829077.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <153154379606.34503.17311881160518829077.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: <05DD4241F5D8DF4F92EBBCDB6A7040AD@gisp.nec.co.jp> 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:49:56PM -0700, Dan Williams wrote: > Given that dax / device-mapped pages are never subject to page > allocations remove them from consideration by the soft-offline > mechanism. > > Reported-by: Naoya Horiguchi > Signed-off-by: Dan Williams > --- > mm/memory-failure.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index 9d142b9b86dc..988f977db3d2 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1751,6 +1751,14 @@ int soft_offline_page(struct page *page, int flags) > int ret; > unsigned long pfn = page_to_pfn(page); > > + if (is_zone_device_page(page)) { > + pr_debug_ratelimited("soft_offline: %#lx page is device page\n", > + pfn); > + if (flags & MF_COUNT_INCREASED) > + put_page(page); put_hwpoison_page(), which is just an alias of put_page(), is better for consistency. With this adjustment, feel free to add my ack. Acked-by: Naoya Horiguchi Thanks, Naoya Horiguchi > + return -EIO; > + } > + > if (PageHWPoison(page)) { > pr_info("soft offline: %#lx page already poisoned\n", pfn); > if (flags & MF_COUNT_INCREASED) > >