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 F0900C433EF for ; Sat, 5 Mar 2022 19:21:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 671AD6B0073; Sat, 5 Mar 2022 14:21:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5F9486B00A1; Sat, 5 Mar 2022 14:21:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4C13D6B00A4; Sat, 5 Mar 2022 14:21:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0240.hostedemail.com [216.40.44.240]) by kanga.kvack.org (Postfix) with ESMTP id 395C86B0073 for ; Sat, 5 Mar 2022 14:21:19 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D7F70181BA3EA for ; Sat, 5 Mar 2022 19:21:18 +0000 (UTC) X-FDA: 79211301036.26.1046ECA Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by imf05.hostedemail.com (Postfix) with ESMTP id 1DEB6100003 for ; Sat, 5 Mar 2022 19:21:17 +0000 (UTC) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 7791F92009C; Sat, 5 Mar 2022 20:21:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 6990592009B; Sat, 5 Mar 2022 19:21:15 +0000 (GMT) Date: Sat, 5 Mar 2022 19:21:15 +0000 (GMT) From: "Maciej W. Rozycki" To: Mike Rapoport cc: Tiezhu Yang , Thomas Bogendoerfer , Andrew Morton , Xuefeng Li , linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] MIPS: Modify mem= and memmap= parameter In-Reply-To: Message-ID: References: <1646108941-27919-1-git-send-email-yangtiezhu@loongson.cn> <8956c625-c18d-846e-3e65-7920776b27f3@loongson.cn> <4e10d7a4-3b3e-a220-8cd2-565614288950@loongson.cn> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: r67yrjwd1yoswm9j8igbhn37p86s1nzx Authentication-Results: imf05.hostedemail.com; dkim=none; spf=none (imf05.hostedemail.com: domain of macro@orcam.me.uk has no SPF policy when checking 78.133.224.34) smtp.mailfrom=macro@orcam.me.uk; dmarc=none X-Rspamd-Queue-Id: 1DEB6100003 X-HE-Tag: 1646508077-724945 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, 5 Mar 2022, Mike Rapoport wrote: > > > For example I have an x86 system that Linux does not how to interrogate > > > for RAM beyond 64MiB, so I do use `memmap=128M@0' (for legacy reasons the > > > x86 platform has a special exception to always exclude area between 640K > > > and 1M from being used even if not explicitly specified, but we do not > > > have a need for such legacy such legacy concerns with the MIPS port). I > > > consider it an interim measure however until the kernel has been fixed. > > > > > > Maciej > > > > > > > Hi Mike, Thomas and Maciej, > > > > Thank you very much for your feedbacks and discussions. > > > > To be frank, I think mem= and memmap= are used for debugging and testing > > in most cases, the intention of this patchset is to refactor the related > > code to make them work well on mips. > > mem= works fine on mips and there is no need to change it. > > If you must supply complex memory layout on the command line, consider > implementing support for memmap=exact and multiple memmap= parameters on > the kernel command line, like x86 does. There's nothing to implement as the MIPS port has supported arbitrary memory maps since Dec 11th, 2000; that's almost 22 years now. C.f.: , . Sadly commit a09fc446fb6d ("[MIPS] setup.c: use early_param() for early command line parsing") removed last pieces of inline documentation; I don't know why things like that get approved, but neither I can take responsibility. Also to say (in said commit): "There's no point to rewrite some logic to parse command line to pass initrd parameters or to declare a user memory area. We could use instead parse_early_param() that does the same thing." is IMHO unfair given that the "rewrite" was there in place almost six years before `parse_early_param' even started to exist! Why do people assume things have always been like they see them at the time they look? Maciej