From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2113025D1E9 for ; Tue, 17 Feb 2026 19:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771358329; cv=none; b=fxm+YeMFSJYnPiO0erSZcuz+FAgrn13ShXgC/bQjilMhPCorS12xMfPrirkgac70nXbjSyM3wfoJFyelI5DwnsZ15SuOhnRD3swpsNlDg/T/Ab/1k81E3EHudvUxfm/l8kKRKmfmeRipbFoSBu03FYuSPkaSBKKEhfmkTz7rssU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771358329; c=relaxed/simple; bh=wxQlb8GNxyhOSStURuz9cx7RPkwwsOGEvbGlYmDpsFI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AqzkGl7bAdDq9noJCDR5POcQ3/rkNCehWXep2bFvJ/NJnq5gx+St0nasl6H1yiZAWtRppImwPVgr4uj5gXrGuhiI8prUnwH477AGeK/xvwIyUwDIrVFBzJLv4U3/BLSwnXSI/vfIVqL501hi/irog1Xev/A4cx1LbdMAHxJx0aM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=aHeJwDhw; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="aHeJwDhw" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=p1Z5OGRnctxXxv8c/Nb45yXoo2HLodfSskKuVvvpxq4=; b=aHeJwDhwo7N45R50h0WR4bnT/F jhHaCdY6VZy5syzvhL3Lehk78qxcRd7bZwXXYX+M6fTPTOnzgDdkPjslI54+1rK5klnxsNsk19NBq k7TfZ03xbGTziNur3G8QjkEnyCHD0X2DYcom3HMjZAROxBOdAwI7OXMRxjNFFFdp8D9wGpKPBwD4g nyopXHts0EjPXYBYrEzZjD6DGVUTNwNFUyqhlCz3k08r4uIbUYQo1EsWdV7sWbXuEI85DAIGGR9Di yThngb0TPVOd0B/lHzbDnv7YjqIp+EAQomvjgTGKQwR7j6zOr4O+VPmB4BGyl6WJOPK/dxlIKiZMe nxqHBTiQ==; Received: from [177.45.213.208] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vsRDQ-001nL3-IG; Tue, 17 Feb 2026 20:58:36 +0100 From: "Guilherme G. Piccoli" To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, gpiccoli@igalia.com, Andrew Morton , Mike Rapoport , Steven Rostedt Subject: [PATCH 0/2] Some small improvements to reserve_mem Date: Tue, 17 Feb 2026 16:45:05 -0300 Message-ID: <20260217195816.861684-1-gpiccoli@igalia.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently the "reserve_mem" parsing is lacking information both if it works or not. It can fail in many ways, so I'm adding some messages to help users determine failure. At the same time, if it succeeds, the only place I can "see" it is in the accounting of reserved memory, as the following kernel message: [0.086881] Memory: 3958852K/4189472K available (19671K kernel code, 2893K rwdata, 9724K rodata, 4340K init, 5040K bss, 220244K reserved, 0K cma-reserved) Since "crashkernel=" reservations are shown in both kernel log and /proc/iomem and other unused memory buffers appear in /proc/iomem as "RAM buffer" entries, I've added hereby a debugfs entry for "reserve_mem". Though I didn't love the implementation, I think it's not so hideous so decided to send, please lemme know what you think and if we should improve code or even discard the idea heheh Notice that, with this change, the memblock debugfs folder ends-up showing always, no matter if we have ARCH_KEEP_MEMBLOCK set or if reserve_mem is set. Thanks in advance for reviews/comments! Guilherme G. Piccoli (2): mm/memblock: Print out errors on reserve_mem parser mm/memblock: Add reserve_mem debugfs info mm/memblock.c | 65 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 11 deletions(-) -- 2.50.1