Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6513722ybc; Thu, 28 Nov 2019 00:23:14 -0800 (PST) X-Google-Smtp-Source: APXvYqz6saofVuXmV/BHGQYBym0XW35wof2nmBIqgoIu16r+QGtzVEa45tsEp8ZnGOcTcvwbD1fS X-Received: by 2002:a50:a52e:: with SMTP id y43mr35443779edb.147.1574929394627; Thu, 28 Nov 2019 00:23:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574929394; cv=none; d=google.com; s=arc-20160816; b=yOaqJm6Ut2dDDXmde+IXBhHfvffVIlOD8fedzYRlKA3vLy8VkYt2cL9qt4chDH/qm+ ZR+56hoQwFNkKbLuUV/3toB5PfwOP3AevOIFugNoIXv7qo6ydJAm5b9j5SBRxsaFV0Xc +mlz2fCj1J3rBOJ/fOhchhVe+eyHqEJxyU5IC/qfWY2xZEq2BJapE9j6/K23pMCjy33E +NqQYvL35vNGRFmBiTF/71G8YXhSsIrXxR6HXeX0ouXgVQrOI/jl+46lmB7Wa+SRs0kU BXPgRaZn0pE3N2e9qXBMPK8LdTSac2wrIH5W4+eI10FOAFy7blX7H2zHnhpGT59/1BQS sPiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2ihFBr3cTZF5UbIGSrYneP3g3wP0dgTzFZ3UMdlINS8=; b=l4noKd86oYR3NYjvYY8DECAc/CW9oymRcYR0TV5Q70OaWsYpIsCz7fu0mlaI4UVxgI wx5MNzsaQA17z52rUnmvwEU910KoJF9HFLpQLjVE1LtoqCNZMdkX6y3JVAM0PR4OtXq1 RZX6/j6+ds/HQ7LQ/OZTXoBEFdl9dByv73Mq07LsDkbev2b65RRXpvMiyB/MfvkqM4oy RaGeLlNtwaRISPyWwvcKng/fZk0xPTLUS1Q4MWmkM1HJ742ZOVzSkZ/2zth+MphelI+3 7PycruG25mvcUK+B745t8J7UPv4fwrlxYvlW18r29sM+UC7bTsiAF1VVq6Ox4aqCvOGv K/Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=J5jjpQUv; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bo7si11284067ejb.15.2019.11.28.00.22.51; Thu, 28 Nov 2019 00:23:14 -0800 (PST) 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=@rasmusvillemoes.dk header.s=google header.b=J5jjpQUv; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727442AbfK1IVd (ORCPT + 99 others); Thu, 28 Nov 2019 03:21:33 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:43226 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727042AbfK1IVc (ORCPT ); Thu, 28 Nov 2019 03:21:32 -0500 Received: by mail-lj1-f195.google.com with SMTP id a13so4310265ljm.10 for ; Thu, 28 Nov 2019 00:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2ihFBr3cTZF5UbIGSrYneP3g3wP0dgTzFZ3UMdlINS8=; b=J5jjpQUv5v2GF6DCYcBiew6lGQkc4ZwvwIu/adjixp+GYregx+1kd88yD6wTfr4JDS 1K9Yo9uTNRwhLz8fkQ46u8c8uvYkHDhZnJuX3RAxwormPTkV2qghhQBujmD39++SZaJ5 tkwxsTjduuxNN8T1OpT9MCwU/3rTKOGzUpF3U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2ihFBr3cTZF5UbIGSrYneP3g3wP0dgTzFZ3UMdlINS8=; b=oLs0XvDzztM1kbRMYEC4LanyC13hpNw/GafBOFvj/g/qY64d4nHZxtjomh0YRwdISw F/B7dPBQWDaN77AIjO2FxLFVH/HLJX3xKOIKwzCx5hfDtb+m0ycts5D3OR2S27Y0467e sgU9l/1kc59ih4X9HVT39cQ1DfqxTs6470o4Q6f5QjrF2zs4ZVpSHJe91PeJM9m7b7D3 1yY11whYfLGnhlPAqvB8ocv4zUmIRpiM3NsYHACRQGcmGseEEQF5aDkdBL2AmI/EmEtH ejdVkY0grPm3kRAxebt/Y5QjMnxaNGUCqCoNBL9vHm4GuF6Hfi7R63Zs8qxyYOucE0nW 4jMg== X-Gm-Message-State: APjAAAUh63dVzEMoC4SyONmB+wrEb0hlsyPdm8v2UediJmN4sRxVzMcZ 8IZ32AvD+vfTEBTqsyy+Aqci1w== X-Received: by 2002:a2e:884c:: with SMTP id z12mr32823718ljj.41.1574929290783; Thu, 28 Nov 2019 00:21:30 -0800 (PST) Received: from [172.16.11.28] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id k10sm8096512lfo.76.2019.11.28.00.21.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Nov 2019 00:21:30 -0800 (PST) Subject: Re: [PATCH 05/16] dyndbg: fix overcounting of ram used by dyndbg To: Jim Cromie , jbaron@akamai.com, linux-kernel@vger.kernel.org Cc: greg@kroah.com, Andrew Morton References: <20191127175055.1351403-1-jim.cromie@gmail.com> From: Rasmus Villemoes Message-ID: <0f373a8c-8301-41d9-e042-cfe0cef4bd25@rasmusvillemoes.dk> Date: Thu, 28 Nov 2019 09:21:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191127175055.1351403-1-jim.cromie@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/11/2019 18.50, Jim Cromie wrote: > during dyndbg init, verbose logging prints its ram overhead. It > counted strlens of struct _ddebug's 4 string members, in all callsite > entries, which would be approximately correct if each had been > mallocd. But they are pointers into shared .rodata; for example, all > 10 kobject callsites have identical filename, module values. > > Its best not to count that memory at all, since we cannot know they > were linked in because of CONFIG_DYNAMIC_DEBUG=y, and we want to > report a number that reflects what ram is saved by deconfiguring it. That, and we avoid 1000s of (mostly cache-cold) strlen() calls during boot. Acked-by: Rasmus Villemoes I'll see if I can find time to review the other patches, then I think you need to resend with Andrew on the cc-list (added here). I think he's the one routing lib/dynamic_debug.c patches. Rasmus