Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3376506pxb; Sun, 31 Jan 2021 14:02:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5QSxTJ8V2OGLPkaM/nWjZFdAQk+cqMLgopg69ags/8SaUwKTOWPI3J2/6xWC08kNQyaPl X-Received: by 2002:a17:906:cc56:: with SMTP id mm22mr2537087ejb.181.1612130537417; Sun, 31 Jan 2021 14:02:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612130537; cv=none; d=google.com; s=arc-20160816; b=cy7D3Scul8K9sJU82CMXhmsXL5AT9nNlVFB0JRbSRzcrDI6I7YwuQ8UEKSv8Xj5JOA oek5hlgJsoR+yP9l+MdVgWUq0VI5sywL9jnAfvOsbqodbFOws01BCnSvYm1myqZ1+7bZ NsBHSuuY3C8RAfe2cpo6VrDzOvE2L9jUxHFG+SfHmL5rwkzFMsZ3A1/r172AesD4gOWf 6Gqa8idjpHOIq42+7BUk/k1LYOJBVf1HWWmbmrjgzjpbof88KJ/HS6TzQhNFEzu25VmH KtaVHA4WJOhHvit/wvKBqhHccSnVvMdNbIep2RnbvyGDoejokt3AQ9TvUJ4+wZdpXkMp MdeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zO34/3ZA+CkltKNl2PpcDzP0GsqnpE1ZCLqi6BG92QU=; b=dBOz6GvWUkwGHElKAYcYCsbKRDfNkRn+PR+h2/PCER/NwOSUdNoakHgqgWcA8orbrM rwNIh5Yvd4rFOTZvK6xh8uERCti/0DYx7L2OQGiThe3qG6qVArC6Mv0B39mdsEssOYHN kSWa3js9vfZyp5BzRAiHLf89s2dFLbIXWtxqcbjDBbwH0mPpCTC86ltyHdylqsallu4N FIExkLwfEq/j6uudOcxav8bJsFwcvXswYtjEKU4DVP5W6SM7vXrnkwB11fsohc752Hjo QvBCV3HsuIQjS9XVP/wHKNZ53ZW+GhObDWBMcWF4icQjxCc0Y+4evw6UTpjiJPjVt3M1 cMFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fm0+aCk6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ak17si10044217ejc.215.2021.01.31.14.01.38; Sun, 31 Jan 2021 14:02:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fm0+aCk6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbhAaV6R (ORCPT + 99 others); Sun, 31 Jan 2021 16:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhAaVzl (ORCPT ); Sun, 31 Jan 2021 16:55:41 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D15AC061573 for ; Sun, 31 Jan 2021 13:54:59 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id h7so20138681lfc.6 for ; Sun, 31 Jan 2021 13:54:59 -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=V+Evi0jKgXQEpYBpvqsrw5jGSyptIXhKJARtv5ka2cVgykvlm0QkK3u/46DruN5YVu /nN5oDEASOnwmqlRSrCoysFchzpLx6baSoG5HpsR3v+olaldcbeaIkAq2vkEBOX8wudx bpc7suOdJdeJcmnBK800ziNoUTP2w1RWpYhQNVccs6pR3BPNd7hd5+OtE1hLRkR9/vrq j4UHkwbjVOvRgshYC4Hso3jRIhrw0DQPdh9+PWz7ryTNgh28odQu0L76URwt0Sc+79c4 CnIQ2r2PkWM1z1RDU0SboitHu28nfonX3hKd0pitcLEDKWtLVOR9fyZh7HsxhvZVzSKI IyEA== X-Gm-Message-State: AOAM531mLT1WJIXAOYOkRUzX7vY+vNy+5Eij0Rof5EP7SoDUV5oxo+io 60YwsJEjWAxrWC1GRz4kuWieq5fg02sxeg== X-Received: by 2002:a05:6512:33cb:: with SMTP id d11mr6913683lfg.24.1612130097248; Sun, 31 Jan 2021 13:54:57 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id x14sm33141lfg.165.2021.01.31.13.54.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Jan 2021 13:54:57 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id a8so20117406lfi.8 for ; Sun, 31 Jan 2021 13:54:56 -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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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