From: Mike Galbraith <efault@gmx.de>
To: lkml <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
Nick Piggin <nickpiggin@yahoo.com.au>,
Peter Williams <pwil3058@bigpond.net.au>,
Con Kolivas <kernel@kolivas.org>
Subject: Re: [2.6.16-mm1 patch] throttling tree patches
Date: Fri, 24 Mar 2006 12:28:48 +0100 [thread overview]
Message-ID: <1143199728.7741.37.camel@homer> (raw)
In-Reply-To: <1143199493.7741.32.camel@homer>
patch 6/6
This patch exports throttling tuning knobs to userland. Should be
useful for testing, and in easily discarded should my throttling stuff
make it into mm, and survive the experience.
Signed-off-by: Mike Galbraith <efauklt@gmx.de>
--- linux-2.6.16-mm1/include/linux/sysctl.h.org 2006-03-24 09:43:37.000000000 +0100
+++ linux-2.6.16-mm1/include/linux/sysctl.h 2006-03-24 09:47:49.000000000 +0100
@@ -148,6 +148,8 @@
KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
+ KERN_SCHED_THROTTLE1=73, /* int: throttling credit period 1 in secs */
+ KERN_SCHED_THROTTLE2=74, /* int: throttling credit period 2 in secs */
};
--- linux-2.6.16-mm1/kernel/sysctl.c.org 2006-03-24 09:43:14.000000000 +0100
+++ linux-2.6.16-mm1/kernel/sysctl.c 2006-03-24 09:47:49.000000000 +0100
@@ -73,6 +73,9 @@
extern int pid_max_min, pid_max_max;
extern int sysctl_drop_caches;
extern int percpu_pagelist_fraction;
+extern int credit_c1;
+extern int credit_c2;
+extern int credit_max;
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
int unknown_nmi_panic;
@@ -230,6 +233,11 @@
{ .ctl_name = 0 }
};
+/* Constants for minimum and maximum testing in vm_table and
+ * kern_table. We use these as one-element integer vectors. */
+static int zero;
+static int one_hundred = 100;
+
static ctl_table kern_table[] = {
{
.ctl_name = KERN_OSTYPE,
@@ -684,15 +692,31 @@
.proc_handler = &proc_dointvec,
},
#endif
+ {
+ .ctl_name = KERN_SCHED_THROTTLE1,
+ .procname = "credit_c1",
+ .data = &credit_c1,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &credit_max,
+ },
+ {
+ .ctl_name = KERN_SCHED_THROTTLE2,
+ .procname = "credit_c2",
+ .data = &credit_c2,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_minmax,
+ .strategy = &sysctl_intvec,
+ .extra1 = &zero,
+ .extra2 = &credit_max,
+ },
{ .ctl_name = 0 }
};
-/* Constants for minimum and maximum testing in vm_table.
- We use these as one-element integer vectors. */
-static int zero;
-static int one_hundred = 100;
-
-
static ctl_table vm_table[] = {
{
.ctl_name = VM_OVERCOMMIT_MEMORY,
--- linux-2.6.16-mm1/kernel/sched.c-5.slice_accounting 2006-03-24 09:40:33.000000000 +0100
+++ linux-2.6.16-mm1/kernel/sched.c 2006-03-24 09:51:06.000000000 +0100
@@ -220,11 +220,12 @@
* credit that fits in 32 bits jiffies is 42949 seconds.
*/
-#define CREDIT_C1 10
-#define CREDIT_C2 14400
+int credit_c1 = 10;
+int credit_c2 = 14400;
+int credit_max = 42949;
-#define C1 (CREDIT_C1 * MAX_BONUS * HZ)
-#define C2 (CREDIT_C2 * MAX_BONUS * HZ + C1)
+#define C1 (credit_c1 * MAX_BONUS * HZ)
+#define C2 (credit_c2 * MAX_BONUS * HZ + C1)
#define C3 (MAX_BONUS * C2)
#define credit_exhausted(p, credit) \
next prev parent reply other threads:[~2006-03-24 11:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 11:03 [2.6.16-mm1 patch] throttling tree patches Mike Galbraith
2006-03-24 11:07 ` Mike Galbraith
2006-03-24 11:16 ` Mike Galbraith
2006-03-24 11:21 ` Mike Galbraith
2006-03-24 11:24 ` Mike Galbraith
2006-03-24 11:28 ` Mike Galbraith [this message]
2006-03-24 11:56 ` Con Kolivas
2006-03-24 11:55 ` Con Kolivas
2006-03-24 11:54 ` Con Kolivas
2006-03-24 11:56 ` Con Kolivas
2006-03-24 12:21 ` Mike Galbraith
2006-03-24 12:34 ` Con Kolivas
2006-03-24 13:02 ` Mike Galbraith
2006-03-24 13:52 ` Con Kolivas
2006-03-24 14:10 ` Mike Galbraith
2006-03-24 11:38 ` Con Kolivas
2006-03-24 11:37 ` Con Kolivas
2006-03-25 0:25 ` Peter Williams
2006-03-25 5:06 ` Mike Galbraith
2006-03-25 6:18 ` [2.6.16-mm1 patch] ignore timewarps Mike Galbraith
2006-03-25 0:37 ` [2.6.16-mm1 patch] throttling tree patches Peter Williams
2006-03-25 5:11 ` Mike Galbraith
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=1143199728.7741.37.camel@homer \
--to=efault@gmx.de \
--cc=akpm@osdl.org \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=pwil3058@bigpond.net.au \
/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