Received: by 10.223.176.46 with SMTP id f43csp1742503wra; Wed, 24 Jan 2018 22:48:39 -0800 (PST) X-Google-Smtp-Source: AH8x2270FvFidjzguCF59dA5D6IJ/QnDrl2wYEH13AX2L7wwmkX0MGr8VfqBv5sJyeAANfl+fYly X-Received: by 2002:a17:902:590e:: with SMTP id o14-v6mr10081525pli.78.1516862919462; Wed, 24 Jan 2018 22:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516862919; cv=none; d=google.com; s=arc-20160816; b=aK79jMN5Cjd6S3AAsB+bLixti975CyuJFDIfK5D7lZrXnIm5ytLQ/BCCZq9E4CanDT HkfjMol2CeN/yGYCsJszVOUIW/xY3ciM0/yQ2votIho59SRH1ZAZUfyKHvDdsbAmqAdX 24kAsIzMNdsi4suml3F61mWIBYBG+OrFdpUgP6atvQN5pLIfp6WWigvBMSbCN2t/X/Kj 2WDLcGW8V3kZ+Yh6BE9PENM8VyD+jbYbTF0uoEzNVMSb3wL2xpev9W1eAYuw5rkZgu8S jRA3As0xNDrX3ro9EKYnDVUpUj26cGP+g5MCQbO2gL8Q2N+SgfFeWd2XPC1HRlfEEuia v4HQ== 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 :arc-authentication-results; bh=09MJ3iZmlb1yRKT5qLghrGfXlQbQip/pH7Z2s/JM7F0=; b=pPBJXcOAZmFCkfJO/ZnW2WlVwIE1JQDTNh71U+Z9E6K5RWVsBNRFgBmRnvl34UMCSN sHOqtMKg7WwgHLHjEJAFblymp89vCgXcEsvCm8ptkG5kI6Q+fXzErm0+Lvoylp10aRci d7pwwqH+WhN3GKYmw2bf6wmNz4O44PpOyXKiHZZ6D8JFXe3j2EumM3XmA0pv1j+YxUtO hO4yhCDq0vLSL4O0iYl2JvEEnq5FGvuXr9dMhgTUdCkHlhLDMYbMdt8DVuaBap0lMjX5 j9bGXmxA2Ah9pHfzSA/1pDvc26El1mOywRnBfGjCpziY9Qy0v4zUfV32gtNBAdrfLUDm koFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r7jv/aN9; 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=NONE 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 x80si1177837pgx.249.2018.01.24.22.48.24; Wed, 24 Jan 2018 22:48:39 -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=@gmail.com header.s=20161025 header.b=r7jv/aN9; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751214AbeAYGsA (ORCPT + 99 others); Thu, 25 Jan 2018 01:48:00 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:34399 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbeAYGr6 (ORCPT ); Thu, 25 Jan 2018 01:47:58 -0500 Received: by mail-io0-f195.google.com with SMTP id c17so7549350iod.1; Wed, 24 Jan 2018 22:47:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=09MJ3iZmlb1yRKT5qLghrGfXlQbQip/pH7Z2s/JM7F0=; b=r7jv/aN9VhEA+UOjMzmzqy6VIJBVAUgQ53arsIue1fKjsJjH9udVdDPwDEB6oS/zpG mIv0DJRVfysKDvTxfEK847LqFBTBDm/0D2XAOFeZgbh3Mq0iYkXO7CqqULFzyyeNSoo8 KEH1yjKR0RIPIyAW9TPfUg+46m3v67H5ainL5pdxTqcjSixxD4n0Iqhc2MJZbTMxyvEa YG5B9IfGNZ8EsTScVeP5C6JHJZU/WV7Y4U9DDrgXTnkS3H7sH6++1DHVy4gL1mMwbpjB ix6ZDNo/u8AE4vUYMv5zsXmATBxX9iXzV3R6Fwb6oz9HDD/vvAV9Lk5UMlDuIknJe/5I KWtw== 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=09MJ3iZmlb1yRKT5qLghrGfXlQbQip/pH7Z2s/JM7F0=; b=dfv7b/D52TVB15twiiUzrhPvGfgQvJdvEPMThGeD5n/MUA5eQhc84EOmaVKg6j9PAP RYwifdzl5FN6CaxwWnc5zbRH+WTLKm/VRsUVlSRJtarpxXgTCrIybn653LCkHkuuY9Qv cjpLZT6wbU/bvwSdl2Fa9EEVtF0oMm7PtUb8gmPQEv3Bt2hVBPns85e8rXG58cC2UF1d 2WJC1prWQEfpm2NwE/fWqVhGbclkUmvc6pf2/3aZya7RnC1AT9+Prt3WTCZmwNwWM6Ps 2yOxq+K33GHqB7OEmN0cr0BLgL0KSp462gqZGfioZloyvyXUiP45MMkwooiPZzMMj9K5 YMEg== X-Gm-Message-State: AKwxytfVwkXEwdUWQE7gEMPScr6zSbaNYGmMRUFzqDLwqtahzy80gBW+ zQWBA/6cHUjItdD0UoLPP+Y= X-Received: by 10.107.1.3 with SMTP id 3mr11785331iob.221.1516862877790; Wed, 24 Jan 2018 22:47:57 -0800 (PST) Received: from [192.168.1.70] (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id 82sm1286656iod.54.2018.01.24.22.47.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 22:47:57 -0800 (PST) Subject: Re: [RFC PATCH v2 0/1] of: easier debugging for node life cycle issues To: Wolfram Sang Cc: Wolfram Sang , devicetree@vger.kernel.org, Tyrel Datwyler , Geert Uytterhoeven , linux-renesas-soc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Rob Herring , Steven Rostedt , linux-kernel@vger.kernel.org References: <20180121143117.19805-1-wsa+renesas@sang-engineering.com> <20180122114948.mm5mg6zqw3hmjj4o@katana> From: Frank Rowand Message-ID: <11cf8fac-d2fe-ecdb-546f-de3c3b42a637@gmail.com> Date: Wed, 24 Jan 2018 22:47:55 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180122114948.mm5mg6zqw3hmjj4o@katana> 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 01/22/18 03:49, Wolfram Sang wrote: > Hi Frank, > >> Please go back and read the thread for version 1. Simply resubmitting a >> forward port is ignoring that whole conversation. >> >> There is a lot of good info in that thread. I certainly learned stuff in it. > > Yes, I did that and learned stuff, too. My summary of the discussion was: > > - you mentioned some drawbacks you saw (like the mixture of trace output > and printk output)> - most of them look like addressed to me? (e.g. Steven showed a way to redirect > printk to trace > - you posted your version (which was, however, marked as "not user friendly" > even by yourself) Not exactly a fair quoting. There were two things I said: "Here is a patch that I have used. It is not as user friendly in terms of human readable stack traces (though a very small user space program should be able to fix that)." So easy to fix using existing userspace programs to convert kernel addresses to symbols. "FIXME: Currently using pr_err() so I don't need to set loglevel on boot. So obviously not a user friendly tool!!! The process is: - apply patch - configure, build, boot kernel - analyze data - remove patch" So not friendly because it uses pr_err() instead of pr_debug(). In a reply I said if I submitted my patches I would change it to use pr_debug() instead. So not an issue. And not user friendly because it requires patching the kernel. Again a NOP if I submitted my patch, because the patch would already be in the kernel. But whatever, let's ignore that - a poor quoting is not a reason to reject this version of the patch. > - The discussion stalled over having two approaches Then you should have stated such when you resubmitted. > So, I thought reposting would be a good way of finding out if your > concerns were addressed in the discussion or not. If I overlooked Then you should have stated that there were concerns raised in the discussion and asked me if my concerns were addressed. > something, I am sorry for that. Still, my intention is to continue the > discussion, not to ignore it. Because as it stands, we don't have such a > debugging mechanism in place currently, and with people working with DT > overlays, I'd think it would be nice to have. > > Kind regards, > > Wolfram > Rob suggested: > > @@ -25,8 +28,10 @@ > */ > struct device_node *of_node_get(struct device_node *node) > { > - if (node) > + if (node) { > kobject_get(&node->kobj); > + trace_of_node_get(refcount_read(&node->kobj.kref.refcount), node->full_name); Seems like there should be a kobj wrapper to read the refcount. As far as I noticed, that was never addressed. I don't know the answer, but the question was asked. And if there is no such function, then there is at least kref_read(), which would improve the code a little bit. I'll reply to the patch 0/1 and patch 1/1 emails with review comments. -Frank