Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4504276img; Tue, 26 Mar 2019 10:38:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdY9tl3bVzd6Chu5Ew9yLhpFMb/7JCOUNJTgxdMy3RmitMbQ/3L4ujK5K3S6GpFWvKQIZF X-Received: by 2002:a17:902:b484:: with SMTP id y4mr25005074plr.88.1553621886603; Tue, 26 Mar 2019 10:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553621886; cv=none; d=google.com; s=arc-20160816; b=wjtLhkGQ/eDCNugjnODRnXjLi+aBOCqLam16gavOWx9eCjkhIpY7uzg48C2oqzUmW1 /tOniKG/0nonXw1iT44T5B9vtqnVtYejF5Y/hoT5FLCETHPW0VDWOnRJZXFThjqRgxDv tQ5kmMozZQY27FVLNAZLd0Oo6dfCjMrCT5vs1sE0SGzdUNEYdq1SB6QI0BsnfSVQyXSp R2W5adD9xnhOtzUJmMc3CN8Us8DWJcaAI0o2UBDynNy9swgbSM/x9HwDGfaBUxH75S46 ZV0Qy2iqSbLCtP2+0zszvovcx1yaE/sZDCM9CpQLHzH2gOPrkUftws4Sw4WvQOdaKMTR 9d/g== 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; bh=oWrQ7ys58mRxOV7PDz1BImuwauQBpvws+CRiT3QhXm8=; b=DHLfXLpO8fjKMnaBI3sl004W35EZUIQMpgiJU+l3AukKy/ZAedKlJf7GKahHYCSFqQ toXevErx1n7RFlLFPKf7wwOPClymAFuxMFXRlJrJtN0c3sWYLilTdljCkmh2eBBMQwhB FTmNA9ZD00sdYCj7AbVz7/RdATOAIkAWNwrjFbRX+wsCpPelRAMUhx/QahpzZU7O5G/j EO/BjmxPDqORTcQzMeEfCdNaa1TaN4amcdEoQbw0yMoiHwmDnsD9Yhv9smA4N7I6DM6V Iuou33w+92eMFO9bSqewRXqcKJEX1S2/EhiSRBbeSabRufR5HHIExjW+1FHebzmXIj6I wm1Q== ARC-Authentication-Results: i=1; mx.google.com; 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 42si18075706pld.383.2019.03.26.10.37.51; Tue, 26 Mar 2019 10:38:06 -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; 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 S1732076AbfCZRhJ (ORCPT + 99 others); Tue, 26 Mar 2019 13:37:09 -0400 Received: from gecko.sbs.de ([194.138.37.40]:36585 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbfCZRhI (ORCPT ); Tue, 26 Mar 2019 13:37:08 -0400 X-Greylist: delayed 928 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 Mar 2019 13:37:08 EDT Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id x2QHLN8r032214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 26 Mar 2019 18:21:23 +0100 Received: from [167.87.1.199] ([167.87.1.199]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x2QHLLwu030986; Tue, 26 Mar 2019 18:21:22 +0100 Subject: Re: [PATCH 3/4] scripts/gdb: Add rb tree iterating utilities To: Stephen Boyd , Andrew Morton , Kieran Bingham Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Douglas Anderson , Nikolay Borisov , Jackie Liu References: <20190325184522.260535-1-swboyd@chromium.org> <20190325184522.260535-4-swboyd@chromium.org> <227f1a1f-d8dd-72f4-4eb9-43bba714d52a@kernel.org> <155361993610.20095.762425616683725063@swboyd.mtv.corp.google.com> From: Jan Kiszka Message-ID: Date: Tue, 26 Mar 2019 18:21:21 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: <155361993610.20095.762425616683725063@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 26.03.19 18:05, Stephen Boyd wrote: > Quoting Kieran Bingham (2019-03-26 01:52:10) >> Hi Stephen, >> >> On 25/03/2019 18:45, Stephen Boyd wrote: >>> Implement gdb functions for rb_first(), rb_last(), rb_next(), and >>> rb_prev(). These can be useful to iterate through the kernel's red-black >>> trees. >> >> I definitely approve of getting data-structure helpers into scripts/gdb, >> as it will greatly assist debug options but my last attempt to do this >> was with the radix-tree which I had to give up on as the internals were >> changing rapidly and caused continuous breakage to the helpers. > > Thanks for the background on radix-tree. I haven't looked at that yet, > but I suppose I'll want to have that too at some point. > >> >> Do you foresee any similar issue here? Or is the corresponding RB code >> in the kernel fairly 'stable'? >> >> >> Please could we make sure whomever maintains the RBTree code is aware of >> the python implementation? >> >> That said, MAINTAINERS doesn't actually seem to list any ownership over >> the rb-tree code, and get_maintainers.pl [0] seems to be pointing at >> Andrew as the probable route in for that code so perhaps that's already >> in place :D > > I don't think that the rb tree implementation is going to change. It > feels similar to the list API. I suppose this problem of keeping things > in sync is a more general problem than just data-structures changing. > The only solution I can offer is to have more testing and usage of these > scripts. Unless gdb can "simulate" or run arbitrary code for us then I > think we're stuck reimplementing kernel internal code in gdb scripts so > that we can get debug info out. > Could we possibly leave some link in form of comment in the related headers or implementations? Won't magically solve the problem but at least increase changes that author actually read them when they start changing the C implementations. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux