Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3262307ybi; Mon, 17 Jun 2019 20:36:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEtoFvlP/let44T7QMBG8Mge4c7J32C/A5Qcw2a7T3YyJFjh6VZMpyY6nW78ZL3bbAcZk7 X-Received: by 2002:aa7:8394:: with SMTP id u20mr105026181pfm.252.1560828998855; Mon, 17 Jun 2019 20:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560828998; cv=none; d=google.com; s=arc-20160816; b=xtJC9i/+aK1O4Tl8QIG+1q1qnBscdZAGK56C8yTusksB9+ookNHUPQV4v7BhKtSe4y 9FgeDZr+yKfmTbgmR2JnPRwSqhwR4fk9C90m9Rzino51EPZcUrTiq1BlBW4SIuFt+sPK mBzomw9pobJ3kyL+NqJ7IIU1b0LY0gKF24voMw2iJ2yYTfVjIR5jUq7z+qK4EP2sGptj Gp6nL65KWQ+PAUicxZ0aIW/LIevd9wZw0KWLh0i1Z3mcmZSgTaAyLJFrYntziXf2/bwV Vx7InyhxkSNerWBdpbqtnH+vSrZ51Jr/TnX8/0K4dHRD1NK4mMRVXJHok7rCFyxh0YkS F40Q== 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-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date; bh=1fSSe8suDKjBf1vgC8h2kWPwQn0B15jZkC7bjiGIFJk=; b=AZhGiVTQrcbbH1DZtwVcWCfztDfxI8AukubHKcf2y+/YLmNR0NZrlm4dQepvPA4EFO xuBrygE7ZogqhlFqSYDZiyPAffouWy2DfBxOaIsqTs3Xjm9Xbwo6MsPCHll6A4NOozZR KIpq07AlsPV09Sk5YBbWlAhaX0JtSmRQkVOG4Ngffyzw1R3Kl29W5kFTeDlJkt880+p5 bxBegslHmjE4CNQpx9pR/x8ohe0Q7iAQTeONhlirIoeNmp5hSBPaKX3bwHDHFhPKldzF oC/IZO+k/CMJqvPe5+ci9CNpuJ36/GJLi0JDdYN/anLJ/cYyeKsD8UcvDXGwuCrL792s wcNA== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si12587467pgr.40.2019.06.17.20.36.21; Mon, 17 Jun 2019 20:36:38 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726248AbfFRDgL (ORCPT + 99 others); Mon, 17 Jun 2019 23:36:11 -0400 Received: from mga12.intel.com ([192.55.52.136]:34862 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfFRDgL (ORCPT ); Mon, 17 Jun 2019 23:36:11 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jun 2019 20:36:10 -0700 X-ExtLoop1: 1 Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by fmsmga001.fm.intel.com with ESMTP; 17 Jun 2019 20:36:09 -0700 Date: Tue, 18 Jun 2019 11:35:46 +0800 From: Wei Yang To: Dan Williams Cc: akpm@linux-foundation.org, mhocko@suse.com, Pavel Tatashin , David Hildenbrand , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, osalvador@suse.de Subject: Re: [PATCH v9 06/12] mm: Kill is_dev_zone() helper Message-ID: <20190618033546.GE18161@richard> Reply-To: Wei Yang References: <155977186863.2443951.9036044808311959913.stgit@dwillia2-desk3.amr.corp.intel.com> <155977191260.2443951.15908146523735681570.stgit@dwillia2-desk3.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <155977191260.2443951.15908146523735681570.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 05, 2019 at 02:58:32PM -0700, Dan Williams wrote: >Given there are no more usages of is_dev_zone() outside of 'ifdef >CONFIG_ZONE_DEVICE' protection, kill off the compilation helper. > >Cc: Michal Hocko >Cc: Logan Gunthorpe >Acked-by: David Hildenbrand >Reviewed-by: Oscar Salvador >Reviewed-by: Pavel Tatashin >Signed-off-by: Dan Williams Reviewed-by: Wei Yang >--- > include/linux/mmzone.h | 12 ------------ > mm/page_alloc.c | 2 +- > 2 files changed, 1 insertion(+), 13 deletions(-) > >diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h >index 6dd52d544857..49e7fb452dfd 100644 >--- a/include/linux/mmzone.h >+++ b/include/linux/mmzone.h >@@ -855,18 +855,6 @@ static inline int local_memory_node(int node_id) { return node_id; }; > */ > #define zone_idx(zone) ((zone) - (zone)->zone_pgdat->node_zones) > >-#ifdef CONFIG_ZONE_DEVICE >-static inline bool is_dev_zone(const struct zone *zone) >-{ >- return zone_idx(zone) == ZONE_DEVICE; >-} >-#else >-static inline bool is_dev_zone(const struct zone *zone) >-{ >- return false; >-} >-#endif >- > /* > * Returns true if a zone has pages managed by the buddy allocator. > * All the reclaim decisions have to use this function rather than >diff --git a/mm/page_alloc.c b/mm/page_alloc.c >index bd773efe5b82..5dff3f49a372 100644 >--- a/mm/page_alloc.c >+++ b/mm/page_alloc.c >@@ -5865,7 +5865,7 @@ void __ref memmap_init_zone_device(struct zone *zone, > unsigned long start = jiffies; > int nid = pgdat->node_id; > >- if (WARN_ON_ONCE(!pgmap || !is_dev_zone(zone))) >+ if (WARN_ON_ONCE(!pgmap || zone_idx(zone) != ZONE_DEVICE)) > return; > > /* > >_______________________________________________ >Linux-nvdimm mailing list >Linux-nvdimm@lists.01.org >https://lists.01.org/mailman/listinfo/linux-nvdimm -- Wei Yang Help you, Help me