LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Nadia Derbey <Nadia.Derbey@bull.net>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH 1/6] Tunable structure and registration routines
Date: Thu, 25 Jan 2007 17:26:31 +0100 [thread overview]
Message-ID: <45B8DA37.5050502@bull.net> (raw)
In-Reply-To: <20070124163218.ec54891d.randy.dunlap@oracle.com>
Randy,
Thanks for reviewing the code!
My comments embedded.
I'll re-send the patches as soon as possible.
Regards,
Nadia
Randy Dunlap wrote:
> On Tue, 16 Jan 2007 07:15:17 +0100 Nadia.Derbey@bull.net wrote:
>
>
>>[PATCH 01/06]
>>
<snip>
>
>
>>+Any kernel subsystem that has registered a tunable should call
>>+auto_tune_func() as follows:
>>+
>>++-------------------------+--------------------------------------------+
>>+| Step | Routine to call |
>>++-------------------------+--------------------------------------------+
>>+| Declaration phase | DEFINE_TUNABLE(name, values...); |
>>++-------------------------+--------------------------------------------+
>>+| Initialization routine | set_tunable_min_max(name, min, max); |
>>+| | set_autotuning_routine(name, routine); |
>>+| | register_tunable(&name); |
>>+| Note: the 1st 2 calls | |
>>+| are optional | |
>>++-------------------------+--------------------------------------------+
>>+| Alloc | activate_auto_tuning(AKT_UP, &name); |
>>++-------------------------+--------------------------------------------+
>>+| Free | activate_auto_tuning(AKT_DOWN, &name); |
>
>
> So does Free always use AKT_DOWN? why does it matter?
> Seems unneeded and inconsistent.
Tuning down is recommended in order to come back to the default tunable
value.
I agree with you: today it has quite no effect, except on the tunable
value. If we take the ipc's example, grow_ary() just returns if the new
tunable value happens to be lower than the previous one.
But we can imagine, in the future, that grow_ary could deallocate the
unused memory.
+ in that particular case, lowering the tunable value makes the 1st loop
in ipc_addid() shorter.
> How does one activate a tunable for downward adjustment?
Actually a tunable is activated to be dynamically adjusted (whatever the
direction).
But you are giving me an idea for a future enhancement: we can imagine a
tunable that could be allowed to increase only (or decrease only). In
that case, we should move the autotune sysfs attribute into an 'up' and
a 'down' attribute?
<snip>
>>+
>>+2) User part:
>>+
>>+As seen above, the only way to activate automatic tuning is from user side:
>>+- the directory /sys/tunables is created during the init phase.
>>+- each time a tunable is registered by a kernel subsystem, a directory is
>>+created for it under /sys/tunables.
>>+- This directory contains 1 file for each tunable kobject attribute:
>
>
> Please try to limit text documentation to 80 columns or less.
That's exactly what I did?
<snip>
>>Index: linux-2.6.20-rc4/fs/Kconfig
>>===================================================================
>>--- linux-2.6.20-rc4.orig/fs/Kconfig 2007-01-15 13:08:14.000000000 +0100
>>+++ linux-2.6.20-rc4/fs/Kconfig 2007-01-15 14:20:20.000000000 +0100
>>@@ -925,6 +925,8 @@ config PROC_KCORE
>> bool "/proc/kcore support" if !ARM
>> depends on PROC_FS && MMU
>>
>>+source "kernel/autotune/Kconfig"
>
>
> Why is that is the File systems menu? Seems odd to me
> for it to be there. If it's just because it depends on
> PROC_FS and SYSFS, then it should just go completely after
> the File systems menu.
>
Since the tunables that are handled in AKT, I wanted the feature to be
close to CONFIG_PROC_FS.
Now, I do not agree with your proposal: putting it after the FS menu
means that it would appear in the main menu, right? I'll try to find a
better place for it.
>>Index: linux-2.6.20-rc4/include/linux/akt.h
>>===================================================================
>>--- /dev/null 1970-01-01 00:00:00.000000000 +0000
>>+++ linux-2.6.20-rc4/include/linux/akt.h 2007-01-15 14:26:24.000000000 +0100
>>@@ -0,0 +1,186 @@
>>+
<snip>
>>+ char flags; /* Only 2 bits are meaningful: */
>
>
> Make flags unsigned char so that no sign bit is needed.
>
>
>>+ /* bit 0: set to 1 if the associated tunable can */
>>+ /* be automatically adjusted */
>>+ /* bits 1: set to 1 if the tunable has been */
>>+ /* registered */
>>+ /* bits 2-7: useless */
>
>
> unused ??
yep
<snip>
>
>
>>+
>>+extern void fork_late_init(void);
>
>
> Looks like the wrong header file for that extern.
>
>
Actually, I wanted the changes to the existing kernel files to be as
small as possible. That's why everything is concentrated, whenever
possible, in the added files.
Regards,
Nadia
next prev parent reply other threads:[~2007-01-25 16:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 6:15 [RFC][PATCH 0/6] Automatice kernel tunables (AKT) Nadia.Derbey
2007-01-16 6:15 ` [RFC][PATCH 1/6] Tunable structure and registration routines Nadia.Derbey
2007-01-25 0:32 ` Randy Dunlap
2007-01-25 16:26 ` Nadia Derbey [this message]
2007-01-25 16:34 ` Randy Dunlap
2007-01-25 17:01 ` Nadia Derbey
2007-01-16 6:15 ` [RFC][PATCH 2/6] auto_tuning activation Nadia.Derbey
2007-01-16 6:15 ` [RFC][PATCH 3/6] tunables associated kobjects Nadia.Derbey
2007-01-16 6:15 ` [RFC][PATCH 4/6] min and max kobjects Nadia.Derbey
2007-01-24 22:41 ` Randy Dunlap
2007-01-25 16:34 ` Nadia Derbey
2007-01-16 6:15 ` [RFC][PATCH 5/6] per namespace tunables Nadia.Derbey
2007-01-24 22:41 ` Randy Dunlap
2007-01-16 6:15 ` [RFC][PATCH 6/6] automatic tuning applied to some kernel components Nadia.Derbey
2007-01-22 19:56 ` Andrew Morton
2007-01-23 14:40 ` Nadia Derbey
2007-02-07 21:18 ` Eric W. Biederman
2007-02-09 12:27 ` Nadia Derbey
2007-02-09 18:35 ` Eric W. Biederman
2007-02-13 9:06 ` Nadia Derbey
2007-02-13 10:10 ` Eric W. Biederman
2007-02-15 7:07 ` Nadia Derbey
2007-02-15 7:49 ` Eric W. Biederman
2007-02-15 8:25 ` Nadia Derbey
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=45B8DA37.5050502@bull.net \
--to=nadia.derbey@bull.net \
--cc=linux-kernel@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--subject='Re: [RFC][PATCH 1/6] Tunable structure and registration routines' \
/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
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).