From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26F9AC433DB for ; Sun, 31 Jan 2021 21:56:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7730C64E28 for ; Sun, 31 Jan 2021 21:56:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7730C64E28 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AAD9D6B0006; Sun, 31 Jan 2021 16:56:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A5E9B6B006C; Sun, 31 Jan 2021 16:56:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 94C2F6B006E; Sun, 31 Jan 2021 16:56:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0067.hostedemail.com [216.40.44.67]) by kanga.kvack.org (Postfix) with ESMTP id 7D50D6B0006 for ; Sun, 31 Jan 2021 16:56:30 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 310CE181AEF15 for ; Sun, 31 Jan 2021 21:56:30 +0000 (UTC) X-FDA: 77767429740.26.girl19_4a07321275bd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 0D4C61804B660 for ; Sun, 31 Jan 2021 21:56:30 +0000 (UTC) X-HE-Tag: girl19_4a07321275bd X-Filterd-Recvd-Size: 5002 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Sun, 31 Jan 2021 21:56:29 +0000 (UTC) Received: by mail-lj1-f174.google.com with SMTP id l12so17212270ljc.3 for ; Sun, 31 Jan 2021 13:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zO34/3ZA+CkltKNl2PpcDzP0GsqnpE1ZCLqi6BG92QU=; b=fm0+aCk6BtxQfENltWf1/RlYYfNSq33QZP19XEtxgizJvi+9kwVDkOqVVWinTr8RKt SMgtjPJoGnPPICls/VnOBpyTeAZQ56+t8B0P7lBi1Sb5xkEFZ8v/DcfPkmDm+RSlyxn2 zTKGghgExi53SRZc+2/rWDFy6trOmHD7O1mZw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zO34/3ZA+CkltKNl2PpcDzP0GsqnpE1ZCLqi6BG92QU=; b=XxbCBatPcO2Yi9nWwDoHLyvGHW3p3Cu8w4LF0J1k/XehF5Xp9qa5IK187uV7Ydgqot Xj2g6pSnvOLcS8lthuMMf60Fz64m90Y8xKkVrPHaKXHYUTWw3XVaqeefKnBlULIt3qUS gOZmKDQO2qC2uvgf3Kifubn9b4uE7rsG5a4aElvBfFG7KcGNMlpnsD0anydrApHsn3xd fFop8u8S+O/6yRf9/eckcWzB1w2RmO2e2L2wWIK/i5IlcxA8WCtzJFwZOxRp34pUb8lK uLi2BV/8y8BEKxwAZ2lb3t4yamVEjlNQkS9vB/2U+410YyLxuEBf8XTNPADAPkdauKUR U7Dg== X-Gm-Message-State: AOAM531xPL/ZwqvslElxGebseYgqegGRoS7qC49e/SX15RSJs5wmMjK/ BIL+O9KcDIJkVcreUcqUAVXy38SGBgzEiQ== X-Google-Smtp-Source: ABdhPJy5EMrfY2aysdGpffa/8y/EWvzXxHqfED5+/FlbwXriJpC9Rv9suo0BognEhdAdrblL0P9qtw== X-Received: by 2002:a2e:3515:: with SMTP id z21mr8182220ljz.73.1612130187658; Sun, 31 Jan 2021 13:56:27 -0800 (PST) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id p14sm3486061ljg.103.2021.01.31.13.56.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Jan 2021 13:56:27 -0800 (PST) Received: by mail-lj1-f178.google.com with SMTP id c18so17207889ljd.9 for ; Sun, 31 Jan 2021 13:56:27 -0800 (PST) X-Received: by 2002:a19:c14c:: with SMTP id r73mr6756270lff.201.1612129783707; Sun, 31 Jan 2021 13:49:43 -0800 (PST) MIME-Version: 1.0 References: <20210130221035.4169-1-rppt@kernel.org> <20210130221035.4169-2-rppt@kernel.org> <20210131080356.GE242749@kernel.org> In-Reply-To: <20210131080356.GE242749@kernel.org> From: Linus Torvalds Date: Sun, 31 Jan 2021 13:49:27 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/2] x86/setup: always add the beginning of RAM as memblock.memory To: Mike Rapoport Cc: Andrew Morton , Andrea Arcangeli , Baoquan He , Borislav Petkov , Chris Wilson , David Hildenbrand , "H. Peter Anvin" , Ingo Molnar , =?UTF-8?Q?=C5=81ukasz_Majczak?= , Mel Gorman , Michal Hocko , Mike Rapoport , Qian Cai , "Sarvela, Tomi P" , Thomas Gleixner , Vlastimil Babka , Linux Kernel Mailing List , Linux-MM , stable , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Jan 31, 2021 at 12:04 AM Mike Rapoport wrote: > > > > > That's *particularly* true when the very line above it did a > > "memblock_reserve()" of the exact same range that the memblock_add() > > "adds". > > The most correct thing to do would have been to > > memblock_add(0, end_of_first_memory_bank); > > Somewhere at e820__memblock_setup(). You miss my complaint. Why does the memblock code care about this magical "memblock_add()", when we just told it that the SAME REGION is reserved by doing a "memblock_reserve()"? IOW, I'm not interested in "the correct thing to do would have been [another memblock_add()]". I'm saying that the memblock code itself is being confused, and no additional thing should have been required at all, because we already *did* that memblock_reserve(). See? Honestly, I'm not seeing it being a good thing to move further towards memblock code as the primary model for memory initialization, when the memblock code is so confused. Linus