Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6980556ybi; Thu, 1 Aug 2019 01:21:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUy85HIwZMIcGp41veZ5ORx05ruSRvaH+c7tyEX6OWFSxAQvTCR54Exs59mPTwBy/6qheA X-Received: by 2002:a17:902:44a4:: with SMTP id l33mr123893149pld.174.1564647686224; Thu, 01 Aug 2019 01:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564647686; cv=none; d=google.com; s=arc-20160816; b=omwLYMn6I5NblsLGE8u2y2iMRuZCFE9HCXEMHv2by+gQ4au8NEwCXakFcN5M0zeYuw z3xy4CnIIcIscYAv4y2Et75FQMhdimH+k9nA9uSkGQ2YscRTlLf2pSxIwFgTB0EO4DW/ zaM8O2INfz12wcjBb7rOESsCNrKq/LFDHWHuQqAZbXTiLkGGqkJuEIfmSFDRCKY3LWWH eop2sMsVXflKC2++YM56dPTx6so1xBZPc69mtjh8WkOUWpQLRGeK+9QgWyJR0tKXB4Ck cLXq44MIrJiXmXjbSZJHIuW1vIvnvlCbbuHIdgOsQmMjr2JHnkGUmo99zsmA7YUWfXPH 8iTQ== 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=cbYKC7RCywrWFP6URPgOSCcalyLP1lhYux9xKSlup5I=; b=fcNjTMUkkgQllEONMcIyxecIa5Cq7aXaseH0Gr8Ec5sfqlzc7glde9r5y3nzktm2Hl ySpcWZFRRYw0Mv0tz3xkig+g/YqUhml8KHDO7Q8guFj2k4rYclEyp5OVuLDVRzby3OkM lMc39w6iigvhULlTghG3FAGEDcT20RTYjiWGyJ/C9vnG2y8bGHYZYHlB+A5pU6s9nZ5J wvLm3HgKTn2zP9lpeaovNs/3BgbntwqZopUM/hbgcflZVW5rlB3HtwtyHsyj0e9E7d8m 0cSWBr8owGbdqmAenmD+iPyK2SP0heRrpG8A3LmY+Fh2NdhCIVfRucogzg0P7S0qMwwX 6oeg== 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 j67si22189514plb.195.2019.08.01.01.21.11; Thu, 01 Aug 2019 01:21:26 -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 S1730677AbfHAHRN (ORCPT + 99 others); Thu, 1 Aug 2019 03:17:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:53346 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730201AbfHAHRN (ORCPT ); Thu, 1 Aug 2019 03:17:13 -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 3DE8EADC4; Thu, 1 Aug 2019 07:17:12 +0000 (UTC) Date: Thu, 1 Aug 2019 09:17:09 +0200 From: Michal Hocko To: Rashmica Gupta Cc: Oscar Salvador , David Hildenbrand , 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: <20190801071709.GE11627@dhcp22.suse.cz> References: <2ebfbd36-11bd-9576-e373-2964c458185b@redhat.com> <20190626080249.GA30863@linux> <2750c11a-524d-b248-060c-49e6b3eb8975@redhat.com> <20190626081516.GC30863@linux> <887b902e-063d-a857-d472-f6f69d954378@redhat.com> <9143f64391d11aa0f1988e78be9de7ff56e4b30b.camel@gmail.com> <20190702074806.GA26836@linux> <20190731120859.GJ9330@dhcp22.suse.cz> <4ddee0dd719abd50350f997b8089fa26f6004c0c.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ddee0dd719abd50350f997b8089fa26f6004c0c.camel@gmail.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 Thu 01-08-19 09:06:40, Rashmica Gupta wrote: > On Wed, 2019-07-31 at 14:08 +0200, Michal Hocko wrote: > > On Tue 02-07-19 18:52:01, Rashmica Gupta wrote: > > [...] > > > > 2) Why it was designed, what is the goal of the interface? > > > > 3) When it is supposed to be used? > > > > > > > > > > > There is a hardware debugging facility (htm) on some power chips. > > > To use > > > this you need a contiguous portion of memory for the output to be > > > dumped > > > to - and we obviously don't want this memory to be simultaneously > > > used by > > > the kernel. > > > > How much memory are we talking about here? Just curious. > > From what I've seen a couple of GB per node, so maybe 2-10GB total. OK, that is really a lot to keep around unused just in case the debugging is going to be used. I am still not sure the current approach of (ab)using memory hotplug is ideal. Sure there is some overlap but you shouldn't really need to offline the required memory range at all. All you need is to isolate the memory from any existing user and the page allocator. Have you checked alloc_contig_range? -- Michal Hocko SUSE Labs