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 93ABE26F291 for ; Sun, 22 Feb 2026 13:58:51 +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=1771768734; cv=none; b=rzWw8w3Bv5vzuTLUEswszPk0nwIZ5EHPZziR22sY7NlFwm9/vSTVtEFpKLN3krfVQplZETurhp/NCFL278gQQimEnL3dIT+MMwITdHTqKgP9SpA1C3xaPqssFOrSS9F8dbSuxPV8VK4rkiCkML+Q8ctY3RZfgqHL6uuAjsQrmcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771768734; c=relaxed/simple; bh=yYZTK3EZniH5CXyCdE+AZPusDoYMLeEnDGS9uRdBJVw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TI0UXzh6DXiMtsGT9bb7sbX/p5ei5MPUk8Wp/2YH2llj1ft8iymPPPV1P/wDrUjYLiUJI6mh6vwGaYGO7UVFlSQTBT4Q+2b3Cus1N0Ssg+H6/Ki+fiqBaatVQqds1gLaJHZ8mZULnQuTBA+veIUCuF77TT5DvZXwitNT5Vd0Zo8= 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=UpWN701j; 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="UpWN701j" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=CJM8LbZ9bgwxU0IPPgSVzAbIOKSeYTx/H0HDf7oWGDc=; b=UpWN701jvBOcd1H5YT1Hon1mag +u6dLOZCSNU1dEsozENuQalcFQfVXhQsvI+XuRz9733nLjSXr0lKST4ANJy034Mni5GVzEluADn5K zyWbeGaVBTQ5naFbiHXMLmi0OzaBF+Uf32bwftolJooOQWQH6KNJI9uZzWQNwNyOhWXaWbHF8WGGN SR1nJdVHanoMYJ1RK46eALilvlQvNhrMfv2lcawVEbHSnjrdQ9AYPOvsjBuHaVu9Me9GUB3dMuJaQ YTRoltieWJayWzGLRzOML/IU9PwsE4fZHkhaRdbc9IU/cIDC+n6SD2lMZEm0oPFUyVnfTjFm8E6y2 k5zXlECA==; Received: from [177.83.214.207] (helo=[192.168.0.51]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1vu9yk-003oBA-7Z; Sun, 22 Feb 2026 14:58:34 +0100 Message-ID: <20e28221-f9c7-47c0-43fa-72bb2e868386@igalia.com> Date: Sun, 22 Feb 2026 10:58:27 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 2/2] mm/memblock: Add reserve_mem debugfs info Content-Language: en-US To: Mike Rapoport Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-dev@igalia.com, kernel@gpiccoli.net, Andrew Morton , Steven Rostedt References: <20260217195816.861684-1-gpiccoli@igalia.com> <20260217195816.861684-3-gpiccoli@igalia.com> From: "Guilherme G. Piccoli" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Mike, thanks a bunch for your review! Good ideas, I'll change the implementation to follow the suggestions and improve the changelog, as you suggested. I have some questions though, that I will comment inline, below. First of all, what should we do regarding patch 1? Should I resubmit as part of V2, even with no changes - or pick it now and I only submit patch 2 as V2, with changes? On 21/02/2026 05:52, Mike Rapoport wrote: > [...] >> + string_get_size((u64)(map->size), 1, STRING_UNITS_2, txtsz, 16); > > phys_addr_t should be casted automatically to u64 IMO. > And please, no magic numbers. Specifically here, by magic number you mean my choice of 16, right? What do you suggest me to pick? It's the length of the string carrying the size of reserved_mem, some number must be selected for this length...lemme know WDYT. > [...] > You can define "reserve_mem" attribute separately, and leave the existing > memblock_debug_show() as it was. > >> + } else >> + memblock_debugfs_files(m); >> + >> return 0; >> } >> DEFINE_SHOW_ATTRIBUTE(memblock_debug); >> @@ -2762,6 +2791,9 @@ static int __init memblock_init_debugfs(void) >> { >> struct dentry *root = debugfs_create_dir("memblock", NULL); > > No need to create memblock directory in debugfs if there's nothing to show. > Could be something like > > if (i!(IS_ENABLED(CONFIG_ARCH_KEEP_MEMBLOCK) || reserved_mem_count)) > return; > > root = debugfs_create_dir("memblock", NULL); Very good suggestions here, but just let me clarify: so I could continue showing the "reserved_mem_param" inside the "/memblock" folder, just using a different function for that attribute? I understood that, based on your (good) suggestion to hide the memblock folder if ARCH_KEEP_MEMBLOCK is not defined and there is no reserved_mem set ... just want to confirm to follow-up the implementation. Cheers, Guilherme