From patchwork Tue May 8 10:42:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minchan Kim X-Patchwork-Id: 10385913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D809760353 for ; Tue, 8 May 2018 10:42:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7F392891D for ; Tue, 8 May 2018 10:42:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC6AC28CFB; Tue, 8 May 2018 10:42:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59B1F2891D for ; Tue, 8 May 2018 10:42:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E2506B0266; Tue, 8 May 2018 06:42:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0916F6B026A; Tue, 8 May 2018 06:42:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE9436B026B; Tue, 8 May 2018 06:42:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id AD4426B0266 for ; Tue, 8 May 2018 06:42:32 -0400 (EDT) Received: by mail-pf0-f199.google.com with SMTP id m68so24280637pfm.20 for ; Tue, 08 May 2018 03:42:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:sender:from:to:cc:subject:date :message-id; bh=RkUZjnzmoH3ZUV3J0U1sI6UDDle5eVj7Ar5yUV/9vvE=; b=UJKSLQRnx6ad6ENK7JOGgtX7DrS3e74KTRU27VjPEUaXNk0JzFYE6Urx/f5a9RSoCm VNK8FQ+tUJSLCFnde48US0Q274kP3aAZPxNIaCmChwnihwo5PAfR0gzcHUadSlat5sdq WK5vJpynqY3OUhNnb2fMs2u6MJ1iIYhklnHHcjpxZ6moFgGtJRuBaP2SUG3fueOtRcNx zguYvkyF4AzU2dSbPFYEMEtmIz6qmDyDXrJM7Nw/kCdCgqR29ozc+WZH7QIISOklovzz Sz/IU6Os6vejqkGXxNrVesQkM9i6hSL1ABBUEmiOOYaYtCiqpft73rXVtseYU7c4Q/Fd jZyg== X-Gm-Message-State: ALQs6tA89n6ws3+QRpvO84queDs/Lt88ZEvLrw+LvcTQ89aIKDCJG7g9 WNGJeK/TgktmHNJNN/pVSxd9tZ6gf9YmRMDcu3ENJ/E7XGJl5ln2nCDZfwpxSalDm2PtHvfjGBd LBJ/FQ7kxOAmxanFdYr9xW/RCwMrmoIUs4MdvUvsFAyLu27UZdNjwGpUs/hZPi6xKgWxMEKxj8S wlJgAfzGjoFRpoisxKBneofWgEN1jsufDy9KXUmcWfzpZeqdzJknDSh4WMtwZkEl3Fq87d0aJFd 07JPee+78u/B+cBKdlTYdj5KCOVDwvSpp2s0R35RFqxJkK3VHE+IxQgDaJW7DEzDnn4bN530Dri T9NYQs83HyajrqPZKZo52MZIBqdeR47k0c2GQXW3UTFdr7TfOT4Lx+/zJ0OPUu3/xOHHrmkqgg= = X-Received: by 2002:a17:902:bc4c:: with SMTP id t12-v6mr16327044plz.331.1525776152369; Tue, 08 May 2018 03:42:32 -0700 (PDT) X-Received: by 2002:a17:902:bc4c:: with SMTP id t12-v6mr16327007plz.331.1525776151543; Tue, 08 May 2018 03:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525776151; cv=none; d=google.com; s=arc-20160816; b=WVcfFaiPeunmuQzIwi6CHZQUCG8DM9p9vZH3ZYkwXXDqS0Yx3hU9ZClH+5VJD2muMg Anm+5AePnJ58GJhFGZEzUhGBd3qJ45OHUjJvRr9ZnKruuf1N6xeFdVUCS6jdkMEvzPiC 1y7GtSnsVjszliY1mO3YgwnaIZQuQ4wwRzXRTo37IOmzZAxrUKJZFClhVcQuoWwAd8w4 IZHJ+qFt22CoDRabqFL2KFtWxCy+JStWQY/EEkSeX2z/zXBwK1lQAVh5KBltC773TjvR 5WvJIclcWIYRlGcHjDTMAb5ejWd1C08rJlj5ZjqpNMzgIsege1sEO3FmAop1DztwxNFS vcBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:sender:dkim-signature :arc-authentication-results; bh=RkUZjnzmoH3ZUV3J0U1sI6UDDle5eVj7Ar5yUV/9vvE=; b=XV/V5GzqxIr2DG2VXLyknejDxaPK2EjYqexLtzl+L6sFqUFD158kqTiCEe+wIGIuXq jqNBz1Vx11APcfZWpuJlrUeyxczHosAK2lLQ5xKUHYeTjCS26fTzEyMsIuIdvRoR0zh2 8Qy7OEeZ+wfGBSD/eXwYizGCqYgEoqBX3YzRGDgEXK887rkugbJTYV0uVUexn3JkG9fF 1B5ahDSaDNKdHL5fGtIFVYMRdlDH3R04IKstsP+sLY/+clrMqHgagVrVuHeR+mOfOqz7 rN5W2DrepXobEh53NSW/8QReRjMQNr4dPwWjS4G/jhoPK8AxdOF4tKk36ro7giBIqyXl peSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=doxckmxU; spf=pass (google.com: domain of minchan.kim@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o15-v6sor4689669pgq.141.2018.05.08.03.42.31 for (Google Transport Security); Tue, 08 May 2018 03:42:31 -0700 (PDT) Received-SPF: pass (google.com: domain of minchan.kim@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=doxckmxU; spf=pass (google.com: domain of minchan.kim@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=minchan.kim@gmail.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=RkUZjnzmoH3ZUV3J0U1sI6UDDle5eVj7Ar5yUV/9vvE=; b=doxckmxUNAP4nfiVqxGPQnRl7GlaxzpC39xbcHSYE9GiXKgg34B5SZvMrbzhva/8is f8BB9zprlUqXun+G49Gn9RZWxlqad0MeQgF9DJ4h/xZc+Sgf2YTOQjPSNOffUjVknsqd 7uM5MUcx57+J0BW3QxOpWhRAIY/Mkzc4mqWZRr2GqJE5sw6L/9q1dWvguqW3wvQ/TEvJ rlgPJhfio+Bb6Gruv2V055GvD9cgbkWNsZB5uq93k3/jH76RjZeR4i6zfxUWnSO6wSrW EQRF3JYhoF1NxzOZhKeLAq9s1PE1tPmiRFZ5m1O4zKASqd9Kt/aXNnj8bd9oZEuzgPxn oSYw== X-Google-Smtp-Source: AB8JxZobKhb0Orb83wvXOEIjB3nhG4r/H9uCweHCBtah4dTnMJL4Qk+mH27m3Ynn1AgQKrsgPFjbPQ== X-Received: by 2002:a65:4d07:: with SMTP id i7-v6mr18444249pgt.149.1525776151155; Tue, 08 May 2018 03:42:31 -0700 (PDT) Received: from bbox-2.seo.corp.google.com ([2401:fa00:d:10:affa:813f:5380:6613]) by smtp.gmail.com with ESMTPSA id w184-v6sm37075679pgb.20.2018.05.08.03.42.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 03:42:29 -0700 (PDT) From: Minchan Kim To: Andrew Morton Cc: Michal Hocko , LKML , linux-mm , Minchan Kim Subject: [PATCH] mm/memblock: print memblock_remove Date: Tue, 8 May 2018 19:42:23 +0900 Message-Id: <20180508104223.8028-1-minchan@kernel.org> X-Mailer: git-send-email 2.17.0.441.gb46fe60e1d-goog X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP memblock_remove report is useful to see why MemTotal of /proc/meminfo between two kernels makes difference. Signed-off-by: Minchan Kim Acked-by: Michal Hocko --- mm/memblock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index 5228f594b13c..03d48d8835ba 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -697,6 +697,11 @@ static int __init_memblock memblock_remove_range(struct memblock_type *type, int __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size) { + phys_addr_t end = base + size - 1; + + memblock_dbg("memblock_remove: [%pa-%pa] %pS\n", + &base, &end, (void *)_RET_IP_); + return memblock_remove_range(&memblock.memory, base, size); }