From: Stephen Hemminger <shemminger-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
To: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: Paul Menage <menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: cgroup debug seems dead?
Date: Tue, 19 Oct 2010 18:12:45 -0700 [thread overview]
Message-ID: <20101019181245.7902113a@nehalam> (raw)
In-Reply-To: <4CBE41AE.2020101-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
On Wed, 20 Oct 2010 09:11:10 +0800
Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> wrote:
> Stephen Hemminger wrote:
> > While running namespace checks to look for dead code,
> > I found that debug_subsys is declared global but never
> > used in current code.
> >
> > This leads to the fact that since debug_subsys is never
> > used, the whole set of debugging functions is also never
> > used. Is the whole CGROUP_DEBUG config option dead?
> >
>
> No, it's not.
>
> The debug code has been moved from kernel/cgroup_debug.c to
> kernel/cgroup.c, but the config and the code is not dead.
>
> Is it a false positive of that check? The pointer to debug_subsys
> is stored in an array, and the array will be iterated in some places,
> so debug_subsys will be accessed.
Where is it stored in an array?
~/kernel/linux-2.6$ git grep debug_subsys
kernel/cgroup.c: kfree(cont->subsys[debug_subsys_id]);
kernel/cgroup.c:struct cgroup_subsys debug_subsys = {
kernel/cgroup.c: .subsys_id = debug_subsys_id,
There does not appear to be any place that structure is
referenced.
--
next prev parent reply other threads:[~2010-10-20 1:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-19 15:51 cgroup debug seems dead? Stephen Hemminger
2010-10-20 1:11 ` Li Zefan
[not found] ` <4CBE41AE.2020101-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-10-20 1:12 ` Stephen Hemminger [this message]
2010-10-20 1:14 ` Paul Menage
[not found] ` <AANLkTinH2t41jvGG_D9qAdN5MvRHg7aR+J2mKV5ifMfC-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-20 1:37 ` Stephen Hemminger
2010-10-20 1:42 ` Paul Menage
2010-10-20 1:43 ` Li Zefan
[not found] ` <4CBE492A.3020208-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-10-20 2:14 ` Stephen Hemminger
2010-10-20 2:23 ` Li Zefan
[not found] ` <4CBE52AE.2010409-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2010-10-20 4:49 ` Américo Wang
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=20101019181245.7902113a@nehalam \
--to=shemminger-ztmgi6mnkb3qt0dzr+alfa@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
/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