Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6953409ybi; Thu, 1 Aug 2019 00:55:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8ulYUVt5f8ze9F2mavXyjctySa3Gu44W3/KQTKK+Nqdu/TzQSJdc3vsUiT6VfKJGFL/bE X-Received: by 2002:a17:90a:8d0d:: with SMTP id c13mr6860400pjo.137.1564646135702; Thu, 01 Aug 2019 00:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564646135; cv=none; d=google.com; s=arc-20160816; b=RRUatGThfVPQQchhRtGwNtO1dVurB9SW4U8eiqYgQnxT+9vCgobKgYy8NtupjPeGA1 0NMdZMadlEhagV7HkXlJxIOoPvu3Uiusd8tDCIeOKaPN2EFa6QI9xwuWbpQid07NVqJQ Dakui0NXDypgwJ/9hwk5qz9zddGTkQx/PayAG+mcK7Fx+s3AsQ3CnaWPrtRG/m6GhFF+ 3+osUcPReqvzgAsE/sPhYIqtCrqlkTQQY/yQ4omsIp+HnQgpz6hPDolFrVbSzFwdXgOo Yt3e7uflG2BIjJCybFZECWPgyDtjVx72PAnl8njHttiI5MvAGduxaCpt21DkZPhJkhD7 TV7g== 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:message-id:subject:cc :to:from:date; bh=m6Azbqt89CCmqlrQpC1klXZQbXgM04hgbBEPb1oESOk=; b=a9Pzk7tu00LlsB6+WPnz2gx+3P4GCLTQbstHAMmrdh/bEXCtMZ5IIHKDvWnM5z0Cm6 m1ix1vXT81H+5W+5+eyGUIkHcZoyPujKFJHx4KnWg5W88JNfCJYmZKi2dK+DQMhXXI3Z PwH25/ThTpbFm+DVdXB/HuIBBfrk0LbKT3cYzFccjqjvHx8yIlw2rMaMK56+yVaXxC4n /Dcshc+goPqXYPPvK+cXcL7TS1fyDlD4ASPJXx+BizhnZxHBL5MBWQOpt/cT8ueTXsuI SijYyWY4lnJ74eMU6y1mCgETaZb0kkbImnDxQii5+FcD9lmcU/h772vy2Drb1rwJqNYM +Ovw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si36262164pgi.324.2019.08.01.00.55.20; Thu, 01 Aug 2019 00:55:35 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730901AbfHAHsk (ORCPT + 99 others); Thu, 1 Aug 2019 03:48:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:35184 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725946AbfHAHsk (ORCPT ); Thu, 1 Aug 2019 03:48:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1AEECB613; Thu, 1 Aug 2019 07:48:39 +0000 (UTC) Date: Thu, 1 Aug 2019 09:48:36 +0200 From: Michal Hocko To: David Hildenbrand Cc: Rashmica Gupta , Oscar Salvador , Andrew Morton , Dan Williams , pasha.tatashin@soleen.com, Jonathan.Cameron@huawei.com, anshuman.khandual@arm.com, Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/5] Allocate memmap from hotadded memory Message-ID: <20190801074836.GI11627@dhcp22.suse.cz> References: <20190702074806.GA26836@linux> <20190731120859.GJ9330@dhcp22.suse.cz> <4ddee0dd719abd50350f997b8089fa26f6004c0c.camel@gmail.com> <20190801071709.GE11627@dhcp22.suse.cz> <9bcbd574-7e23-5cfe-f633-646a085f935a@redhat.com> <20190801072430.GF11627@dhcp22.suse.cz> <5e6137c9-5269-5756-beaa-d116652be8b9@redhat.com> <20190801073957.GH11627@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190801073957.GH11627@dhcp22.suse.cz> 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 Thu 01-08-19 09:39:57, Michal Hocko wrote: > On Thu 01-08-19 09:31:09, David Hildenbrand wrote: > > On 01.08.19 09:26, David Hildenbrand wrote: > [...] > > > I am not sure about the implications of having > > > pfn_valid()/pfn_present()/pfn_online() return true but accessing it > > > results in crashes. (suspend, kdump, whatever other technology touches > > > online memory) > > > > (oneidea: we could of course go ahead and mark the pages PG_offline > > before unmapping the pfn range to work around these issues) > > PG_reserved and an elevated reference count should be enough to drive > any pfn walker out. Pfn walkers shouldn't touch any page unless they > know and recognize their type. Btw. this shouldn't be much different from DEBUG_PAGE_ALLOC in principle. The memory is valid, but not mapped to the kernel virtual space. Nobody should be really touching it anyway. -- Michal Hocko SUSE Labs