Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1187341imu; Wed, 23 Jan 2019 12:15:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN6kMc3RtmGN9vEJxpYdKGsbPCZ4YGPml0ib2vROtEOeMKYp1meLs8gmCAeLzKtxSndeCUXO X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr3740231plb.103.1548274542524; Wed, 23 Jan 2019 12:15:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548274542; cv=none; d=google.com; s=arc-20160816; b=S+ar7Ta+OqeD7H9mEKJZBlbxTUWRk2wPirOoCEmydwNVG1bvZT0NkVv7Dw4BbJpFHw EISArio737p5ZV0URMtLtrK2/sJoKNFbDpMqnk+GctMShbI8eCyI8rAcWZuLxY8nA+sx jfzt8UvHefyku4G1KSjTu+L6Gq2uWN1vDUkvMaZAaljZkez7HTT8I8FB1mJIh8qUykJx JmlGELlHAn+ChUzCQ1UQu/uTMPbWagi9IyvghOXl3crI/g8EnyBrJGucXmgFbOA7pZfi Jeh3Bc8aDTskle3+zoE5CyrMHA7dGxknJMwinQQcb5aSuc7QVVMR2svMIYOdKD9or3c1 J1MA== 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; bh=beiOT1juEkeb5sREAeb4D+GDpKp0rKZ8YyL1JVobNm4=; b=xBsSY7XGQzUI6cRN3984mAyCzUHNdlmEP21KWhSz5JmesMMl00qu9awxC9FbEQ9fuV 3VyTY2jgmRDHCdsdWG7iuam+Cc09IVMi3BDVJEbk+v3lH82NQFOUKENZGxMI5l9Va/g5 M8LH7nP1TRXIV96tXTFKSOgcVAyQ03Xh9/KYWfJ8Xxont3tz0O2NbuEbCp8Fs9jHGbp5 K2nzNxvm4Yh0i9oofOU6AVqN94ivZ5lv5MWmLwK4fD9aYmHEak/2QqRlDKXP94SbhhjH faa0qmhpZ5e6yhFYktKPK3T5ElwdqdsVNxzf97kqQFu/eptvyL+83wISJa4wOxSWmRm0 uB1g== 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 i63si19541069pgc.116.2019.01.23.12.15.25; Wed, 23 Jan 2019 12:15:42 -0800 (PST) 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 S1726202AbfAWUPN (ORCPT + 99 others); Wed, 23 Jan 2019 15:15:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37258 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726035AbfAWUPN (ORCPT ); Wed, 23 Jan 2019 15:15:13 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1D423C7C0A; Wed, 23 Jan 2019 20:15:12 +0000 (UTC) Received: from redhat.com (ovpn-124-254.rdu2.redhat.com [10.10.124.254]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A4CD6C510; Wed, 23 Jan 2019 20:15:09 +0000 (UTC) Date: Wed, 23 Jan 2019 15:15:06 -0500 From: Jerome Glisse To: Dave Hansen Cc: Dave Hansen , dave@sr71.net, dan.j.williams@intel.com, dave.jiang@intel.com, zwisler@kernel.org, vishal.l.verma@intel.com, thomas.lendacky@amd.com, akpm@linux-foundation.org, mhocko@suse.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ying.huang@intel.com, fengguang.wu@intel.com, bp@suse.de, bhelgaas@google.com, baiyaowei@cmss.chinamobile.com, tiwai@suse.de Subject: Re: [PATCH 2/4] mm/memory-hotplug: allow memory resources to be children Message-ID: <20190123201506.GG3097@redhat.com> References: <20190116181859.D1504459@viggo.jf.intel.com> <20190116181902.670EEBC3@viggo.jf.intel.com> <20190116191635.GD3617@redhat.com> <2b52778d-f120-eec7-3e7a-3a9c182170f0@intel.com> <20190116233849.GE3617@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 23 Jan 2019 20:15:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 23, 2019 at 12:03:54PM -0800, Dave Hansen wrote: > On 1/16/19 3:38 PM, Jerome Glisse wrote: > > So right now i would rather that we keep properly reporting this > > hazard so that at least we know it failed because of that. This > > also include making sure that we can not register private memory > > as a child of an un-busy resource that does exist but might not > > have yet been claim by its rightful owner. > > I can definitely keep the warning in. But, I don't think there's a > chance of HMM registering a IORES_DESC_DEVICE_PRIVATE_MEMORY region as > the child of another. The region_intersects() check *should* find that: Sounds fine to (just keep the warning). Cheers, J?r?me > > > for (; addr > size && addr >= iomem_resource.start; addr -= size) { > > ret = region_intersects(addr, size, 0, IORES_DESC_NONE); > > if (ret != REGION_DISJOINT) > > continue; >