+ delay-accounting-temporarily-enable-by-default.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     delay accounting: temporarily enable by default

has been added to the -mm tree.  Its filename is

     delay-accounting-temporarily-enable-by-default.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: delay accounting: temporarily enable by default
From: Shailabh Nagar <nagar@xxxxxxxxxxxxxx>

Enable delay accounting by default so that feature gets coverage testing
without requiring special measures.

Earlier, it was off by default and had to be enabled via a boot time param.
 This patch reverses the default behaviour to improve coverage testing.  It
can be removed late in the kernel development cycle if its believed users
shouldn't have to incur any cost if they don't want delay accounting.  Or
it can be retained forever if the utility of the stats is deemed common
enough to warrant keeping the feature on.

Signed-off-by: Shailabh Nagar <nagar@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Documentation/accounting/delay-accounting.txt |   10 ++++++----
 Documentation/kernel-parameters.txt           |    4 ++--
 include/linux/delayacct.h                     |    4 ++--
 kernel/delayacct.c                            |    8 ++++----
 4 files changed, 14 insertions(+), 12 deletions(-)

diff -puN Documentation/accounting/delay-accounting.txt~delay-accounting-temporarily-enable-by-default Documentation/accounting/delay-accounting.txt
--- a/Documentation/accounting/delay-accounting.txt~delay-accounting-temporarily-enable-by-default
+++ a/Documentation/accounting/delay-accounting.txt
@@ -64,11 +64,13 @@ Compile the kernel with
 	CONFIG_TASK_DELAY_ACCT=y
 	CONFIG_TASKSTATS=y
 
-Enable the accounting at boot time by adding
-the following to the kernel boot options
-	delayacct
+Delay accounting is enabled by default at boot up.
+To disable, add
+   nodelayacct
+to the kernel boot options. The rest of the instructions
+below assume this has not been done.
 
-and after the system has booted up, use a utility
+After the system has booted up, use a utility
 similar to  getdelays.c to access the delays
 seen by a given task or a task group (tgid).
 The utility also allows a given command to be
diff -puN Documentation/kernel-parameters.txt~delay-accounting-temporarily-enable-by-default Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~delay-accounting-temporarily-enable-by-default
+++ a/Documentation/kernel-parameters.txt
@@ -448,8 +448,6 @@ running once the system is up.
 			Format: <area>[,<node>]
 			See also Documentation/networking/decnet.txt.
 
-	delayacct	[KNL] Enable per-task delay accounting
-
 	dhash_entries=	[KNL]
 			Set number of hash buckets for dentry cache.
 
@@ -1031,6 +1029,8 @@ running once the system is up.
 
 	nocache		[ARM]
 
+	nodelayacct	[KNL] Disable per-task delay accounting
+
 	nodisconnect	[HW,SCSI,M68K] Disables SCSI disconnects.
 
 	noexec		[IA-64]
diff -puN include/linux/delayacct.h~delay-accounting-temporarily-enable-by-default include/linux/delayacct.h
--- a/include/linux/delayacct.h~delay-accounting-temporarily-enable-by-default
+++ a/include/linux/delayacct.h
@@ -55,7 +55,7 @@ static inline void delayacct_tsk_init(st
 {
 	/* reinitialize in case parent's non-null pointer was dup'ed*/
 	tsk->delays = NULL;
-	if (unlikely(delayacct_on))
+	if (delayacct_on)
 		__delayacct_tsk_init(tsk);
 }
 
@@ -80,7 +80,7 @@ static inline void delayacct_blkio_end(v
 static inline int delayacct_add_tsk(struct taskstats *d,
 					struct task_struct *tsk)
 {
-	if (likely(!delayacct_on) || !tsk->delays)
+	if (!delayacct_on || !tsk->delays)
 		return 0;
 	return __delayacct_add_tsk(d, tsk);
 }
diff -puN kernel/delayacct.c~delay-accounting-temporarily-enable-by-default kernel/delayacct.c
--- a/kernel/delayacct.c~delay-accounting-temporarily-enable-by-default
+++ a/kernel/delayacct.c
@@ -19,15 +19,15 @@
 #include <linux/sysctl.h>
 #include <linux/delayacct.h>
 
-int delayacct_on __read_mostly;	/* Delay accounting turned on/off */
+int delayacct_on __read_mostly = 1;	/* Delay accounting turned on/off */
 kmem_cache_t *delayacct_cache;
 
-static int __init delayacct_setup_enable(char *str)
+static int __init delayacct_setup_disable(char *str)
 {
-	delayacct_on = 1;
+	delayacct_on = 0;
 	return 1;
 }
-__setup("delayacct", delayacct_setup_enable);
+__setup("nodelayacct", delayacct_setup_disable);
 
 void delayacct_init(void)
 {
_

Patches currently in -mm which might be from nagar@xxxxxxxxxxxxxx are

make-taskstats-sending-completely-independent-of-delay.patch
taskstats-free-skb-avoid-returns-in.patch
delay-accounting-temporarily-enable-by-default.patch
netlink-improve-string-attribute-validation.patch
task-watchers-register-per-task-delay-accounting.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux