From patchwork Mon Nov 16 04:44:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Faiyaz Mohammed X-Patchwork-Id: 11907359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F21E5697 for ; Mon, 16 Nov 2020 04:44:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CF24222C4 for ; Mon, 16 Nov 2020 04:44:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="wilWo+hI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CF24222C4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5B1956B0036; Sun, 15 Nov 2020 23:44:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5628A6B005D; Sun, 15 Nov 2020 23:44:33 -0500 (EST) 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 450356B0068; Sun, 15 Nov 2020 23:44:33 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 1952E6B0036 for ; Sun, 15 Nov 2020 23:44:33 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id ACFC4180AD81D for ; Mon, 16 Nov 2020 04:44:32 +0000 (UTC) X-FDA: 77489040384.06.crate24_05130a927326 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 902C6104E8D73 for ; Mon, 16 Nov 2020 04:44:32 +0000 (UTC) X-Spam-Summary: 1,0,0,98597034f5f060dd,d41d8cd98f00b204,bounce+d06763.be9e4a-linux-mm=kvack.org@mg.codeaurora.org,,RULES_HIT:41:355:379:541:800:960:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2393:2540:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3871:3872:4321:5007:6119:6261:6653:7903:8603:10004:11026:11218:11232:11473:11658:11914:12043:12219:12297:12438:12517:12519:12555:12986:13069:13311:13357:14181:14384:14394:14721:21080:21451:21627:21972:21990:22119:30012:30054:30070:30074,0,RBL:69.72.42.4:@mg.codeaurora.org:.lbl8.mailshell.net-66.201.201.201 62.14.0.100;04y8h16h3te4f9m38ur84zdp16e3oyczyrbind4e7rzqi1jmuzrej53qyzdrhw7.og5kcuuhx6hwf6x97cp8i9i34qiaqt1r5ret1dzawo9sngrmhidrjoqatm8hzzt.n-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:70,LUA_SUMMARY:none X-HE-Tag: crate24_05130a927326 X-Filterd-Recvd-Size: 3949 Received: from m42-4.mailgun.net (m42-4.mailgun.net [69.72.42.4]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Nov 2020 04:44:30 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605501872; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=8/+YQew3Txf0Cwu8tAYiwK8NJb8X+FRmfAI2FPy3l6E=; b=wilWo+hIQiFstsAp5TehyGqP/B9tzqktzlr71euOrgWK4aI/Jw81YWos+cxN0rD4RLopoiPN nPtPogdzC5u03OTDxFWemgdyMzB0rSy06D0ZrnurGTVH7yp9tx1HyAIufdDuh6EGg5SuVpzK i50r2wGd6PoWG0MBNEIGEXPd+OM= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n08.prod.us-east-1.postgun.com with SMTP id 5fb203a3f2d9c8cbca55632b (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 16 Nov 2020 04:44:19 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 97816C43461; Mon, 16 Nov 2020 04:44:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from faiyazm-linux.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: faiyazm) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0321AC433C6; Mon, 16 Nov 2020 04:44:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0321AC433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=faiyazm@codeaurora.org From: Faiyaz Mohammed To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rppt@kernel.org Cc: vinmenon@codeaurora.org, Faiyaz Mohammed Subject: [PATCH v2] mm: memblock: add more debug logs Date: Mon, 16 Nov 2020 10:14:04 +0530 Message-Id: <1605501844-22390-1-git-send-email-faiyazm@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000111, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: It is useful to know the exact caller of memblock_phys_alloc_range() to track early memory reservations during development. Currently, when memblock debugging is enabled, the allocations done with memblock_phys_alloc_range() are only reported at memblock_reserve(): [ 0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188 Add memblock_dbg() to memblock_phys_alloc_range() to get details about its usage. For example: [ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 early_pgtable_alloc+0x24/0x178 [ 0.000000] memblock_reserve: [0x000000023fc6b000-0x000000023fc6bfff] memblock_alloc_range_nid+0xc0/0x188 Signed-off-by: Faiyaz Mohammed --- mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/memblock.c b/mm/memblock.c index 049df41..f65af9f 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -1419,6 +1419,9 @@ phys_addr_t __init memblock_phys_alloc_range(phys_addr_t size, phys_addr_t start, phys_addr_t end) { + memblock_dbg("%s: %llu bytes align=0x%llx from=%pa max_addr=%pa %pS\n", + __func__, (u64)size, (u64)align, &start, &end, + (void *)_RET_IP_); return memblock_alloc_range_nid(size, align, start, end, NUMA_NO_NODE, false); }