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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 87975C433DB for ; Mon, 25 Jan 2021 16:56:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3CE672223E for ; Mon, 25 Jan 2021 16:56:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CE672223E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ACD718D0018; Mon, 25 Jan 2021 11:56:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A7B918D0001; Mon, 25 Jan 2021 11:56:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 991CA8D0018; Mon, 25 Jan 2021 11:56:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 842EA8D0001 for ; Mon, 25 Jan 2021 11:56:47 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 427F3180AD806 for ; Mon, 25 Jan 2021 16:56:47 +0000 (UTC) X-FDA: 77744901654.29.ring61_1e0c86127587 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id A69DB1808659D for ; Mon, 25 Jan 2021 16:56:46 +0000 (UTC) X-HE-Tag: ring61_1e0c86127587 X-Filterd-Recvd-Size: 3270 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 16:56:45 +0000 (UTC) Received: from zn.tnic (p200300ec2f09db004bb0ee0cb7e01378.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:db00:4bb0:ee0c:b7e0:1378]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id A12151EC030D; Mon, 25 Jan 2021 17:56:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1611593803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=BD74lMtV58jwXCy0MpC+aGxOM2Y8WpxjlRkgS1KEFjM=; b=lSktTLxvW8kMg+MvEcRC1HRH2dLCN4YLLVW7JV4JweUscGQHhTOSWIuRLYVBY/O7vmpSub 0ILCirzk/2yRiYh9A0br/PQXlHhBs7KGHwbVh24KdJYatwzBF7bWNPyQwru0Uwft4A/goH jWAz0LhPtEsVMpTWf6A1a/ukVMKgQPc= Date: Mon, 25 Jan 2021 17:56:43 +0100 From: Borislav Petkov To: Mike Rapoport Cc: Andrew Morton , Andrea Arcangeli , Baoquan He , David Hildenbrand , "H. Peter Anvin" , Ingo Molnar , Mel Gorman , Michal Hocko , Mike Rapoport , Qian Cai , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH 1/2] x86/setup: consolidate early memory reservations Message-ID: <20210125165643.GH23070@zn.tnic> References: <20210115083255.12744-1-rppt@kernel.org> <20210115083255.12744-2-rppt@kernel.org> <20210125145041.GD23070@zn.tnic> <20210125153114.GH6332@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210125153114.GH6332@kernel.org> 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 Mon, Jan 25, 2021 at 05:31:14PM +0200, Mike Rapoport wrote: > This would make sense but it's tricky. From memblock perspective, > allocations are always allowed and it is the user responsibility to ensure > all the early reservations are done before allocating memory. Yah, I don't trust my users to know that for sure... > So adding such a WARN would require a new memblock API and it's adoption by > all architectures, which is way beyond the scope of this series :) So definitely not for those series but I could imagine something like memblock_reserve() if (memblock_allocations_allowed()) WARN or so. This way you don't need to touch the archtectures. It all depends on what the other arches need/use. Or you could even make that a new memblock_reserve_warn() thing or so and wrap that functionality in it and have x86 call it only... Anyway, something to that effect. As to those two patches, you can add Acked-by: Borislav Petkov to the next revision since akpm is going to take them. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette