Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3183390pxb; Mon, 25 Jan 2021 09:02:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjioCNRBuaXkZON3OT3oDnH85cfwCXNk3eidHesbEYbPW5ikaopW8YnzTQF5/7e7Q9FErH X-Received: by 2002:a17:906:b219:: with SMTP id p25mr935998ejz.430.1611594166111; Mon, 25 Jan 2021 09:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611594166; cv=none; d=google.com; s=arc-20160816; b=Rhd2miBpF6C8I4cRHygFr4bpdkcB+jzRXewDT1ZmM+KW9Iv1v2xr9bueexWudMre8K wonx4GyrTinED4XeEq5OgtxeWWvEUvrBPs2QfxbwD947VQEnWf0aj3NP9w6MDR70yvRt LOefaTsSLYE2zf5Vw2BMyjgQTKXBtg8lO9uOR2YUew/+7KUmPzYrFtj1gggfkRGT705C Pz+ZdK9R/gjrnskV0rOburb8fG1DU1YUlUHC78SUeao82lelc+g4+dMETbpPoAt6ba1I Tt8HN4u5/mlWk/1oQglNH3SoN7zUTubzPjK92hOp8Vu76v0h0WpPif1jNsiy7rDXsk6+ Xldw== 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=BD74lMtV58jwXCy0MpC+aGxOM2Y8WpxjlRkgS1KEFjM=; b=JLFdjrf1WigbaMHaEbMauNPBasWM+Gi5BI/eXMAPNpH8+09bR0lwN/ZLlOpMbqlOcj 4D7llpUxHrvEES9OtlLmfFcotUEXt8MBk7EdkGriKqVBXWe0leChcSXWVbS36iyYa+9k wyrajvGfWWcm1SOiTCwnqVI/HRmJgRgRT3kHt8tAroDgq/RHJgIhkeRkUjidWVq14ESf 7fRhpupTkGNJpqit9FUJit7ftCSCVV37G9Njk/Ufr1ML1vjj3Btz8nU/T9r/X8bh5kHC E97mWD6WU79LRmsmS8AHSlvvIooc67okXkLLuy4kJ9iUSu+X7bD2QjBl1IZHmL+nNBQG vc9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lSktTLxv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d26si3546882edv.513.2021.01.25.09.02.17; Mon, 25 Jan 2021 09:02:46 -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=@alien8.de header.s=dkim header.b=lSktTLxv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729873AbhAYQ6i (ORCPT + 99 others); Mon, 25 Jan 2021 11:58:38 -0500 Received: from mail.skyhub.de ([5.9.137.197]:51334 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729369AbhAYQ51 (ORCPT ); Mon, 25 Jan 2021 11:57:27 -0500 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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