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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17DE1C433EF for ; Fri, 4 Mar 2022 17:11:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8BD7C8D0002; Fri, 4 Mar 2022 12:11:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 86B6E8D0001; Fri, 4 Mar 2022 12:11:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 75BF08D0002; Fri, 4 Mar 2022 12:11:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 65E1A8D0001 for ; Fri, 4 Mar 2022 12:11:47 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2719D8249980 for ; Fri, 4 Mar 2022 17:11:47 +0000 (UTC) X-FDA: 79207345854.26.2891806 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 2561718000E for ; Fri, 4 Mar 2022 17:11:45 +0000 (UTC) Received: by angie.orcam.me.uk (Postfix, from userid 500) id F09E792009D; Fri, 4 Mar 2022 18:11:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id EA18792009B; Fri, 4 Mar 2022 17:11:44 +0000 (GMT) Date: Fri, 4 Mar 2022 17:11:44 +0000 (GMT) From: "Maciej W. Rozycki" To: Thomas Bogendoerfer cc: Tiezhu Yang , Mike Rapoport , Andrew Morton , Xuefeng Li , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/4] MIPS: Refactor early_parse_mem() to fix mem= parameter In-Reply-To: <20220304153517.GA28487@alpha.franken.de> Message-ID: References: <1646108941-27919-1-git-send-email-yangtiezhu@loongson.cn> <1646108941-27919-2-git-send-email-yangtiezhu@loongson.cn> <20220304151052.GA27642@alpha.franken.de> <20220304153517.GA28487@alpha.franken.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 2561718000E X-Stat-Signature: 7h6dr6ct5u6nrckqhe5tigt5jzn5bk83 X-Rspam-User: Authentication-Results: imf16.hostedemail.com; dkim=none; dmarc=none; spf=none (imf16.hostedemail.com: domain of macro@orcam.me.uk has no SPF policy when checking 78.133.224.34) smtp.mailfrom=macro@orcam.me.uk X-Rspamd-Server: rspam03 X-HE-Tag: 1646413905-99534 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 Fri, 4 Mar 2022, Thomas Bogendoerfer wrote: > > > With this patch, when add "mem=3G" to the command-line, the > > > kernel boots successfully, we can see the following messages: > > > > unfortunately this patch would break platforms without memory detection, > > which simply use mem=32M for memory configuration. Not sure how many > > rely on this mechanism. If we can make sure nobody uses it, I'm fine > > with your patch. > > maybe we could add a CONFIG option, which will be selected by > platforms, which don't need/want this usermem thing. FWIW I don't understand what the issue is here beyond that we have a bug that causes a system to hang when "mem=3G" is passed on the kernel command line. That is assuming that system does have contiguous RAM available for the kernel to use from address 0 up to 3GiB; otherwise it's a user error to tell the kernel it has that memory available (I did get bitten by that myself too): garbage in, garbage out. I think having a CONFIG option automatically selected to disable the ability to give a memory map override would handicap people in debugging their systems or working around firmware bugs, so I would rather be against it. Maciej