public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Kees Cook <keescook@chromium.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Tony Luck <tony.luck@intel.com>, Yonghong Song <yhs@fb.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v3 0/7] get_abi.pl: Check for missing symbols at the ABI specs
Date: Tue, 21 Sep 2021 18:52:42 +0200	[thread overview]
Message-ID: <YUoN2m/OYHVLPrSl@kroah.com> (raw)
In-Reply-To: <cover.1631957565.git.mchehab+huawei@kernel.org>

On Sat, Sep 18, 2021 at 11:52:10AM +0200, Mauro Carvalho Chehab wrote:
> Hi Greg,
> 
> Add a new feature at get_abi.pl to optionally check for existing symbols
> under /sys that won't match a "What:" inside Documentation/ABI.
> 
> Such feature is very useful to detect missing documentation for ABI.
> 
> This series brings a major speedup, plus it fixes a few border cases when
> matching regexes that end with a ".*" or \d+.
> 
> patch 1 changes get_abi.pl logic to handle multiple What: lines, in
> order to make the script more robust;
> 
> patch 2 adds the basic logic. It runs really quicky (up to 2
> seconds), but it doesn't use sysfs softlinks.
> 
> Patch 3 adds support for parsing softlinks. It makes the script a
> lot slower, making it take a couple of minutes to process the entire
> sysfs files. It could be optimized in the future by using a graph,
> but, for now, let's keep it simple.
> 
> Patch 4 adds an optional parameter to allow filtering the results
> using a regex given by the user. When this parameter is used
> (which should be the normal usecase), it will only try to find softlinks
> if the sysfs node matches a regex.
> 
> Patch 5 improves the report by avoiding it to ignore What: that
> ends with a wildcard.
> 
> Patch 6 is a minor speedup.  On a Dell Precision 5820, after patch 6, 
> results are:
> 
> 	$ time ./scripts/get_abi.pl undefined |sort >undefined && cat undefined| perl -ne 'print "$1\n" if (m#.*/(\S+) not found#)'|sort|uniq -c|sort -nr >undefined_symbols; wc -l undefined; wc -l undefined_symbols
> 
> 	real	2m35.563s
> 	user	2m34.346s
> 	sys	0m1.220s
> 	7595 undefined
> 	896 undefined_symbols
> 
> Patch 7 makes a *huge* speedup: it basically switches a linear O(n^3)
> search for links by a logic which handle symlinks using BFS. It
> also addresses a border case that was making 'msi-irqs/\d+' regex to
> be misparsed. 
> 
> After patch 7, it is 11 times faster:
> 
> 	$ time ./scripts/get_abi.pl undefined |sort >undefined && cat undefined| perl -ne 'print "$1\n" if (m#.*/(\S+) not found#)'|sort|uniq -c|sort -nr >undefined_symbols; wc -l undefined; wc -l undefined_symbols
> 
> 	real	0m14.137s
> 	user	0m12.795s
> 	sys	0m1.348s
> 	7030 undefined
> 	794 undefined_symbols
> 
> (the difference on the number of undefined symbols are due to the fix for
> it to properly handle 'msi-irqs/\d+' regex)
> 
> -
> 
> While this series is independent from Documentation/ABI changes, it
> works best when applied from this tree, which also contain ABI fixes
> and a couple of additions of frequent missed symbols on my machine:
> 
>     https://git.kernel.org/pub/scm/linux/kernel/git/mchehab/devel.git/log/?h=get_undefined_abi_v3

I've taken all of these, but get_abi.pl seems to be stuck in an endless
loop or something.  I gave up and stopped it after 14 minutes.  It had
stopped printing out anything after finding all of the pci attributes
that are not documented :)

Anything I can do to help debug this?

thanks,

greg k-h

  parent reply	other threads:[~2021-09-21 16:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-18  9:52 [PATCH v3 0/7] get_abi.pl: Check for missing symbols at the ABI specs Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 1/7] scripts: get_abi.pl: Better handle multiple What parameters Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 2/7] scripts: get_abi.pl: Check for missing symbols at the ABI specs Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 3/7] scripts: get_abi.pl: detect softlinks Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 4/7] scripts: get_abi.pl: add an option to filter undefined results Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 5/7] scripts: get_abi.pl: don't skip what that ends with wildcards Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 6/7] scripts: get_abi.pl: Ignore fs/cgroup sysfs nodes earlier Mauro Carvalho Chehab
2021-09-18  9:52 ` [PATCH v3 7/7] scripts: get_abi.pl: add a graph to speedup the undefined algorithm Mauro Carvalho Chehab
2021-09-21 16:52 ` Greg Kroah-Hartman [this message]
2021-09-21 18:16   ` [PATCH v3 0/7] get_abi.pl: Check for missing symbols at the ABI specs Mauro Carvalho Chehab
2021-09-22  5:43     ` Greg Kroah-Hartman
2021-09-22  6:22       ` Greg Kroah-Hartman
2021-09-22  7:36         ` Mauro Carvalho Chehab
2021-09-22  8:11           ` Greg Kroah-Hartman
2021-09-22  8:43             ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YUoN2m/OYHVLPrSl@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=anton@enomsg.org \
    --cc=bpf@vger.kernel.org \
    --cc=ccross@android.com \
    --cc=corbet@lwn.net \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=tony.luck@intel.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox