Received: by 10.192.165.148 with SMTP id m20csp3017702imm; Sun, 22 Apr 2018 22:05:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Avtakr5CpvwEj8DArhvL+HtLI+UUdpMMDcwJ4+UFQ2lCZIkqF4Rvzlnogi/lgUbE4VVIR X-Received: by 10.99.127.89 with SMTP id p25mr15909396pgn.440.1524459912397; Sun, 22 Apr 2018 22:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524459912; cv=none; d=google.com; s=arc-20160816; b=JTbA9lhMedwxrukWtbeh0YHhfnfmcd63QqRSvXX3kbaBzsUXWBwRllki3dQjc3IaFZ I7xwUUUfIbB7eoIEuu1n2Bnxiz+nOb2LgGrLnSDk8iO3/MYFnktx+6e3KkxI4GzBxXE2 DG6+YwTmRpOWxnTC+1TAqql78O5WqhpNAu1mo1dhVa+Vzu/C8QEAPF+XcHZObPa/zZew WeJxiu8JXm0mEalxvDbprB3ZrrtldazSFfGlNML0CuQMPER1JNR+jDKgSuwMRHEL7q0G IA4FvbcGDO0d/3Rg5ZAU8kSj9l4UPnqJsfb+M+Qh7hWycaqgm/GZ/9gBS3ecSZNpgF2S HZVg== 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=CWVzuI7XMmVFI5ByrxoPrUafzvKcikACQ1Q0zFvy6JM=; b=JPz9IxNnx8AxmNLotRfvBB3oAvuYMQbrbM4kz0dB7/BjTeDCQw43xyb+fAaRrU2bMQ sIsiS/GKyBOT/1nsDGrcClZ/YLvV2dzAsmW6KhW3sB2OPujjcAEMOVm1Yf9G05qL005+ 5pccDMKdr9oV51SeB7ShLzUQNKaZPfkVLUM3rm70ji3AgGq1U3tyKfFn0fwTAcn5cuzI lAl6vSUPP3KS0RgnZHKf4U3eIMIOS/w70usE3m8mc4fnYxAx6IzXFmdw8bv9WloN2I7T al4xjekhShHXPshA9K71JyfxhJWwd2e4BKGsFYwboUOzHvA8Pt8axOHMzxTK6Klpxmyg D3iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RUbfq2cb; 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 g7-v6si11366462plk.388.2018.04.22.22.04.28; Sun, 22 Apr 2018 22:05:12 -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=RUbfq2cb; 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 S1751404AbeDWFBd (ORCPT + 99 others); Mon, 23 Apr 2018 01:01:33 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:36697 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbeDWFBb (ORCPT ); Mon, 23 Apr 2018 01:01:31 -0400 Received: by mail-ua0-f193.google.com with SMTP id v4so9356339uaj.3 for ; Sun, 22 Apr 2018 22:01:30 -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=CWVzuI7XMmVFI5ByrxoPrUafzvKcikACQ1Q0zFvy6JM=; b=RUbfq2cbUN+vMcQbXTXLbajBcObZadbskJOuzRGYNSfJAkuEIwbJKwLntpbQFR8C4H DVAVGHNVR7WmVKC1t4gY4h0/rTNPhbwDk80SmFX65xv0HJL+LcD1Y6zI274vuC/EFAY+ WGiVTPA3GKj5mAJRw3ysGfpX4MGcuU6nuwqUUGAwJwu87EdDp//hqF6HfMsFVIiqlxkk DMOsVRhs7dXYRq7B0L0/6j2cuFrJu2LU97KL5VTV7zszCybP31TNbO51vvt4CK9QGG6Y eQPPq3IiTrELqildR8wdn/SE61Si5//pE9YRHOQneBmfX4kku4+bnPqv/2PDymO/se/Y f5Aw== 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=CWVzuI7XMmVFI5ByrxoPrUafzvKcikACQ1Q0zFvy6JM=; b=uGIlM0aglcxhCL0hyqVoNuMpqaolDGHk0Ri9p6uL129Y1BPvexMIoEVAZcjLdsfC0d BJ9KPQ6j12GlkhBs7u1U915a6cR3iKU2lWUhmc3ADjeOleYPga+X5L0JUybz9CFXNf6X bFlRrlp4ede4HNPDXyYdV8jKgExDgPcpINLvABVlJsfaws6HDHAXMhuqwLciWnK1SBgP DZZGvJj+rlXC4XWkLi0OGPrCR1Tt7NgmnToCNyArm/nU4RnzU5zzQiljEE3+R2er1D9X APO8yq6d1Mw/gXZsEfmMH56TDM0f9IN4X30S760zEHbX56PqfkWeh0kfr94FeWrdWXhi LlAA== X-Gm-Message-State: ALQs6tBFCDcS34WQ4szS3mhVYa7T1E2jfIgKtzGH7iLO4LHUvAy50eyK uQpjsWooHjKMgTC6+oY7HccNVY+pX1llOD3afrI= X-Received: by 10.176.89.68 with SMTP id o4mr10520053uad.23.1524459690293; Sun, 22 Apr 2018 22:01:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.28.90 with HTTP; Sun, 22 Apr 2018 22:00:49 -0700 (PDT) In-Reply-To: References: <1522990390-30804-1-git-send-email-chandan.vn@samsung.com> From: Chandan Vn Date: Mon, 23 Apr 2018 10:30:49 +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 , 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 Hi, May I know when this patch would be taken for merging? On Sat, Apr 7, 2018 at 9:58 AM, Chandan Vn wrote: > 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) >>> >>