Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp319133pxu; Fri, 4 Dec 2020 04:14:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6nMrPdOHS14RCl/Yw3U61GQP8ZJ/jzfjJKdyAI4T18azy0LGEQATIFQTmwETpu2njTF0h X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr6911304ejj.32.1607084054998; Fri, 04 Dec 2020 04:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607084054; cv=none; d=google.com; s=arc-20160816; b=yPcaiVph38ZWOON5AFa5NSSun2p/nwX3M5QD3bkCZnejb1PqZg2e3P/jdRB0EQZ544 LeVcBuo6gJhk5VASYwl7HwLoqt9kZXyez28eJ8jdRHDwDjt6EQHwXKCs7draxQz+XxLv TIFOvvSH4qHcbAmrBeQAAJVp+TxTIkz/Kxnb94kMEJPZ5w6/2aoF/LuRm5QfTMT5E3gg 2Za1tFQWqdnlS+qRdHJXZ2PUaZIlOg9a5sDS558XVYWkw0E8WGgUQ589PVdjkIWUX/7X M7/UxaLvHqhn98ZTXgoHBL+I0xEEl+/HeZX7qEn/9TpfQ8dz1+AbeXwxN5n3kmgapRO6 0y6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fG/OLlPTXZxI8olDLxYdeYS0yJL3ophWvBqEQDOedHY=; b=f0CpVXiebgfrgvsL66OpOraqsJcgUUr4iaNg+UyafG9yPqL8HMDHmyIn3WuXE5JZb2 5y38KXK9BfTh8PSmYEiIMLmzCoLDTxKTr008xNiYjnprZE/v8g8TXE3DYZQOmIdEfQq2 aPeQAOMDQnlsxBwXj6N0v8zlNXCmVBPX+rYqwbLHxuE9bCnhQXPrw1lbaaUNAdi1kkth s/+7WiHAI99prGKQ5ByV9OzoFu3SR4mT/cmhSyOi4kh7yGL7CCYBjqHbonDH7jdp81iT x0Ip8qjvN8o7z5fafUXKlbw8rmmLfC0E/m0g7vWkz8bWxrj26n+NP4SFY5OvMNu49Xkp SmEg== ARC-Authentication-Results: i=1; mx.google.com; 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 e21si761267edv.260.2020.12.04.04.13.52; Fri, 04 Dec 2020 04:14:14 -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; 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 S1730148AbgLDMLJ (ORCPT + 99 others); Fri, 4 Dec 2020 07:11:09 -0500 Received: from elvis.franken.de ([193.175.24.41]:48093 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728110AbgLDMKy (ORCPT ); Fri, 4 Dec 2020 07:10:54 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1kl9ud-0005Nb-02; Fri, 04 Dec 2020 13:10:11 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 0226DC02E5; Fri, 4 Dec 2020 13:08:16 +0100 (CET) Date: Fri, 4 Dec 2020 13:08:16 +0100 From: Thomas Bogendoerfer To: Jiaxun Yang Cc: Tiezhu Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: Re: [PATCH 2/2] MIPS: Select ARCH_KEEP_MEMBLOCK to enable sysfs memblock debug Message-ID: <20201204120816.GC10011@alpha.franken.de> References: <1606965544-22611-1-git-send-email-yangtiezhu@loongson.cn> <1606965544-22611-3-git-send-email-yangtiezhu@loongson.cn> <9c9af0de-387b-f113-b0a2-c5767c31c16d@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9c9af0de-387b-f113-b0a2-c5767c31c16d@flygoat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 11:58:51AM +0800, Jiaxun Yang wrote: > > > 在 2020/12/3 上午11:19, Tiezhu Yang 写道: > > In the current code, CONFIG_ARCH_KEEP_MEMBLOCK is not set for MIPS arch, > > memblock_discard() will discard memory and reserved arrays if they were > > allocated, select ARCH_KEEP_MEMBLOCK to give a chance to track "memory" > > and "reserved" memblocks after early boot, with this patch, we can see > > the following two sysfs interfaces under DEBUG_FS. > > > > /sys/kernel/debug/memblock/memory > > /sys/kernel/debug/memblock/reserved > > Is this really necessary? > memblock data is not really necessary after boot for non-debug purpose. > > Given that MIPS is widely used in embedded systems which doesn't have much > memory, keeping unused data after boot is kinda unconvincing. about how much memory are talking here ? > > If you intend to debug that please do it locally. maybe we can add a if DEBUG_KERNEL since enabling DEBUG_KERNEL will cost already some memory... Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]