From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Pavel Emelyanov <xemul@openvz.org>,
linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 1/7][QUOTA] Move sysctl management code under ifdef CONFIG_SYSCTL
Date: Mon, 03 Dec 2007 16:32:02 -0700 [thread overview]
Message-ID: <m1ir3fz765.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20071203133844.40804dab.akpm@linux-foundation.org> (Andrew Morton's message of "Mon, 3 Dec 2007 13:38:44 -0800")
Andrew Morton <akpm@linux-foundation.org> writes:
>> +#ifdef CONFIG_SYSCTL
>> static ctl_table fs_dqstats_table[] = {
>> {
>> .ctl_name = FS_DQ_LOOKUPS,
>> @@ -1918,6 +1919,7 @@ static ctl_table sys_table[] = {
>> },
>> { .ctl_name = 0 },
>> };
>> +#endif
>>
>> static int __init dquot_init(void)
>> {
>> @@ -1926,7 +1928,9 @@ static int __init dquot_init(void)
>>
>> printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
>>
>> +#ifdef CONFIG_SYSCTL
>> register_sysctl_table(sys_table);
>> +#endif
>>
>> dquot_cachep = kmem_cache_create("dquot",
>> sizeof(struct dquot), sizeof(unsigned long) * 4,
>
> We should avoid the ifdefs around the register_sysctl_table() call.
>
> At present the !CONFIG_SYSCTL implementation of register_sysctl_table() is
> a non-inlined NULL-returning stub. All we have to do is to inline that stub
> then these ifdefs can go away.
Yes agreed. What we need to do is to give the compiler enough information
to know that the sysctl table is not used.
Making the function an inline and having the table marked "static"
should be enough for the compiler to do the optimization for us instead
of having to manually remove sysctl tables by hand.
Doing it with an inline function should save us a lot of work and maintenance
in the long run. I will see if I can cook up that patch.
> The same applies to register_sysctl_paths().
Agreed.
Eric
next prev parent reply other threads:[~2007-12-03 23:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 12:58 [PATCH 0/7] Start using sysctl paths in the core kernel code Pavel Emelyanov
2007-11-30 13:02 ` [PATCH 1/7][QUOTA] Move sysctl management code under ifdef CONFIG_SYSCTL Pavel Emelyanov
2007-12-03 21:38 ` Andrew Morton
2007-12-03 23:32 ` Eric W. Biederman [this message]
2007-12-04 8:58 ` Pavel Emelyanov
2007-12-04 9:23 ` Andrew Morton
2007-12-04 9:31 ` Pavel Emelyanov
2007-12-04 9:45 ` Andrew Morton
2007-12-04 11:40 ` Eric W. Biederman
2007-12-04 11:48 ` Andrew Morton
2007-12-04 11:58 ` Pavel Emelyanov
2007-12-04 12:48 ` Eric W. Biederman
2007-11-30 13:04 ` [PATCH 2/7][QUOTA] Use sysctl paths to register tables Pavel Emelyanov
2007-11-30 13:09 ` [PATCH 3/7][SYSVIPC] Use the ctl " Pavel Emelyanov
2007-11-30 13:11 ` [PATCH 4/7][SCHED] " Pavel Emelyanov
2007-11-30 13:13 ` [PATCH 5/7][UTS] " Pavel Emelyanov
2007-11-30 13:16 ` [PATCH 6/7][MQUEUE] Move sysctl management code under ifdef CONFIG_SYSCTL Pavel Emelyanov
2007-11-30 13:18 ` [PATCH 7/7][MQUEUE] Use the ctl paths to register tables Pavel Emelyanov
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=m1ir3fz765.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.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;
as well as URLs for NNTP newsgroup(s).