Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8482722ybi; Tue, 23 Jul 2019 09:19:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXZZHrn8UNkR+qbIT206GVsMsrsvUJqxIgu+h+cuZY0r5ygaNRFnmMwKiO6iOnzBBynhU4 X-Received: by 2002:a63:8ac3:: with SMTP id y186mr76792589pgd.13.1563898796363; Tue, 23 Jul 2019 09:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563898796; cv=none; d=google.com; s=arc-20160816; b=X3i8Ku0I/gtKgiemE9wkZGLNvvXxwQ4KHYvy6P8QIfB1cYsbwQLa4Nyk4x2udLOxwR 1cjKlLjoMU+KwomRK8/kven2xQkDHxLUEi0jkbflWeHcn7AgVs3ZVku1ww9xtu7eItwH vXAnTfeFzADHMMU1+qLQQ6aYsmc1cu7pz2StLjov4Rum+GjBjDJyjQxL6vW+igFsbhJw DI/PnSkcCdCm9BlQ3pRezFj8nn5XVd/3nbIVnV7KlAxb9DbSj6fv1lixIVNlxJyOgI2b c5MHp59AOiQW/RSjxx1Xcq2qSw+YDM2U2jJi1RXx+QYfnb9CQG4uUKsnbxRhxLLTQxFp TzmA== 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=znLS0Flfr7bAoDo+PUGRaAiv2se/eRKzKSOxZeMt00o=; b=q2VPxDjBUUwTAxxH22+qGlc4ErB4gEprDAAyUUFJnFXfGgmIaDhVl5WeaRZYvPvfB4 QkbWTojYtmX7aRjzNzaMoM/wn/Q7ClUXpTY2bn7IyNDppLqkS/aGOuaSSvaaP/naTX84 VlYLHMdMonhzpp5BzXARckc0HTPoYcdtJyzFR4AblslO3bMauq9Xh577Bpbfudhzh5A0 uiGzquRuOeMOCj5EbKfaXvwYTgFgHqcirYOA/uLvkuWOx3bqv4+cJ92Jb3Ruhr0P1SOA z6I9TcqKardIXYHaTMYZMO89aVlLDR6kLg15tz7YSI6EHUpO3qplnokncLUE2O7NPt09 8yfQ== 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 x125si13914350pgx.332.2019.07.23.09.19.40; Tue, 23 Jul 2019 09:19:56 -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 S2388188AbfGWHGp (ORCPT + 99 others); Tue, 23 Jul 2019 03:06:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:59780 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725837AbfGWHGo (ORCPT ); Tue, 23 Jul 2019 03:06:44 -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 77322AE91; Tue, 23 Jul 2019 07:06:43 +0000 (UTC) Date: Tue, 23 Jul 2019 09:06:42 +0200 From: Michal Hocko To: KarimAllah Ahmed Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Pavel Tatashin , Oscar Salvador , Mike Rapoport , Baoquan He , Qian Cai , Wei Yang , Logan Gunthorpe Subject: Re: [PATCH] mm: sparse: Skip no-map regions in memblocks_present Message-ID: <20190723070642.GC4552@dhcp22.suse.cz> References: <1562921491-23899-1-git-send-email-karahmed@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1562921491-23899-1-git-send-email-karahmed@amazon.de> 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 Fri 12-07-19 10:51:31, KarimAllah Ahmed wrote: > Do not mark regions that are marked with nomap to be present, otherwise > these memblock cause unnecessarily allocation of metadata. This begs for much more information. How come nomap regions are in usable memblocks? What if memblock allocator used that memory? In other words, shouldn't nomap (an unusable memory iirc) be in reserved memblocks or removed altogethher? > Cc: Andrew Morton > Cc: Pavel Tatashin > Cc: Oscar Salvador > Cc: Michal Hocko > Cc: Mike Rapoport > Cc: Baoquan He > Cc: Qian Cai > Cc: Wei Yang > Cc: Logan Gunthorpe > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: KarimAllah Ahmed > --- > mm/sparse.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/mm/sparse.c b/mm/sparse.c > index fd13166..33810b6 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -256,6 +256,10 @@ void __init memblocks_present(void) > struct memblock_region *reg; > > for_each_memblock(memory, reg) { > + > + if (memblock_is_nomap(reg)) > + continue; > + > memory_present(memblock_get_region_node(reg), > memblock_region_memory_base_pfn(reg), > memblock_region_memory_end_pfn(reg)); > -- > 2.7.4 -- Michal Hocko SUSE Labs