Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp786303pxb; Tue, 12 Apr 2022 13:25:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUTB8tKlNTrFqXe+tjv6xoj9kxluVRR76PaZBKAASpPxMyz7Ah2UcKu1cLysCb/cCHLZvE X-Received: by 2002:a17:903:2488:b0:153:8f59:8c03 with SMTP id p8-20020a170903248800b001538f598c03mr40038182plw.54.1649795139086; Tue, 12 Apr 2022 13:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649795139; cv=none; d=google.com; s=arc-20160816; b=fPwAYcRUNwZSL8LCDuknh/HlMvkwf+Q7/KROl/R9oqT6QlSoBCf+Kg+ZK3sx/zwLwm v8R8VWxSaumkjcz0DUO+DJsKeskj0Ve8mfhxIWf3PbPUmQUYfxVTJavry2g+t/dVvqPh /bo/tR2ur18IS14NG7GZu+gdI1OMGegLqmrLV4HKw927mKD/4NfJ0vHb24pkpzIVYcGn zSGSpaNCJA98XXvH8qY8hD4u4NONo2uzBYh3fLCVoiZ0sNwnfK2jPzrQxmwZvBKN1RHr w5WBpcqIZDKwwj5I3ZHUFhBRdot6/dq9CPVFGWpecwj+D0U80Cyop27U61llJZkvGACx jBMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2p02r0qa3e7X4Wi/Q0dsORa9S7p70lFcudmcPI2GN5A=; b=n1ovYgeUaRyqbZAbTAwLs1ln18u8aWeI737DNzTxhzITzofcnH922Eu4WojKFt+Mr4 zfZ+CzPVh6D4+99Jqjn06SQQNwOcT0gRxvlRiecnGSCRhtCV9j2MwQj+FmPzgrhbWW1V OXwmG6MBzi/VyUuN5a/V0QdG0QtRvBvimaRFv9PSO9f26nenuX6B2I2xaNRU0YNGEkyV KL5eb7u21IjxZEhI42ps024/xSziMSlLcWYgOyuV7VY4oX6Mmjk9BPPCDPUpeCe+YbfU yLC/L2cwY7hc9rBwbp8Vn6Ydp1IbOcu2a7WrkVCFUxVQrOtA6DenjrEVX6BTPtIUgNCs jjDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uybX+7vq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n20-20020a6563d4000000b0039d1c1fdd0esi3642135pgv.10.2022.04.12.13.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:25:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uybX+7vq; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE6CF9D4FF; Tue, 12 Apr 2022 13:04:52 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356201AbiDLR3J (ORCPT + 99 others); Tue, 12 Apr 2022 13:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235239AbiDLR3F (ORCPT ); Tue, 12 Apr 2022 13:29:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C258252B2A for ; Tue, 12 Apr 2022 10:26:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6E3A3B81F5B for ; Tue, 12 Apr 2022 17:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69718C385A1; Tue, 12 Apr 2022 17:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649784405; bh=5fBiB9n+naRmExVYTrfBR6Y0GO2FDmg4/T8dW79QLCA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uybX+7vqcUMrlKabYMrKLxwaPbspd2HZmFKgjmSgNwUo5KRUgiqpc/0eVigepUKEL pxGEKibtkMnxIcTFszfqT2CP7qzlIc+eA+lkZPZ45D+dNd+M54X2IqpnmMIJRMRF4B 7iXxsupYtPcHTnOvS324q9mMJjHUP2XTeVI4T7DfsBIZAzzqPvrrslpTU8Oq/LX/rn LplL6FUmJiem1Y/kuTLA/X3MH7KkFUK/26cC0K5CgkDO7L8EeXmzk+7DSovcenZfKF P5XzAX5TwfYYMpjHnOqDAE5KqKzuZGsU/fgBEYUADuxNFaoawqZUjRaS2awQvI0nNy GQV+Uk8lVNMJg== Date: Tue, 12 Apr 2022 20:26:36 +0300 From: Mike Rapoport To: Faiyaz Mohammed Cc: quic_vjitta@quicinc.com, karahmed@amazon.de, qperret@google.com, robh@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: memblock: avoid to create memmap for memblock nomap regions Message-ID: References: <1649704172-13181-1-git-send-email-quic_faiyazm@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1649704172-13181-1-git-send-email-quic_faiyazm@quicinc.com> X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 12, 2022 at 12:39:32AM +0530, Faiyaz Mohammed wrote: > This 'commit 86588296acbf ("fdt: Properly handle "no-map" field in the > memory region")' is keeping the no-map regions in memblock.memory with > MEMBLOCK_NOMAP flag set to use no-map memory for EFI using memblock api's, > but during the initialization sparse_init mark all memblock.memory as > present using for_each_mem_pfn_range, which is creating the memmap for > no-map memblock regions. To avoid it skiping the memblock.memory regions > set with MEMBLOCK_NOMAP set and with this change we will be able to save > ~11MB memory for ~612MB carve out. The MEMBLOCK_NOMAP is very fragile and caused a lot of issues already. I really don't like the idea if adding more implicit assumptions about how NOMAP memory may or may not be used in a generic iterator function. -- Sincerely yours, Mike.