Received: by 10.213.65.68 with SMTP id h4csp274116imn; Fri, 6 Apr 2018 21:34:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx48xIMqVnI/eRvNFLNe5R9ouLLJPYzT0s7fm5vnG/aGRLtB8VJ++egQDBIpb6VgBRPU2QgR5 X-Received: by 10.98.80.145 with SMTP id g17mr22440451pfj.71.1523075649967; Fri, 06 Apr 2018 21:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523075649; cv=none; d=google.com; s=arc-20160816; b=RhJ6JtJMis15MQE5YeoJ+7cCx/DSUGCL8cQhK6jdFfl1J3QT+lCjfKq5CBQJwlfGgj qgV38tBeyENbqiiWzZF9yTejskkyrxzLtMpxmuTGUso03nYzKHL4M9MrF6/7MSeHUIo/ p7InJ/33XcEnqQevMO58GoxS0VSktTU/91W4VlIvoATeSh7XEn2ZnrrU+LeANIWm6XFu wzeUKIvWh87A7XWMmFytgpdrHC3Ykwu5eyf1PO+FvTQM7WZ7cYkWsBzzQ/cnTxio4IOb mQSVWLLVI/usvYl823Fo+UtihBEf7rXKzZg/hcllpPjt8+dCwXEjl4HPPoIzgpYLPccI z+BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=P3yxvqwBrZeEUDSBFSBDrTS5Ki1QeDwTuvww/P9hbKc=; b=e2jN62bZnjK/D6kYxiHfQLTBipdlEwr9W9tKZtODJFaEApKFJbUBKvRKdkzKeZ/i/J JHHwuKOS9zDoczoM8WbyGmjA39gZBo8Oo1rWH2/hIG0HcWURbcJ6MzK/r/dqQp0J5ic0 57ZF+R4iOdmKqzTlz9wDeIq7i7c0MlFc9TbWWOnZXodoIlPoLZrVZQKOuOIuhIhSXZNa m6rDSlMN4WRd/m43Z0kHtxLB+iLTouqm9SaM2Bu88pTfqEWLuRy1QXi+uylpn1F0eptB ICFwXRi+kJRFGeT2DhtahnQ6QynJLdAHlUKkbOvW+TI54EYBnOXSgrL6sLDRalfeSOQx ixww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ajTggCPX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1si8000805pga.16.2018.04.06.21.33.11; Fri, 06 Apr 2018 21:34:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ajTggCPX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751004AbeDGE3E (ORCPT + 99 others); Sat, 7 Apr 2018 00:29:04 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:37894 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbeDGE3D (ORCPT ); Sat, 7 Apr 2018 00:29:03 -0400 Received: by mail-ua0-f195.google.com with SMTP id q38so1939313uad.5 for ; Fri, 06 Apr 2018 21:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=P3yxvqwBrZeEUDSBFSBDrTS5Ki1QeDwTuvww/P9hbKc=; b=ajTggCPX+hHqP5WOkEebgmyWk/fd4WuVmek0RA1b5ViqoBCZwIiywyg4rEeIKvrYwD YkKHjxgzjX4vpRmlcb+SODHSRLv++GDNL0isanQwbE4purBp5YvfTr4vFHwiCNmkltbv 20FIi+grI7shezTUYlRDBhMYefvgd8PHapjWQT9GNxZi3Q3cg3YOIYNIj3CLhTEfcPZH klNvYdQ/09m7FvN8tolNmUjN9mfGnpo+R+WtKMjs88DGit/In2d/fo/3QyZF2N1MmbVC mJvyX9SFY9aarH7iV2fi8/y3SiaPr+KJM31VfsG8/oZFUmFUxlKsjj8AUyRdk09F8HC0 bw5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=P3yxvqwBrZeEUDSBFSBDrTS5Ki1QeDwTuvww/P9hbKc=; b=mao4Wb3CWHnLLpPGi3ez8C71VDxpO77tLYJ54uKuZHjRublrA4Svx9Fmg7gmU9W8Tx XuzGrTuhBfohMFa/MUecAK3a9iQ68t8ogE61gH5FegzQpTNvmX6ZqvcMBEwxj2c3IXTs 5du0cQT5jkGmuhDLOIWZLVzoADOl8jFPmhIBsQRwVilOP9ko3Up6RQRjSuA7e0UhkV64 AAvYdu2pa3J/b0LY9kb/0CC+Opko+lktQLQdTaWsTgFLa03J8JhB5bL+9u6Ff7i4cQOY qRxeZpmVcCqsDrbZpLRZJ/8DvroXUYdhkCS3YIRggwRoFVxQHw4+SIGY+CcG4z0XeTcG HwJw== X-Gm-Message-State: AElRT7FbLDUevs3VKxI293t+dfoN09CbZNHrA597neqfrfLyCrG9VdjP +sPh4YkVF6V9+vsIxihPClYQFSYFAtj/goeNlUM= X-Received: by 10.176.32.176 with SMTP id y16mr18712674ual.151.1523075342317; Fri, 06 Apr 2018 21:29:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.18.211 with HTTP; Fri, 6 Apr 2018 21:28:21 -0700 (PDT) In-Reply-To: References: <1522990390-30804-1-git-send-email-chandan.vn@samsung.com> From: Chandan Vn Date: Sat, 7 Apr 2018 09:58:21 +0530 Message-ID: Subject: Re: [PATCH 1/1] arm64: To remove initrd reserved area entry from memblock To: Laura Abbott Cc: CHANDAN VN , catalin.marinas@arm.com, will.deacon@arm.com, takahiro.akashi@linaro.org, james.morse@arm.com, robin.murphy@arm.com, steve.capper@arm.com, kristina.martsenko@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, cpgs@samsung.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 6, 2018 at 9:47 PM, Laura Abbott wrote: > Does this have an impact on anything besides accounting > in memblock? Yes, the impact is only on accounting or debugging. We were trying to reduce the reserved memory by removing initrd reserved area. After disabling "keepinitrd", only way to check if it was removed or not was to check /sys/kernel/debug/memblock/reserved. We found the entry to be present irrespective of "keepinitrd" being enabled/disabled. I hope that with the fix others wont face similar issue. Also we did not find any such problem with ARM32 ARCHITECTURE. On Fri, Apr 6, 2018 at 9:47 PM, Laura Abbott wrote: > On 04/05/2018 09:53 PM, CHANDAN VN wrote: >> >> INITRD reserved area entry is not removed from memblock >> even though initrd reserved area is freed. After freeing >> the memory it is released from memblock. The same can be >> checked from /sys/kernel/debug/memblock/reserved. >> >> The patch makes sure that the initrd entry is removed from >> memblock when keepinitrd is not enabled. >> > > Does this have an impact on anything besides accounting > in memblock? > > >> Signed-off-by: CHANDAN VN >> --- >> arch/arm64/mm/init.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c >> index 9f3c47a..1b18b47 100644 >> --- a/arch/arm64/mm/init.c >> +++ b/arch/arm64/mm/init.c >> @@ -646,8 +646,10 @@ void free_initmem(void) >> void __init free_initrd_mem(unsigned long start, unsigned long end) >> { >> - if (!keep_initrd) >> + if (!keep_initrd) { >> free_reserved_area((void *)start, (void *)end, 0, >> "initrd"); >> + memblock_free(__virt_to_phys(start), end - start); >> + } >> } >> static int __init keepinitrd_setup(char *__unused) >> >