All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] Add ftrace-stress-test to LTP
@ 2010-09-07  2:50 Li Zefan
  2010-09-28 16:05 ` Subrata Modak
  0 siblings, 1 reply; 37+ messages in thread
From: Li Zefan @ 2010-09-07  2:50 UTC (permalink / raw)
  To: ltp-list

We test ftrace by forking processes to simultaneously and
constantly read/write different tracing files in debugfs
and procfs. This stress test aims at revealing races in
various corner cases

The test will be skipped if the kernel is older than 2.6.34,
mainly because it can crash old kernels.

The test will run by default and will run for 90 seconds.

To run this test only:

	# ./runltp -f tracing


Changelog for v2:

- Addressed the comments from Garrett

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 runltp                                             |    3 +-
 runtest/tracing                                    |    2 +
 testcases/kernel/Makefile                          |    2 +-
 testcases/kernel/tracing/Makefile                  |    5 +
 .../kernel/tracing/ftrace_stress_test/Makefile     |    7 +
 .../ftrace_stress_test/ftrace_get_page_size.c      |   10 +
 .../ftrace_stress/ftrace_buffer_size.sh            |   43 ++++
 .../ftrace_stress/ftrace_current_tracer.sh         |   34 +++
 .../ftrace_stress/ftrace_ftrace_enabled.sh         |   39 ++++
 .../ftrace_stress/ftrace_profile_enabled.sh        |   50 ++++
 .../ftrace_stress/ftrace_set_event.sh              |   44 ++++
 .../ftrace_stress/ftrace_set_ftrace_pid.sh         |   44 ++++
 .../ftrace_stress/ftrace_stack_max_size.sh         |   39 ++++
 .../ftrace_stress/ftrace_stack_trace.sh            |   46 ++++
 .../ftrace_stress/ftrace_trace.sh                  |   27 +++
 .../ftrace_stress/ftrace_trace_clock.sh            |   46 ++++
 .../ftrace_stress/ftrace_trace_options.sh          |   42 ++++
 .../ftrace_stress/ftrace_trace_pipe.sh             |   52 +++++
 .../ftrace_stress/ftrace_trace_stat.sh             |   45 ++++
 .../ftrace_stress/ftrace_tracing_enabled.sh        |   39 ++++
 .../ftrace_stress/ftrace_tracing_max_latency.sh    |   38 +++
 .../ftrace_stress/ftrace_tracing_on.sh             |   39 ++++
 .../ftrace_stress_test/ftrace_stress_test.sh       |  237 ++++++++++++++++++++
 23 files changed, 931 insertions(+), 2 deletions(-)
 create mode 100644 runtest/tracing
 create mode 100644 testcases/kernel/tracing/Makefile
 create mode 100644 testcases/kernel/tracing/ftrace_stress_test/Makefile
 create mode 100644 testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
 create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh

diff --git a/runltp b/runltp
index b385984..89b1717 100755
--- a/runltp
+++ b/runltp
@@ -593,7 +593,8 @@ main()
                          ${LTPROOT}/runtest/numa                    \
                          ${LTPROOT}/runtest/hugetlb                 \
                          ${LTPROOT}/runtest/commands                \
-                         ${LTPROOT}/runtest/hyperthreading
+                         ${LTPROOT}/runtest/hyperthreading          \
+                         ${LTPROOT}/runtest/tracing
         do
             [ -e "$SCENFILES" ] || \
             {
diff --git a/runtest/tracing b/runtest/tracing
new file mode 100644
index 0000000..ef3a048
--- /dev/null
+++ b/runtest/tracing
@@ -0,0 +1,2 @@
+#DESCRIPTION:Tracing testing
+ftrace-stress-test	ftrace_stress_test.sh 90
diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
index e2a9d8e..8c50025 100644
--- a/testcases/kernel/Makefile
+++ b/testcases/kernel/Makefile
@@ -30,7 +30,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
 ifneq ($(UCLINUX),1)
 SUBDIRS		:= containers connectors controllers fs hotplug io ipc mem \
 		   numa performance_counters power_management pty sched \
-		   security syscalls timers
+		   security syscalls timers tracing
 else
 SUBDIRS		:= syscalls
 endif
diff --git a/testcases/kernel/tracing/Makefile b/testcases/kernel/tracing/Makefile
new file mode 100644
index 0000000..e9f96c3
--- /dev/null
+++ b/testcases/kernel/tracing/Makefile
@@ -0,0 +1,5 @@
+top_srcdir		?= ../../..
+
+include $(top_srcdir)/include/mk/env_pre.mk
+
+include $(top_srcdir)/include/mk/generic_trunk_target.mk
diff --git a/testcases/kernel/tracing/ftrace_stress_test/Makefile b/testcases/kernel/tracing/ftrace_stress_test/Makefile
new file mode 100644
index 0000000..e4a913a
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/Makefile
@@ -0,0 +1,7 @@
+top_srcdir              ?= ../../../..
+
+include $(top_srcdir)/include/mk/testcases.mk
+
+INSTALL_TARGETS         := *.sh ftrace_stress/*
+
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
new file mode 100644
index 0000000..b52a109
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+#include <stdio.h>
+
+int main(void)
+{
+	printf("%d\n", getpagesize());
+
+	return 0;
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
new file mode 100755
index 0000000..af5a98e
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=200
+
+# Use up to 10% of free memory
+free_mem=`cat /proc/meminfo | grep '^MemFree' | awk '{ print $2 }'`
+step=$(( $free_mem / 10 / $LOOP ))
+if [ $step -eq 0 ]; then
+	$step=1
+	LOOP=50
+fi
+
+for ((; ;))
+{
+	new_size=1
+	for ((i = 0; i < $LOOP; i++))
+	{
+		echo $new_size > "$TRACING_PATH"/buffer_size_kb
+		new_size=$(( $new_size + $step ))
+	}
+
+	for ((i = 0; i < $LOOP; i++))
+	{
+		new_size=$(( $new_size - $step ))
+		echo $new_size > "$TRACING_PATH"/buffer_size_kb
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
new file mode 100755
index 0000000..88d576f
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
@@ -0,0 +1,34 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=200
+
+for ((; ;))
+{
+	for ((i = 0; i < $LOOP; i++))
+	{
+		for tracer in `cat "$TRACING_PATH"/available_tracers`
+		do
+			if [ "$tracer" = mmiotrace ]; then
+				continue
+			fi
+
+			echo $tracer > "$TRACING_PATH"/current_tracer 2> /dev/null
+		done
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
new file mode 100755
index 0000000..20bb234
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_LOOP=1500
+count=0
+
+for ((; ;))
+{
+	count=$(( $count + 1 ))
+
+	for ((i = 0; i < $MAX_LOOP; i++))
+	{
+		echo 0 > /proc/sys/kernel/ftrace_enabled
+		echo 1 > /proc/sys/kernel/ftrace_enabled
+	}
+
+	enable=$(( $count % 3 ))
+
+	if [ $enable -eq 0 ]; then
+		echo 1 > /proc/sys/kernel/ftrace_enabled
+	else
+		echo 0 > /proc/sys/kernel/ftrace_enabled
+	fi
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
new file mode 100755
index 0000000..9c6162a
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
@@ -0,0 +1,50 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_LOOP=1500
+count=0
+
+if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
+	should_skip=1
+else
+	should_skip=0
+fi
+
+for ((; ;))
+{
+	if [ $should_skip -eq 1 ]; then
+		sleep 2
+		continue
+	fi
+
+	count=$(( $count + 1 ))
+
+	for ((i = 0; i < $MAX_LOOP; i++))
+	{
+		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
+		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
+	}
+
+	enable=$(( $count % 3 ))
+
+	if [ $enable -eq 0 ]; then
+		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
+	else
+		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
+	fi
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
new file mode 100755
index 0000000..d7efdd4
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+for ((; ;))
+{
+	for ((i = 0; i < 100; i++))
+	{
+		echo 1 > "$TRACING_PATH"/events/enable
+		echo 0 > "$TRACING_PATH"/events/enable
+	}
+
+	for dir in `ls $TRACING_PATH/events/`
+	do
+		if [ ! -d $dir -o "$dir" = ftrace ]; then
+			continue;
+		fi
+
+		for ((i = 0; i < 20; i++))
+		{
+			echo 1 > "$TRACING_PATH"/events/$dir/enable
+			echo 0 > "$TRACING_PATH"/events/$dir/enable
+		}
+	done
+
+	for event in `cat $TRACING_PATH/available_events`;
+	do
+		echo $event >> "$TRACING_PATH"/set_event
+	done
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
new file mode 100755
index 0000000..541215c
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=300
+
+if [ ! -e "$TRACING_PATH"/set_ftrace_pid ]; then
+	should_skip=1
+else
+	should_skip=0
+fi
+
+for ((; ; ))
+{
+	if [ $should_skip -eq 1 ]; then
+		sleep 2
+		continue
+	fi
+
+	for ((j = 0; j < $LOOP; j++))
+	{
+		for ((k = 1; k <= NR_PIDS; k++))
+		{
+			str="\$pid$k"
+			eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
+		}
+
+		echo > "$TRACING_PATH"/set_ftrace_pid
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
new file mode 100755
index 0000000..682d05e
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_STACK_SIZE=8192
+
+if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
+	should_skip=1
+else
+	should_skip=0
+fi
+
+for ((; ;))
+{
+	if [ $should_skip -eq 1 ]; then
+		sleep 2
+		continue
+	fi
+
+	for ((i = 0; i < $MAX_STACK_SIZE; i += 70))
+	{
+		echo $i > "$TRACING_PATH"/stack_max_size
+		cat "$TRACING_PATH"/stack_max_size > /dev/null
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
new file mode 100755
index 0000000..a406c51
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=400
+
+if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
+	should_skip=1
+else
+	should_skip=0
+fi
+
+for ((; ;))
+{
+	if [ $should_skip -eq 1 ]; then
+		sleep 2
+		continue
+	fi
+
+	for ((i = 0; i < $LOOP; i++))
+	{
+		cat "$TRACING_PATH"/stack_trace > /dev/null
+	}
+
+	sleep 1
+
+	for ((i = 0; i < $LOOP; i++))
+	{
+		echo 0 > /proc/sys/kernel/stack_tracer_enabled
+		echo 1 > /proc/sys/kernel/stack_tracer_enabled
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
new file mode 100755
index 0000000..e36712b
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=200
+
+for ((; ;))
+{
+	for ((i = 0; i < $LOOP; i++))
+	{
+		cat "$TRACING_PATH"/trace > /dev/null
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
new file mode 100755
index 0000000..de6bbea
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=400
+
+# In kernel which is older than 2.6.32, we set global clock
+# via trace_options.
+tst_kvercmp 2 6 32
+if [ $? -eq 0 ]; then
+        old_kernel=1
+else
+        old_kernel=0
+fi
+
+for ((; ;))
+{
+	if [ $old_kernel -eq 1 ];
+	then
+		for ((i = 0; i < $LOOP; i++))
+		{
+			echo 1 > "$TRACING_PATH"/options/global-clock
+			echo 0 > "$TRACING_PATH"/options/global-clock
+		}
+	else
+		for ((i = 0; i < $LOOP; i++))
+		{
+			echo local > "$TRACING_PATH"/trace_clock
+			echo global > "$TRACING_PATH"/trace_clock
+		}
+	fi
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
new file mode 100755
index 0000000..47d2a62
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=200
+
+trace_options=(print-parent sym-offset sym-addr verbose raw hex bin block trace_printk ftrace_preempt branch annotate userstacktrace sym-userobj printk-msg-only context-info latency-format sleep-time graph-time)
+
+NR_TRACE_OPTIONS=19
+
+for ((; ; ))
+{
+	for ((j = 0; j < $LOOP; j++))
+	{
+		num=`date +%N`
+		num=`printf 1%s $num`
+
+		for ((i = 0; i < $NR_TRACE_OPTIONS; i++))
+		{
+			n=$(( ( $num >> $i ) % 2 ))
+			if [ $n -eq 0 ]; then
+				echo 0 > "$TRACING_PATH"/options/${trace_options[$i]}
+			else
+				echo 1 > "$TRACING_PATH"/options/${trace_options[$i]}
+			fi
+		}
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
new file mode 100755
index 0000000..47d42bc
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
@@ -0,0 +1,52 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+ftrace_sleep()
+{
+	# usleep is not a standard command?
+	usleep 200000 2> /dev/null
+	if [ $? -ne 0 ]; then
+		sleep 1
+	fi
+}
+
+kill_this_pid()
+{
+	/bin/kill -SIGKILL $this_pid
+	wait $this_pid
+	exit 0
+}
+
+trap kill_this_pid SIGUSR1
+
+LOOP=20
+
+for ((; ;))
+{
+	for ((i = 0; i < $LOOP; i++))
+	{
+		cat "$TRACING_PATH"/trace_pipe > /dev/null &
+
+		this_pid=$!
+		ftrace_sleep
+		/bin/kill -SIGINT $this_pid
+		wait $this_pid
+		this_pid=0
+		ftrace_sleep
+	}
+
+	sleep 2
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
new file mode 100755
index 0000000..cb601db
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+LOOP=200
+
+should_skip=0
+
+if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
+        should_skip=1
+fi
+
+# For kernels older than 2.6.36, this testcase can result in 
+# divide-by-zero kernel bug
+tst_kvercmp 2 6 36
+if [ $? -eq 0 ]; then
+	should_skip=1
+fi
+
+for ((; ;))
+{
+	if [ $should_skip -eq 1 ]; then
+		sleep 2
+		continue
+	fi
+
+	for ((i = 0; i < $LOOP; i++))
+	{
+		cat "$TRACING_PATH"/trace_stat/function0 > /dev/null 2>&1
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
new file mode 100755
index 0000000..69f2ae6
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_LOOP=1500
+count=0
+
+for ((; ;))
+{
+	count=$(( $count + 1 ))
+
+	for ((i = 0; i < $MAX_LOOP; i++))
+	{
+		echo 0 > "$TRACING_PATH"/tracing_enabled
+		echo 1 > "$TRACING_PATH"/tracing_enabled
+	}
+
+	enable=$(( $count % 3 ))
+
+	if [ $enable -eq 0 ]; then
+		echo 0 > "$TRACING_PATH"/tracing_enabled
+	else
+		echo 1 > "$TRACING_PATH"/tracing_enabled
+	fi
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
new file mode 100755
index 0000000..f19d734
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
@@ -0,0 +1,38 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_LATENCY=100000
+
+if [ ! -e "$TRACING_PATH"/tracing_max_latency ]; then
+        should_skip=1
+else
+        should_skip=0
+fi
+
+for ((; ;))
+{
+        if [ $should_skip -eq 1 ]; then
+                sleep 2
+                continue
+        fi
+
+	for ((i = 0; i < $MAX_LATENCY; i += 400))
+	{
+		echo $i > "$TRACING_PATH"/tracing_max_latency
+	}
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
new file mode 100755
index 0000000..672c223
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+###############################################################################
+#                                                                             #
+# Copyright (c) 2010 FUJITSU LIMITED                                          #
+#                                                                             #
+# This program is free software; you can redistribute it and/or modify it     #
+# under the terms of the GNU General Public License as published by the Free  #
+# Software Foundation; either version 2 of the License, or (at your option)   #
+# any later version.                                                          #
+#                                                                             #
+# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
+#                                                                             #
+###############################################################################
+
+MAX_LOOP=1500
+count=0
+
+for ((; ;))
+{
+	count=$(( $count + 1 ))
+
+	for ((i = 0; i < $MAX_LOOP; i++))
+	{
+		echo 0 > "$TRACING_PATH"/tracing_on
+		echo 1 > "$TRACING_PATH"/tracing_on
+	}
+
+	enable=$(( $count % 3 ))
+
+	if [ $enable -eq 0 ]; then
+		echo 0 > "$TRACING_PATH"/tracing_on
+	else
+		echo 1 > "$TRACING_PATH"/tracing_on
+	fi
+
+	sleep 1
+}
+
diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
new file mode 100755
index 0000000..874268e
--- /dev/null
+++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
@@ -0,0 +1,237 @@
+#! /bin/sh
+
+################################################################################
+##                                                                            ##
+## Copyright (c) 2010 FUJITSU LIMITED                                         ##
+##                                                                            ##
+## This program is free software;  you can redistribute it and#or modify      ##
+## it under the terms of the GNU General Public License as published by       ##
+## the Free Software Foundation; either version 2 of the License, or          ##
+## (at your option) any later version.                                        ##
+##                                                                            ##
+## This program is distributed in the hope that it will be useful, but        ##
+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
+## for more details.                                                          ##
+##                                                                            ##
+## You should have received a copy of the GNU General Public License          ##
+## along with this program;  if not, write to the Free Software               ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
+##                                                                            ##
+## Author: Li Zefan <lizf@cn.fujitsu.com>                                     ##
+##                                                                            ##
+################################################################################
+
+cd $LTPROOT/testcases/bin
+
+export TCID="ftrace-stress-test"
+export TST_TOTAL=1
+export TST_COUNT=1
+
+export TPATH="$PWD"
+export DEBUGFS_PATH="$PWD/debugfs"
+export TRACING_PATH="$PWD/debugfs/tracing"
+export SPATH="$TPATH/ftrace_stress"
+
+test_interval=$1
+
+save_old_setting()
+{
+	cd $TRACING_PATH
+
+	old_trace_options=( `cat trace_options` )
+	old_tracing_on=`cat tracing_on`
+	old_tracing_enabled=`cat tracing_enabled`
+	old_buffer_size=`cat buffer_size_kb`
+
+	if [ -e stack_max_size ]; then
+		old_stack_tracer_enabled=`cat /proc/sys/kernel/stack_tracer_enabled`
+	fi
+
+	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
+		old_ftrace_enabled=`cat /proc/sys/kernel/ftrace_enabled`
+	fi
+
+	if [ -e "function_profile_enabled" ]; then
+		old_profile_enabled=`cat function_profile_enabled`
+	fi
+
+	cd - > /dev/null
+}
+
+restore_old_setting()
+{
+	cd $TRACING_PATH
+
+	echo nop > current_tracer
+	echo 0 > events/enable
+	echo 0 > tracing_max_latency 2> /dev/null
+
+	if [ -e trace_clock ]; then
+		echo local > trace_clock
+	fi
+
+	if [ -e "function_pofile_enabled" ]; then
+		echo $old_profile_enabled > function_profile_enabled
+	fi
+
+	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
+		echo $old_ftrace_enabled > /proc/sys/kernel/ftrace_enabled
+	fi
+
+	if [ -e stack_max_size ]; then
+		echo $old_stack_tracer_enabled > /proc/sys/kernel/stack_tracer_enabled
+		echo 0 > stack_max_size
+	fi
+
+	echo $old_buffer_size > buffer_size_kb
+	echo $old_tracing_on > tracing_on
+	echo $old_tracing_enabled > tracing_enabled
+
+	for option in $old_trace_options
+	do
+		echo $option > trace_options 2> /dev/null
+	done
+
+	echo > trace
+
+	cd - > /dev/null
+}
+
+clean_up()
+{
+	kill -KILL $pid1
+	kill -KILL $pid2
+	kill -KILL $pid3
+	kill -KILL $pid4
+	kill -KILL $pid5
+	kill -KILL $pid6
+	kill -KILL $pid7
+	kill -KILL $pid8
+	kill -KILL $pid9
+	kill -KILL $pid10
+	kill -KILL $pid11
+	kill -USR1 $pid12
+	kill -KILL $pid13
+	kill -KILL $pid14
+	kill -KILL $pid15
+	kill -KILL $pid16
+
+	sleep 2
+	restore_old_setting
+
+	umount $DEBUGFS_PATH
+	rmdir $DEBUGFS_PATH
+}
+
+clean_up_exit()
+{
+	clean_up
+	exit 1
+}
+
+export_pids()
+{
+	export pid1 pid2 pid3 pid4 pid5 pid6 pid7 pid8 pid9 pid10 pid11 pid12 \
+		pid13 pid14 pid15 pid16
+
+	export NR_PIDS=16
+}
+
+test_begin()
+{
+	start_time=`date +%s`
+}
+
+test_wait()
+{
+	for ((; ;))
+	{
+		sleep 2
+
+		cur_time=`date +%s`
+		elapsed=$(( $cur_time - $start_time ))
+
+		# run the stress test for $test_interval secs
+		if [ $elapsed -ge $test_interval ]; then
+			break
+		fi
+	}
+}
+
+trap clean_up_exit SIGINT
+
+# Should be run by root user
+if [ `id -ru` != 0 ]; then
+	tst_brkm TCONF ignored "The test should be run by root user. Skip the test..."
+	exit 0
+fi
+
+# Don't run the test on kernels older than 2.6.34, otherwise
+# it can crash the system if the kernel is not latest-stable
+tst_kvercmp 2 6 34
+if [ $? -eq 0 ]; then
+	tst_brkm TCONF ignored "The test should be run in kernels >= 2.6.34. Skip the test..."
+	exit 0
+fi
+
+mkdir $DEBUGFS_PATH
+mount -t debugfs xxx $DEBUGFS_PATH
+
+# Check to see tracing feature is supported or not
+if [ ! -d $TRACING_PATH ]; then
+	tst_brkm TCONF ignored "Tracing is not supported. Skip the test..."
+	umount $DEBUGFS_PATH
+	rmdir $DEBUGFS_PATH
+	exit 0
+fi
+
+echo "Ftrace Stress Test Begin"
+
+save_old_setting
+
+test_begin
+
+$SPATH/ftrace_trace_clock.sh &
+pid1=$!
+$SPATH/ftrace_current_tracer.sh &
+pid2=$!
+$SPATH/ftrace_trace_options.sh &
+pid3=$!
+$SPATH/ftrace_tracing_max_latency.sh &
+pid4=$!
+$SPATH/ftrace_stack_trace.sh &
+pid5=$!
+$SPATH/ftrace_stack_max_size.sh &
+pid6=$!
+$SPATH/ftrace_tracing_on.sh &
+pid7=$!
+$SPATH/ftrace_tracing_enabled.sh &
+pid8=$!
+$SPATH/ftrace_set_event.sh &
+pid9=$!
+$SPATH/ftrace_buffer_size.sh &
+pid10=$!
+$SPATH/ftrace_trace.sh &
+pid11=$!
+$SPATH/ftrace_trace_pipe.sh &
+pid12=$!
+$SPATH/ftrace_ftrace_enabled.sh &
+pid13=$!
+$SPATH/ftrace_set_ftrace_pid.sh &
+pid14=$!
+$SPATH/ftrace_profile_enabled.sh &
+pid15=$!
+$SPATH/ftrace_trace_stat.sh &
+pid16=$!
+
+export_pids
+
+test_wait
+
+clean_up
+
+echo "Ftrace Stress Test End"
+
+tst_resm TPASS "finished running the test. Run dmesg to double-check for bugs"
+
-- 
1.6.3

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-09-07  2:50 [LTP] [PATCH v2] Add ftrace-stress-test to LTP Li Zefan
@ 2010-09-28 16:05 ` Subrata Modak
  2010-10-04  7:13   ` Subrata Modak
  2010-10-13  7:21   ` Subrata Modak
  0 siblings, 2 replies; 37+ messages in thread
From: Subrata Modak @ 2010-09-28 16:05 UTC (permalink / raw)
  To: Li Zefan; +Cc: ltp-list

[-- Attachment #1: Type: text/plain, Size: 53893 bytes --]

On Tue, 2010-09-07 at 10:50 +0800, Li Zefan wrote:
> We test ftrace by forking processes to simultaneously and
> constantly read/write different tracing files in debugfs
> and procfs. This stress test aims at revealing races in
> various corner cases
> 
> The test will be skipped if the kernel is older than 2.6.34,
> mainly because it can crash old kernels.
> 
> The test will run by default and will run for 90 seconds.
> 
> To run this test only:
> 
> 	# ./runltp -f tracing
> 
> 
> Changelog for v2:
> 
> - Addressed the comments from Garrett
> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

Sorry for responding late. I gave a try to these tests and has my
following observations:

You said that the tests can run on kernels above 2.6.34 without issues.
But, i ran them on stable 2.6.35.4 and still found kernel panics. I
built kernel 2.6.35.4 on my existing Fedora 13 PowerPC box.

# uname -a
Linux 2.6.35.4 #2 SMP Tue Sep 28 16:07:27 IST 2010 ppc64 ppc64 ppc64
GNU/Linux
# cat /etc/issue
Fedora release 13 (Goddard)
Kernel \r on an \m (\l)

When i ran the tests:
Running tests.......
<<<test_start>>>
tag=ftrace-stress-test stime=1285684343
cmdline="ftrace_stress_test.sh 90"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Ftrace Stress Test Begin
...

The following panic and system reboot was observed on mu Serial console:
========================================================================
Unable to handle kernel paging request for data at address
0xbffffe4007fc8040
Unable to handle kernel paging request for data at address
0xbffffe4007fc8040
Faulting instruction address: 0xc00000000010f4a8
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=128 NUMA pSeries
last sysfs
file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
scsi_tgt [last unloaded: scsi_wait_scan]
NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
REGS: c0000000dafa70a0 TRAP: 0300   Tainted: G        W    (2.6.35.4)
MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
DAR: bffffe4007fc8040, DSISR: 0000000040000000
TASK = c0000000daf950d0[9] 'migration/2' THREAD: c0000000dafa4000 CPU: 2
GPR00: 0000000000009c35 c0000000dafa7320 c000000001735d40
0000000000000000 
GPR04: c00000000010f308 c0000000dafa7278 0000000000000000
0000000000009c34 
GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
c000000001033720 
GPR12: 0000000028002042 c000000007fc8e00 0000000006e3fa78
00000000005f3000 
GPR16: c0000000dafa77d0 c000000001c852b0 c0000000dafa77c0
0000000000000000 
GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
c0000000017dea80 
GPR24: 0000000000c55000 c0000000daeabc00 0000000001dcff22
c0000000daf950d0 
GPR28: c000000001c87780 c0000000017cea80 c0000000016a5df0
c0000000dafa7320 
NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
Call Trace:
[c0000000dafa7320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
(unreliable)
[c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
[c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
[c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
[c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
[c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
[c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
[c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
[c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
--- Exception: 901 at .raw_local_irq_restore+0x168/0x194
    LR = .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
[c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
[c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
[c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
Instruction dump:
e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
7c0b512a 
Faulting instruction address: 0xc00000000010f4a8
Oops: Kernel access of bad area, sig: 11 [#2]
SMP NR_CPUS=128 NUMA pSeries
last sysfs
file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
scsi_tgt [last unloaded: scsi_wait_scan]
NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
REGS: c0000000dafc30a0 TRAP: 0300   Tainted: G      D W    (2.6.35.4)
MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
DAR: bffffe4007fc8040, DSISR: 0000000040000000
TASK = c0000000dafb35e0[12] 'migration/3' THREAD: c0000000dafc0000 CPU:
3
GPR00: 0000000000009c34 c0000000dafc3320 c000000001735d40
0000000000000000 
GPR04: c00000000010f308 c0000000dafc3278 0000000000000000
0000000000009c33 
GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
c000000001033720 
GPR12: c0000000d1725300 c000000007fc9500 0000000006e3fa78
00000000005f3000 
GPR16: c0000000dafc37d0 c000000001cc52b0 c0000000dafc37c0
0000000000000000 
GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
c0000000017dea80 
GPR24: 0000000000c95000 c0000000dafb8800 0000000001daff3e
c0000000dafb35e0 
GPR28: c000000001cc7780 c0000000017cea80 c0000000016a5df0
c0000000dafc3320 
NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
Call Trace:
[c0000000dafc3320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
(unreliable)
[c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
[c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
[c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
[c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
[c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
[c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
[c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
[c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
--- Exception: 901 at .raw_local_irq_restore+0x168/0x194
    LR = .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
[c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
[c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
[c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
Instruction dump:
e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
7c0b512a 
Kernel panic - not syncing: Fatal exception in interrupt
Call Trace:
[c0000000dafa6ce0] [c00000000001d068] .show_stack+0x148/0x384
(unreliable)
[c0000000dafa6dc0] [c000000000bdd208] .dump_stack+0x50/0x78
[c0000000dafa6e50] [c000000000bdd328] .panic+0xf8/0x26c
[c0000000dafa6ef0] [c00000000004a2d8] .die+0x434/0x494
[c0000000dafa6fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
[c0000000dafa7030] [c000000000005704] handle_page_fault+0x3c/0x74
--- Exception: 300 at .update_curr_rt+0x1e8/0x538
    LR = .update_curr_rt+0x4c/0x538
[c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
[c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
[c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
[c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
[c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
[c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
[c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
[c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
--- Exception: 901 at .raw_local_irq_restore+0x168/0x194
    LR = .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
Kernel panic - not syncing: Fatal exception in interrupt
[c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
[c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
[c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
Call Trace:
[c0000000dafc2ce0] [c00000000001d068] .show_stack+0x148/0x384
(unreliable)
[c0000000dafc2dc0] [c000000000bdd208] .dump_stack+0x50/0x78
[c0000000dafc2e50] [c000000000bdd328] .panic+0xf8/0x26c
[c0000000dafc2ef0] [c00000000004a2d8] .die+0x434/0x494
[c0000000dafc2fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
[c0000000dafc3030] [c000000000005704] handle_page_fault+0x3c/0x74
--- Exception: 300 at .update_curr_rt+0x1e8/0x538
    LR = .update_curr_rt+0x4c/0x538
[c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
[c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
[c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
[c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
[c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
[c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
[c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
[c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
--- Exception: 901 at .raw_local_irq_restore+0x168/0x194
    LR = .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
[c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
[c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
[c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
[c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
RTAS: event: 29, Type: Platform Error, Severity: 2
ibm,os-term call failed -1
Rebooting in 180 seconds..
RTAS: event: 30, Type: Platform Error, Severity: 2
ibm,os-term call failed -1
Rebooting in 180 seconds..
========================================================================

Can you please address the following things:
     1. I was not sure which particular CONFIG options to enable when
        building kernel to enable tracing options that these tests would
        require. So, i had enabled most of them while building the
        kernel. Please see the attached config file. In your next
        patch[v3], can you please a bit of documentation on this front
        of what other system requirements are needed to execute these
        tests, including the kernel CONFIG options to be enabled,
     2. So, going by your description, the tests should run on kernel
        greater than 2.6.34. But, on kernel 2.6.35.4 it still creates
        kernel panic. So, is this
             I. a test case issues ?
            II. or, real kernel bug which has not yet being addressed
                till now ?

Regards--
Subrata

> ---
>  runltp                                             |    3 +-
>  runtest/tracing                                    |    2 +
>  testcases/kernel/Makefile                          |    2 +-
>  testcases/kernel/tracing/Makefile                  |    5 +
>  .../kernel/tracing/ftrace_stress_test/Makefile     |    7 +
>  .../ftrace_stress_test/ftrace_get_page_size.c      |   10 +
>  .../ftrace_stress/ftrace_buffer_size.sh            |   43 ++++
>  .../ftrace_stress/ftrace_current_tracer.sh         |   34 +++
>  .../ftrace_stress/ftrace_ftrace_enabled.sh         |   39 ++++
>  .../ftrace_stress/ftrace_profile_enabled.sh        |   50 ++++
>  .../ftrace_stress/ftrace_set_event.sh              |   44 ++++
>  .../ftrace_stress/ftrace_set_ftrace_pid.sh         |   44 ++++
>  .../ftrace_stress/ftrace_stack_max_size.sh         |   39 ++++
>  .../ftrace_stress/ftrace_stack_trace.sh            |   46 ++++
>  .../ftrace_stress/ftrace_trace.sh                  |   27 +++
>  .../ftrace_stress/ftrace_trace_clock.sh            |   46 ++++
>  .../ftrace_stress/ftrace_trace_options.sh          |   42 ++++
>  .../ftrace_stress/ftrace_trace_pipe.sh             |   52 +++++
>  .../ftrace_stress/ftrace_trace_stat.sh             |   45 ++++
>  .../ftrace_stress/ftrace_tracing_enabled.sh        |   39 ++++
>  .../ftrace_stress/ftrace_tracing_max_latency.sh    |   38 +++
>  .../ftrace_stress/ftrace_tracing_on.sh             |   39 ++++
>  .../ftrace_stress_test/ftrace_stress_test.sh       |  237 ++++++++++++++++++++
>  23 files changed, 931 insertions(+), 2 deletions(-)
>  create mode 100644 runtest/tracing
>  create mode 100644 testcases/kernel/tracing/Makefile
>  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/Makefile
>  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
>  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> 
> diff --git a/runltp b/runltp
> index b385984..89b1717 100755
> --- a/runltp
> +++ b/runltp
> @@ -593,7 +593,8 @@ main()
>                           ${LTPROOT}/runtest/numa                    \
>                           ${LTPROOT}/runtest/hugetlb                 \
>                           ${LTPROOT}/runtest/commands                \
> -                         ${LTPROOT}/runtest/hyperthreading
> +                         ${LTPROOT}/runtest/hyperthreading          \
> +                         ${LTPROOT}/runtest/tracing
>          do
>              [ -e "$SCENFILES" ] || \
>              {
> diff --git a/runtest/tracing b/runtest/tracing
> new file mode 100644
> index 0000000..ef3a048
> --- /dev/null
> +++ b/runtest/tracing
> @@ -0,0 +1,2 @@
> +#DESCRIPTION:Tracing testing
> +ftrace-stress-test	ftrace_stress_test.sh 90
> diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
> index e2a9d8e..8c50025 100644
> --- a/testcases/kernel/Makefile
> +++ b/testcases/kernel/Makefile
> @@ -30,7 +30,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
>  ifneq ($(UCLINUX),1)
>  SUBDIRS		:= containers connectors controllers fs hotplug io ipc mem \
>  		   numa performance_counters power_management pty sched \
> -		   security syscalls timers
> +		   security syscalls timers tracing
>  else
>  SUBDIRS		:= syscalls
>  endif
> diff --git a/testcases/kernel/tracing/Makefile b/testcases/kernel/tracing/Makefile
> new file mode 100644
> index 0000000..e9f96c3
> --- /dev/null
> +++ b/testcases/kernel/tracing/Makefile
> @@ -0,0 +1,5 @@
> +top_srcdir		?= ../../..
> +
> +include $(top_srcdir)/include/mk/env_pre.mk
> +
> +include $(top_srcdir)/include/mk/generic_trunk_target.mk
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/Makefile b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> new file mode 100644
> index 0000000..e4a913a
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> @@ -0,0 +1,7 @@
> +top_srcdir              ?= ../../../..
> +
> +include $(top_srcdir)/include/mk/testcases.mk
> +
> +INSTALL_TARGETS         := *.sh ftrace_stress/*
> +
> +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> new file mode 100644
> index 0000000..b52a109
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> @@ -0,0 +1,10 @@
> +#include <unistd.h>
> +#include <stdio.h>
> +
> +int main(void)
> +{
> +	printf("%d\n", getpagesize());
> +
> +	return 0;
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> new file mode 100755
> index 0000000..af5a98e
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> @@ -0,0 +1,43 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=200
> +
> +# Use up to 10% of free memory
> +free_mem=`cat /proc/meminfo | grep '^MemFree' | awk '{ print $2 }'`
> +step=$(( $free_mem / 10 / $LOOP ))
> +if [ $step -eq 0 ]; then
> +	$step=1
> +	LOOP=50
> +fi
> +
> +for ((; ;))
> +{
> +	new_size=1
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> +		new_size=$(( $new_size + $step ))
> +	}
> +
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		new_size=$(( $new_size - $step ))
> +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> new file mode 100755
> index 0000000..88d576f
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> @@ -0,0 +1,34 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=200
> +
> +for ((; ;))
> +{
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		for tracer in `cat "$TRACING_PATH"/available_tracers`
> +		do
> +			if [ "$tracer" = mmiotrace ]; then
> +				continue
> +			fi
> +
> +			echo $tracer > "$TRACING_PATH"/current_tracer 2> /dev/null
> +		done
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> new file mode 100755
> index 0000000..20bb234
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> @@ -0,0 +1,39 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_LOOP=1500
> +count=0
> +
> +for ((; ;))
> +{
> +	count=$(( $count + 1 ))
> +
> +	for ((i = 0; i < $MAX_LOOP; i++))
> +	{
> +		echo 0 > /proc/sys/kernel/ftrace_enabled
> +		echo 1 > /proc/sys/kernel/ftrace_enabled
> +	}
> +
> +	enable=$(( $count % 3 ))
> +
> +	if [ $enable -eq 0 ]; then
> +		echo 1 > /proc/sys/kernel/ftrace_enabled
> +	else
> +		echo 0 > /proc/sys/kernel/ftrace_enabled
> +	fi
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> new file mode 100755
> index 0000000..9c6162a
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> @@ -0,0 +1,50 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_LOOP=1500
> +count=0
> +
> +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> +	should_skip=1
> +else
> +	should_skip=0
> +fi
> +
> +for ((; ;))
> +{
> +	if [ $should_skip -eq 1 ]; then
> +		sleep 2
> +		continue
> +	fi
> +
> +	count=$(( $count + 1 ))
> +
> +	for ((i = 0; i < $MAX_LOOP; i++))
> +	{
> +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> +	}
> +
> +	enable=$(( $count % 3 ))
> +
> +	if [ $enable -eq 0 ]; then
> +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> +	else
> +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> +	fi
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> new file mode 100755
> index 0000000..d7efdd4
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> @@ -0,0 +1,44 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +for ((; ;))
> +{
> +	for ((i = 0; i < 100; i++))
> +	{
> +		echo 1 > "$TRACING_PATH"/events/enable
> +		echo 0 > "$TRACING_PATH"/events/enable
> +	}
> +
> +	for dir in `ls $TRACING_PATH/events/`
> +	do
> +		if [ ! -d $dir -o "$dir" = ftrace ]; then
> +			continue;
> +		fi
> +
> +		for ((i = 0; i < 20; i++))
> +		{
> +			echo 1 > "$TRACING_PATH"/events/$dir/enable
> +			echo 0 > "$TRACING_PATH"/events/$dir/enable
> +		}
> +	done
> +
> +	for event in `cat $TRACING_PATH/available_events`;
> +	do
> +		echo $event >> "$TRACING_PATH"/set_event
> +	done
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> new file mode 100755
> index 0000000..541215c
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> @@ -0,0 +1,44 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=300
> +
> +if [ ! -e "$TRACING_PATH"/set_ftrace_pid ]; then
> +	should_skip=1
> +else
> +	should_skip=0
> +fi
> +
> +for ((; ; ))
> +{
> +	if [ $should_skip -eq 1 ]; then
> +		sleep 2
> +		continue
> +	fi
> +
> +	for ((j = 0; j < $LOOP; j++))
> +	{
> +		for ((k = 1; k <= NR_PIDS; k++))
> +		{
> +			str="\$pid$k"
> +			eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
> +		}
> +
> +		echo > "$TRACING_PATH"/set_ftrace_pid
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> new file mode 100755
> index 0000000..682d05e
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> @@ -0,0 +1,39 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_STACK_SIZE=8192
> +
> +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> +	should_skip=1
> +else
> +	should_skip=0
> +fi
> +
> +for ((; ;))
> +{
> +	if [ $should_skip -eq 1 ]; then
> +		sleep 2
> +		continue
> +	fi
> +
> +	for ((i = 0; i < $MAX_STACK_SIZE; i += 70))
> +	{
> +		echo $i > "$TRACING_PATH"/stack_max_size
> +		cat "$TRACING_PATH"/stack_max_size > /dev/null
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> new file mode 100755
> index 0000000..a406c51
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> @@ -0,0 +1,46 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=400
> +
> +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> +	should_skip=1
> +else
> +	should_skip=0
> +fi
> +
> +for ((; ;))
> +{
> +	if [ $should_skip -eq 1 ]; then
> +		sleep 2
> +		continue
> +	fi
> +
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		cat "$TRACING_PATH"/stack_trace > /dev/null
> +	}
> +
> +	sleep 1
> +
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		echo 0 > /proc/sys/kernel/stack_tracer_enabled
> +		echo 1 > /proc/sys/kernel/stack_tracer_enabled
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> new file mode 100755
> index 0000000..e36712b
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> @@ -0,0 +1,27 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=200
> +
> +for ((; ;))
> +{
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		cat "$TRACING_PATH"/trace > /dev/null
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> new file mode 100755
> index 0000000..de6bbea
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> @@ -0,0 +1,46 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=400
> +
> +# In kernel which is older than 2.6.32, we set global clock
> +# via trace_options.
> +tst_kvercmp 2 6 32
> +if [ $? -eq 0 ]; then
> +        old_kernel=1
> +else
> +        old_kernel=0
> +fi
> +
> +for ((; ;))
> +{
> +	if [ $old_kernel -eq 1 ];
> +	then
> +		for ((i = 0; i < $LOOP; i++))
> +		{
> +			echo 1 > "$TRACING_PATH"/options/global-clock
> +			echo 0 > "$TRACING_PATH"/options/global-clock
> +		}
> +	else
> +		for ((i = 0; i < $LOOP; i++))
> +		{
> +			echo local > "$TRACING_PATH"/trace_clock
> +			echo global > "$TRACING_PATH"/trace_clock
> +		}
> +	fi
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> new file mode 100755
> index 0000000..47d2a62
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> @@ -0,0 +1,42 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=200
> +
> +trace_options=(print-parent sym-offset sym-addr verbose raw hex bin block trace_printk ftrace_preempt branch annotate userstacktrace sym-userobj printk-msg-only context-info latency-format sleep-time graph-time)
> +
> +NR_TRACE_OPTIONS=19
> +
> +for ((; ; ))
> +{
> +	for ((j = 0; j < $LOOP; j++))
> +	{
> +		num=`date +%N`
> +		num=`printf 1%s $num`
> +
> +		for ((i = 0; i < $NR_TRACE_OPTIONS; i++))
> +		{
> +			n=$(( ( $num >> $i ) % 2 ))
> +			if [ $n -eq 0 ]; then
> +				echo 0 > "$TRACING_PATH"/options/${trace_options[$i]}
> +			else
> +				echo 1 > "$TRACING_PATH"/options/${trace_options[$i]}
> +			fi
> +		}
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> new file mode 100755
> index 0000000..47d42bc
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> @@ -0,0 +1,52 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +ftrace_sleep()
> +{
> +	# usleep is not a standard command?
> +	usleep 200000 2> /dev/null
> +	if [ $? -ne 0 ]; then
> +		sleep 1
> +	fi
> +}
> +
> +kill_this_pid()
> +{
> +	/bin/kill -SIGKILL $this_pid
> +	wait $this_pid
> +	exit 0
> +}
> +
> +trap kill_this_pid SIGUSR1
> +
> +LOOP=20
> +
> +for ((; ;))
> +{
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		cat "$TRACING_PATH"/trace_pipe > /dev/null &
> +
> +		this_pid=$!
> +		ftrace_sleep
> +		/bin/kill -SIGINT $this_pid
> +		wait $this_pid
> +		this_pid=0
> +		ftrace_sleep
> +	}
> +
> +	sleep 2
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> new file mode 100755
> index 0000000..cb601db
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> @@ -0,0 +1,45 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +LOOP=200
> +
> +should_skip=0
> +
> +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> +        should_skip=1
> +fi
> +
> +# For kernels older than 2.6.36, this testcase can result in 
> +# divide-by-zero kernel bug
> +tst_kvercmp 2 6 36
> +if [ $? -eq 0 ]; then
> +	should_skip=1
> +fi
> +
> +for ((; ;))
> +{
> +	if [ $should_skip -eq 1 ]; then
> +		sleep 2
> +		continue
> +	fi
> +
> +	for ((i = 0; i < $LOOP; i++))
> +	{
> +		cat "$TRACING_PATH"/trace_stat/function0 > /dev/null 2>&1
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> new file mode 100755
> index 0000000..69f2ae6
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> @@ -0,0 +1,39 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_LOOP=1500
> +count=0
> +
> +for ((; ;))
> +{
> +	count=$(( $count + 1 ))
> +
> +	for ((i = 0; i < $MAX_LOOP; i++))
> +	{
> +		echo 0 > "$TRACING_PATH"/tracing_enabled
> +		echo 1 > "$TRACING_PATH"/tracing_enabled
> +	}
> +
> +	enable=$(( $count % 3 ))
> +
> +	if [ $enable -eq 0 ]; then
> +		echo 0 > "$TRACING_PATH"/tracing_enabled
> +	else
> +		echo 1 > "$TRACING_PATH"/tracing_enabled
> +	fi
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> new file mode 100755
> index 0000000..f19d734
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> @@ -0,0 +1,38 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_LATENCY=100000
> +
> +if [ ! -e "$TRACING_PATH"/tracing_max_latency ]; then
> +        should_skip=1
> +else
> +        should_skip=0
> +fi
> +
> +for ((; ;))
> +{
> +        if [ $should_skip -eq 1 ]; then
> +                sleep 2
> +                continue
> +        fi
> +
> +	for ((i = 0; i < $MAX_LATENCY; i += 400))
> +	{
> +		echo $i > "$TRACING_PATH"/tracing_max_latency
> +	}
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> new file mode 100755
> index 0000000..672c223
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> @@ -0,0 +1,39 @@
> +#! /bin/sh
> +
> +###############################################################################
> +#                                                                             #
> +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> +#                                                                             #
> +# This program is free software; you can redistribute it and/or modify it     #
> +# under the terms of the GNU General Public License as published by the Free  #
> +# Software Foundation; either version 2 of the License, or (at your option)   #
> +# any later version.                                                          #
> +#                                                                             #
> +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> +#                                                                             #
> +###############################################################################
> +
> +MAX_LOOP=1500
> +count=0
> +
> +for ((; ;))
> +{
> +	count=$(( $count + 1 ))
> +
> +	for ((i = 0; i < $MAX_LOOP; i++))
> +	{
> +		echo 0 > "$TRACING_PATH"/tracing_on
> +		echo 1 > "$TRACING_PATH"/tracing_on
> +	}
> +
> +	enable=$(( $count % 3 ))
> +
> +	if [ $enable -eq 0 ]; then
> +		echo 0 > "$TRACING_PATH"/tracing_on
> +	else
> +		echo 1 > "$TRACING_PATH"/tracing_on
> +	fi
> +
> +	sleep 1
> +}
> +
> diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> new file mode 100755
> index 0000000..874268e
> --- /dev/null
> +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> @@ -0,0 +1,237 @@
> +#! /bin/sh
> +
> +################################################################################
> +##                                                                            ##
> +## Copyright (c) 2010 FUJITSU LIMITED                                         ##
> +##                                                                            ##
> +## This program is free software;  you can redistribute it and#or modify      ##
> +## it under the terms of the GNU General Public License as published by       ##
> +## the Free Software Foundation; either version 2 of the License, or          ##
> +## (at your option) any later version.                                        ##
> +##                                                                            ##
> +## This program is distributed in the hope that it will be useful, but        ##
> +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
> +## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
> +## for more details.                                                          ##
> +##                                                                            ##
> +## You should have received a copy of the GNU General Public License          ##
> +## along with this program;  if not, write to the Free Software               ##
> +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
> +##                                                                            ##
> +## Author: Li Zefan <lizf@cn.fujitsu.com>                                     ##
> +##                                                                            ##
> +################################################################################
> +
> +cd $LTPROOT/testcases/bin
> +
> +export TCID="ftrace-stress-test"
> +export TST_TOTAL=1
> +export TST_COUNT=1
> +
> +export TPATH="$PWD"
> +export DEBUGFS_PATH="$PWD/debugfs"
> +export TRACING_PATH="$PWD/debugfs/tracing"
> +export SPATH="$TPATH/ftrace_stress"
> +
> +test_interval=$1
> +
> +save_old_setting()
> +{
> +	cd $TRACING_PATH
> +
> +	old_trace_options=( `cat trace_options` )
> +	old_tracing_on=`cat tracing_on`
> +	old_tracing_enabled=`cat tracing_enabled`
> +	old_buffer_size=`cat buffer_size_kb`
> +
> +	if [ -e stack_max_size ]; then
> +		old_stack_tracer_enabled=`cat /proc/sys/kernel/stack_tracer_enabled`
> +	fi
> +
> +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> +		old_ftrace_enabled=`cat /proc/sys/kernel/ftrace_enabled`
> +	fi
> +
> +	if [ -e "function_profile_enabled" ]; then
> +		old_profile_enabled=`cat function_profile_enabled`
> +	fi
> +
> +	cd - > /dev/null
> +}
> +
> +restore_old_setting()
> +{
> +	cd $TRACING_PATH
> +
> +	echo nop > current_tracer
> +	echo 0 > events/enable
> +	echo 0 > tracing_max_latency 2> /dev/null
> +
> +	if [ -e trace_clock ]; then
> +		echo local > trace_clock
> +	fi
> +
> +	if [ -e "function_pofile_enabled" ]; then
> +		echo $old_profile_enabled > function_profile_enabled
> +	fi
> +
> +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> +		echo $old_ftrace_enabled > /proc/sys/kernel/ftrace_enabled
> +	fi
> +
> +	if [ -e stack_max_size ]; then
> +		echo $old_stack_tracer_enabled > /proc/sys/kernel/stack_tracer_enabled
> +		echo 0 > stack_max_size
> +	fi
> +
> +	echo $old_buffer_size > buffer_size_kb
> +	echo $old_tracing_on > tracing_on
> +	echo $old_tracing_enabled > tracing_enabled
> +
> +	for option in $old_trace_options
> +	do
> +		echo $option > trace_options 2> /dev/null
> +	done
> +
> +	echo > trace
> +
> +	cd - > /dev/null
> +}
> +
> +clean_up()
> +{
> +	kill -KILL $pid1
> +	kill -KILL $pid2
> +	kill -KILL $pid3
> +	kill -KILL $pid4
> +	kill -KILL $pid5
> +	kill -KILL $pid6
> +	kill -KILL $pid7
> +	kill -KILL $pid8
> +	kill -KILL $pid9
> +	kill -KILL $pid10
> +	kill -KILL $pid11
> +	kill -USR1 $pid12
> +	kill -KILL $pid13
> +	kill -KILL $pid14
> +	kill -KILL $pid15
> +	kill -KILL $pid16
> +
> +	sleep 2
> +	restore_old_setting
> +
> +	umount $DEBUGFS_PATH
> +	rmdir $DEBUGFS_PATH
> +}
> +
> +clean_up_exit()
> +{
> +	clean_up
> +	exit 1
> +}
> +
> +export_pids()
> +{
> +	export pid1 pid2 pid3 pid4 pid5 pid6 pid7 pid8 pid9 pid10 pid11 pid12 \
> +		pid13 pid14 pid15 pid16
> +
> +	export NR_PIDS=16
> +}
> +
> +test_begin()
> +{
> +	start_time=`date +%s`
> +}
> +
> +test_wait()
> +{
> +	for ((; ;))
> +	{
> +		sleep 2
> +
> +		cur_time=`date +%s`
> +		elapsed=$(( $cur_time - $start_time ))
> +
> +		# run the stress test for $test_interval secs
> +		if [ $elapsed -ge $test_interval ]; then
> +			break
> +		fi
> +	}
> +}
> +
> +trap clean_up_exit SIGINT
> +
> +# Should be run by root user
> +if [ `id -ru` != 0 ]; then
> +	tst_brkm TCONF ignored "The test should be run by root user. Skip the test..."
> +	exit 0
> +fi
> +
> +# Don't run the test on kernels older than 2.6.34, otherwise
> +# it can crash the system if the kernel is not latest-stable
> +tst_kvercmp 2 6 34
> +if [ $? -eq 0 ]; then
> +	tst_brkm TCONF ignored "The test should be run in kernels >= 2.6.34. Skip the test..."
> +	exit 0
> +fi
> +
> +mkdir $DEBUGFS_PATH
> +mount -t debugfs xxx $DEBUGFS_PATH
> +
> +# Check to see tracing feature is supported or not
> +if [ ! -d $TRACING_PATH ]; then
> +	tst_brkm TCONF ignored "Tracing is not supported. Skip the test..."
> +	umount $DEBUGFS_PATH
> +	rmdir $DEBUGFS_PATH
> +	exit 0
> +fi
> +
> +echo "Ftrace Stress Test Begin"
> +
> +save_old_setting
> +
> +test_begin
> +
> +$SPATH/ftrace_trace_clock.sh &
> +pid1=$!
> +$SPATH/ftrace_current_tracer.sh &
> +pid2=$!
> +$SPATH/ftrace_trace_options.sh &
> +pid3=$!
> +$SPATH/ftrace_tracing_max_latency.sh &
> +pid4=$!
> +$SPATH/ftrace_stack_trace.sh &
> +pid5=$!
> +$SPATH/ftrace_stack_max_size.sh &
> +pid6=$!
> +$SPATH/ftrace_tracing_on.sh &
> +pid7=$!
> +$SPATH/ftrace_tracing_enabled.sh &
> +pid8=$!
> +$SPATH/ftrace_set_event.sh &
> +pid9=$!
> +$SPATH/ftrace_buffer_size.sh &
> +pid10=$!
> +$SPATH/ftrace_trace.sh &
> +pid11=$!
> +$SPATH/ftrace_trace_pipe.sh &
> +pid12=$!
> +$SPATH/ftrace_ftrace_enabled.sh &
> +pid13=$!
> +$SPATH/ftrace_set_ftrace_pid.sh &
> +pid14=$!
> +$SPATH/ftrace_profile_enabled.sh &
> +pid15=$!
> +$SPATH/ftrace_trace_stat.sh &
> +pid16=$!
> +
> +export_pids
> +
> +test_wait
> +
> +clean_up
> +
> +echo "Ftrace Stress Test End"
> +
> +tst_resm TPASS "finished running the test. Run dmesg to double-check for bugs"
> +
> -- 
> 1.6.3
> 
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
> 
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

[-- Attachment #2: 2.6.35.4-config-ppc64 --]
[-- Type: text/plain, Size: 104955 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.4
# Mon Sep 27 16:51:32 2010
#
CONFIG_PPC64=y

#
# Processor support
#
CONFIG_PPC_BOOK3S_64=y
# CONFIG_PPC_BOOK3E_64 is not set
CONFIG_PPC_BOOK3S=y
# CONFIG_POWER4_ONLY is not set
CONFIG_POWER3=y
CONFIG_POWER4=y
CONFIG_TUNE_CELL=y
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_VSX=y
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_STD_MMU_64=y
CONFIG_PPC_MM_SLICES=y
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_PPC_HAVE_PMU_SUPPORT=y
CONFIG_PPC_PERF_CTRS=y
CONFIG_SMP=y
CONFIG_NR_CPUS=128
CONFIG_64BIT=y
CONFIG_WORD_SIZE=64
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
CONFIG_MMU=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_IRQ_PER_CPU=y
CONFIG_NR_IRQS=512
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_ARCH_HAS_ILOG2_U64=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_NO_VIRT_TO_BUS=y
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_COMPAT=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_OF=y
CONFIG_PPC_UDBG_16550=y
CONFIG_GENERIC_TBSYNC=y
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
CONFIG_DTC=y
# CONFIG_DEFAULT_UIMAGE is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_PPC_DCR_NATIVE is not set
CONFIG_PPC_DCR_MMIO=y
CONFIG_PPC_DCR=y
CONFIG_PPC_OF_PLATFORM_PCI=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_TREE_PREEMPT_RCU is not set
# CONFIG_TINY_RCU is not set
CONFIG_RCU_TRACE=y
CONFIG_RCU_FANOUT=64
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_RCU_FAST_NO_HZ is not set
CONFIG_TREE_RCU_TRACE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_NS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_MEM_RES_CTLR=y
CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
CONFIG_MM_OWNER=y
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_LZO=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EMBEDDED is not set
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
CONFIG_OPROFILE=m
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_HAVE_SYSCALL_WRAPPERS=y
CONFIG_KRETPROBES=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y

#
# GCOV-based kernel profiling
#
CONFIG_GCOV_KERNEL=y
CONFIG_GCOV_PROFILE_ALL=y
CONFIG_SLOW_WORK=y
CONFIG_SLOW_WORK_DEBUG=y
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_PREEMPT_NOTIFIERS=y
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
CONFIG_INLINE_SPIN_UNLOCK=y
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_READ_TRYLOCK is not set
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
CONFIG_INLINE_READ_UNLOCK=y
# CONFIG_INLINE_READ_UNLOCK_BH is not set
CONFIG_INLINE_READ_UNLOCK_IRQ=y
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_WRITE_TRYLOCK is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
CONFIG_INLINE_WRITE_UNLOCK=y
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_FREEZER=y
CONFIG_PPC_MSI_BITMAP=y

#
# Platform support
#
CONFIG_PPC_PSERIES=y
CONFIG_PPC_SPLPAR=y
CONFIG_EEH=y
CONFIG_PSERIES_MSI=y
CONFIG_SCANLOG=y
CONFIG_LPARCFG=y
# CONFIG_PPC_SMLPAR is not set
CONFIG_DTL=y
CONFIG_PPC_ISERIES=y

#
# iSeries device drivers
#
CONFIG_VIODASD=m
CONFIG_VIOCD=m
CONFIG_VIOTAPE=m
CONFIG_VIOPATH=y
CONFIG_PPC_PMAC=y
CONFIG_PPC_PMAC64=y
CONFIG_PPC_MAPLE=y
CONFIG_PPC_PASEMI=y

#
# PA Semi PWRficient options
#
CONFIG_PPC_PASEMI_IOMMU=y
# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
CONFIG_PPC_PASEMI_MDIO=m
CONFIG_PPC_PS3=y

#
# PS3 Platform Options
#
CONFIG_PS3_ADVANCED=y
CONFIG_PS3_HTAB_SIZE=20
# CONFIG_PS3_DYNAMIC_DMA is not set
CONFIG_PS3_VUART=y
CONFIG_PS3_PS3AV=y
CONFIG_PS3_SYS_MANAGER=y
CONFIG_PS3_STORAGE=m
CONFIG_PS3_DISK=m
CONFIG_PS3_ROM=m
CONFIG_PS3_FLASH=m
CONFIG_PS3_VRAM=m
CONFIG_PS3_LPM=y
CONFIG_PPC_CELL=y
CONFIG_PPC_CELL_COMMON=y
CONFIG_PPC_CELL_NATIVE=y
CONFIG_PPC_IBM_CELL_BLADE=y
CONFIG_PPC_CELLEB=y
CONFIG_PPC_CELL_QPACE=y
CONFIG_AXON_MSI=y

#
# Cell Broadband Engine options
#
CONFIG_SPU_FS=m
CONFIG_SPU_FS_64K_LS=y
CONFIG_SPU_BASE=y
CONFIG_CBE_RAS=y
CONFIG_PPC_IBM_CELL_RESETBUTTON=y
CONFIG_PPC_IBM_CELL_POWERBUTTON=m
CONFIG_CBE_THERM=m
CONFIG_CBE_CPUFREQ=m
CONFIG_CBE_CPUFREQ_PMI_ENABLE=y
CONFIG_CBE_CPUFREQ_PMI=m
CONFIG_PPC_PMI=m
CONFIG_CBE_CPUFREQ_SPU_GOVERNOR=m
CONFIG_OPROFILE_CELL=y
# CONFIG_PQ2ADS is not set
CONFIG_PPC_NATIVE=y
CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
CONFIG_UDBG_RTAS_CONSOLE=y
CONFIG_PPC_UDBG_BEAT=y
CONFIG_XICS=y
# CONFIG_IPIC is not set
CONFIG_MPIC=y
# CONFIG_MPIC_WEIRD is not set
CONFIG_PPC_I8259=y
CONFIG_U3_DART=y
CONFIG_PPC_RTAS=y
CONFIG_RTAS_ERROR_LOGGING=y
CONFIG_PPC_RTAS_DAEMON=y
CONFIG_RTAS_PROC=y
CONFIG_RTAS_FLASH=y
CONFIG_MMIO_NVRAM=y
CONFIG_MPIC_U3_HT_IRQS=y
CONFIG_MPIC_BROKEN_REGREAD=y
CONFIG_IBMVIO=y
CONFIG_IBMEBUS=y
# CONFIG_PPC_MPC106 is not set
CONFIG_PPC_970_NAP=y
CONFIG_PPC_INDIRECT_IO=y
CONFIG_GENERIC_IOMAP=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_FREQ_DEBUG=y
CONFIG_CPU_FREQ_STAT=m
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPU Frequency drivers
#
CONFIG_CPU_FREQ_PMAC64=y
CONFIG_PPC_PASEMI_CPUFREQ=y
CONFIG_AXON_RAM=m
# CONFIG_FSL_ULI1575 is not set
CONFIG_SIMPLE_GPIO=y

#
# Kernel options
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_SCHED_HRTICK=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
# CONFIG_HAVE_AOUT is not set
CONFIG_BINFMT_MISC=y
CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y
CONFIG_IOMMU_HELPER=y
CONFIG_SWIOTLB=y
CONFIG_HOTPLUG_CPU=y
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_HAS_WALK_MEMORY=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_PHYP_DUMP=y
CONFIG_IRQ_ALL_CPUS=y
CONFIG_SPARSE_IRQ=y
CONFIG_NUMA=y
CONFIG_NODES_SHIFT=8
CONFIG_MAX_ACTIVE_REGIONS=256
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_SYS_SUPPORTS_HUGETLBFS=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_HAVE_MEMORY_PRESENT=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG_SPARSE=y
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_MEMORY_PROBE=y
CONFIG_NODES_SPAN_OTHER_NODES=y
CONFIG_PPC_HAS_HASH_64K=y
CONFIG_PPC_4K_PAGES=y
# CONFIG_PPC_16K_PAGES is not set
# CONFIG_PPC_64K_PAGES is not set
# CONFIG_PPC_256K_PAGES is not set
CONFIG_FORCE_MAX_ZONEORDER=13
CONFIG_SCHED_SMT=y
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
CONFIG_EXTRA_TARGETS=""
CONFIG_ARCH_WANTS_FREEZER_CONTROL=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_VERBOSE is not set
CONFIG_CAN_PM_TRACE=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND_NVS=y
CONFIG_SUSPEND=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_RUNTIME=y
CONFIG_PM_OPS=y
CONFIG_SECCOMP=y
CONFIG_ISA_DMA_API=y

#
# Bus options
#
CONFIG_ZONE_DMA=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
# CONFIG_PPC_INDIRECT_PCI is not set
CONFIG_PPC_PCI_CHOICE=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
CONFIG_PCIE_ECRC=y
CONFIG_PCIEAER_INJECT=m
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_DEBUG is not set
CONFIG_PCI_STUB=y
CONFIG_PCI_IOV=y
CONFIG_PCCARD=y
CONFIG_PCMCIA=y
CONFIG_PCMCIA_LOAD_CIS=y
CONFIG_CARDBUS=y

#
# PC-card bridges
#
CONFIG_YENTA=m
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
CONFIG_PD6729=m
CONFIG_I82092=m
CONFIG_ELECTRA_CF=m
CONFIG_PCCARD_NONSTATIC=y
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_FAKE=m
# CONFIG_HOTPLUG_PCI_CPCI is not set
CONFIG_HOTPLUG_PCI_SHPC=m
CONFIG_HOTPLUG_PCI_RPA=m
CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
# CONFIG_HAS_RAPIDIO is not set
CONFIG_RELOCATABLE=y
CONFIG_PAGE_OFFSET=0xc000000000000000
CONFIG_KERNEL_START=0xc000000000000000
CONFIG_PHYSICAL_START=0x00000000
CONFIG_NET=y
CONFIG_COMPAT_NETLINK_MESSAGES=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_STATISTICS=y
CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=m
CONFIG_NET_KEY_MIGRATE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_ARPD=y
CONFIG_SYN_COOKIES=y
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
CONFIG_INET_LRO=y
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
# CONFIG_DEFAULT_BIC is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_HYBLA is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_VENO is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m
CONFIG_INET6_IPCOMP=m
CONFIG_IPV6_MIP6=m
CONFIG_INET6_XFRM_TUNNEL=m
CONFIG_INET6_TUNNEL=m
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_MODE_BEET=m
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
CONFIG_IPV6_SIT=m
CONFIG_IPV6_SIT_6RD=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=m
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set
CONFIG_IPV6_PIMSM_V2=y
CONFIG_NETLABEL=y
CONFIG_NETWORK_SECMARK=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m
CONFIG_NF_CT_PROTO_GRE=m
CONFIG_NF_CT_PROTO_SCTP=m
CONFIG_NF_CT_PROTO_UDPLITE=m
CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
CONFIG_NF_CONNTRACK_PPTP=m
CONFIG_NF_CONNTRACK_SANE=m
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NETFILTER_TPROXY=m
CONFIG_NETFILTER_XTABLES=y

#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=m
CONFIG_NETFILTER_XT_CONNMARK=m

#
# Xtables targets
#
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
# CONFIG_NETFILTER_XT_TARGET_CT is not set
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
# CONFIG_NETFILTER_XT_TARGET_TEE is not set
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
CONFIG_NETFILTER_XT_TARGET_TRACE=m
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m

#
# Xtables matches
#
CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_HL=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_OSF=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_RECENT=m
CONFIG_NETFILTER_XT_MATCH_SCTP=m
CONFIG_NETFILTER_XT_MATCH_SOCKET=m
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
CONFIG_IP_VS=m
# CONFIG_IP_VS_IPV6 is not set
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12

#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
# CONFIG_IP_VS_PROTO_SCTP is not set

#
# IPVS scheduler
#
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m

#
# IPVS application helper
#
CONFIG_IP_VS_FTP=m

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_NF_CONNTRACK_IPV4=y
# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PROTO_DCCP=m
CONFIG_NF_NAT_PROTO_GRE=m
CONFIG_NF_NAT_PROTO_UDPLITE=m
CONFIG_NF_NAT_PROTO_SCTP=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_AMANDA=m
CONFIG_NF_NAT_PPTP=m
CONFIG_NF_NAT_H323=m
CONFIG_NF_NAT_SIP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_CLUSTERIP=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_SECURITY=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m

#
# IPv6: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV6=m
CONFIG_IP6_NF_QUEUE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_AH=m
CONFIG_IP6_NF_MATCH_EUI64=m
CONFIG_IP6_NF_MATCH_FRAG=m
CONFIG_IP6_NF_MATCH_OPTS=m
CONFIG_IP6_NF_MATCH_HL=m
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
CONFIG_IP6_NF_MATCH_MH=m
CONFIG_IP6_NF_MATCH_RT=m
CONFIG_IP6_NF_TARGET_HL=m
CONFIG_IP6_NF_TARGET_LOG=m
CONFIG_IP6_NF_FILTER=m
CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_MANGLE=m
CONFIG_IP6_NF_RAW=m
CONFIG_IP6_NF_SECURITY=m

#
# DECnet: Netfilter Configuration
#
# CONFIG_DECNET_NF_GRABULATOR is not set
CONFIG_BRIDGE_NF_EBTABLES=m
CONFIG_BRIDGE_EBT_BROUTE=m
CONFIG_BRIDGE_EBT_T_FILTER=m
CONFIG_BRIDGE_EBT_T_NAT=m
CONFIG_BRIDGE_EBT_802_3=m
CONFIG_BRIDGE_EBT_AMONG=m
CONFIG_BRIDGE_EBT_ARP=m
CONFIG_BRIDGE_EBT_IP=m
CONFIG_BRIDGE_EBT_IP6=m
CONFIG_BRIDGE_EBT_LIMIT=m
CONFIG_BRIDGE_EBT_MARK=m
CONFIG_BRIDGE_EBT_PKTTYPE=m
CONFIG_BRIDGE_EBT_STP=m
CONFIG_BRIDGE_EBT_VLAN=m
CONFIG_BRIDGE_EBT_ARPREPLY=m
CONFIG_BRIDGE_EBT_DNAT=m
CONFIG_BRIDGE_EBT_MARK_T=m
CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_ULOG=m
CONFIG_BRIDGE_EBT_NFLOG=m
CONFIG_IP_DCCP=m
CONFIG_INET_DCCP_DIAG=m

#
# DCCP CCIDs Configuration (EXPERIMENTAL)
#
# CONFIG_IP_DCCP_CCID2_DEBUG is not set
CONFIG_IP_DCCP_CCID3=y
# CONFIG_IP_DCCP_CCID3_DEBUG is not set
CONFIG_IP_DCCP_CCID3_RTO=100
CONFIG_IP_DCCP_TFRC_LIB=y

#
# DCCP Kernel Hacking
#
# CONFIG_IP_DCCP_DEBUG is not set
CONFIG_NET_DCCPPROBE=m
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set
CONFIG_SCTP_HMAC_SHA1=y
# CONFIG_SCTP_HMAC_MD5 is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
CONFIG_ATM=m
CONFIG_ATM_CLIP=m
# CONFIG_ATM_CLIP_NO_ICMP is not set
CONFIG_ATM_LANE=m
# CONFIG_ATM_MPOA is not set
CONFIG_ATM_BR2684=m
# CONFIG_ATM_BR2684_IPFILTER is not set
# CONFIG_L2TP is not set
CONFIG_STP=m
CONFIG_GARP=m
CONFIG_BRIDGE=m
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_NET_DSA=y
CONFIG_NET_DSA_TAG_DSA=y
CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_DSA_TAG_TRAILER=y
CONFIG_NET_DSA_MV88E6XXX=y
CONFIG_NET_DSA_MV88E6060=y
CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
CONFIG_NET_DSA_MV88E6131=y
CONFIG_NET_DSA_MV88E6123_61_65=y
CONFIG_VLAN_8021Q=m
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_DECNET=m
CONFIG_DECNET_ROUTER=y
CONFIG_LLC=m
# CONFIG_LLC2 is not set
CONFIG_IPX=m
# CONFIG_IPX_INTERN is not set
CONFIG_ATALK=m
CONFIG_DEV_APPLETALK=m
CONFIG_IPDDP=m
CONFIG_IPDDP_ENCAP=y
CONFIG_IPDDP_DECAP=y
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
CONFIG_WAN_ROUTER=m
CONFIG_PHONET=m
CONFIG_IEEE802154=m
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_ATM=m
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_MULTIQ=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_DRR=m
CONFIG_NET_SCH_INGRESS=m

#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=m
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_FLOW=m
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=m
CONFIG_NET_EMATCH_NBYTE=m
CONFIG_NET_EMATCH_U32=m
CONFIG_NET_EMATCH_META=m
CONFIG_NET_EMATCH_TEXT=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=m
CONFIG_NET_ACT_GACT=m
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_RPS=y

#
# Network testing
#
CONFIG_NET_PKTGEN=m
# CONFIG_NET_TCPPROBE is not set
CONFIG_NET_DROP_MONITOR=y
CONFIG_HAMRADIO=y

#
# Packet Radio protocols
#
CONFIG_AX25=m
CONFIG_AX25_DAMA_SLAVE=y
CONFIG_NETROM=m
CONFIG_ROSE=m

#
# AX.25 network device drivers
#
CONFIG_MKISS=m
CONFIG_6PACK=m
CONFIG_BPQETHER=m
CONFIG_BAYCOM_SER_FDX=m
CONFIG_BAYCOM_SER_HDX=m
CONFIG_BAYCOM_PAR=m
CONFIG_YAM=m
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m

#
# CAN Device Drivers
#
CONFIG_CAN_VCAN=m
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_MSCAN=m
CONFIG_CAN_SJA1000=m
CONFIG_CAN_SJA1000_PLATFORM=m
CONFIG_CAN_SJA1000_OF_PLATFORM=m
CONFIG_CAN_EMS_PCI=m
CONFIG_CAN_KVASER_PCI=m
# CONFIG_CAN_PLX_PCI is not set

#
# CAN USB interfaces
#
CONFIG_CAN_EMS_USB=m
# CONFIG_CAN_DEBUG_DEVICES is not set
CONFIG_IRDA=m

#
# IrDA protocols
#
CONFIG_IRLAN=m
CONFIG_IRNET=m
CONFIG_IRCOMM=m
# CONFIG_IRDA_ULTRA is not set

#
# IrDA options
#
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set

#
# Infrared-port device drivers
#

#
# SIR device drivers
#
CONFIG_IRTTY_SIR=m

#
# Dongle support
#
CONFIG_DONGLE=y
CONFIG_ESI_DONGLE=m
CONFIG_ACTISYS_DONGLE=m
CONFIG_TEKRAM_DONGLE=m
CONFIG_TOIM3232_DONGLE=m
CONFIG_LITELINK_DONGLE=m
CONFIG_MA600_DONGLE=m
CONFIG_GIRBIL_DONGLE=m
CONFIG_MCP2120_DONGLE=m
CONFIG_OLD_BELKIN_DONGLE=m
CONFIG_ACT200L_DONGLE=m
CONFIG_KINGSUN_DONGLE=m
CONFIG_KSDAZZLE_DONGLE=m
CONFIG_KS959_DONGLE=m

#
# FIR device drivers
#
CONFIG_USB_IRDA=m
CONFIG_SIGMATEL_FIR=m
CONFIG_NSC_FIR=m
CONFIG_WINBOND_FIR=m
CONFIG_SMC_IRCC_FIR=m
CONFIG_ALI_FIR=m
CONFIG_VLSI_FIR=m
CONFIG_VIA_FIR=m
CONFIG_MCS_FIR=m
CONFIG_BT=m
CONFIG_BT_L2CAP=m
# CONFIG_BT_L2CAP_EXT_FEATURES is not set
CONFIG_BT_SCO=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_CMTP=m
CONFIG_BT_HIDP=m

#
# Bluetooth device drivers
#
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIBCM203X=m
CONFIG_BT_HCIBPA10X=m
CONFIG_BT_HCIBFUSB=m
CONFIG_BT_HCIDTL1=m
CONFIG_BT_HCIBT3C=m
CONFIG_BT_HCIBLUECARD=m
CONFIG_BT_HCIBTUART=m
CONFIG_BT_HCIVHCI=m
CONFIG_BT_MRVL=m
CONFIG_BT_MRVL_SDIO=m
CONFIG_BT_ATH3K=m
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=m
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
# CONFIG_MAC80211_RC_DEFAULT_PID is not set
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel"
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
# CONFIG_MAC80211_DEBUG_MENU is not set
CONFIG_WIMAX=m
CONFIG_WIMAX_DEBUG_LEVEL=8
CONFIG_RFKILL=m
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
CONFIG_NET_9P=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_NET_9P_RDMA=m
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
CONFIG_DEBUG_DEVRES=y
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
CONFIG_MTD=m
# CONFIG_MTD_DEBUG is not set
# CONFIG_MTD_TESTS is not set
CONFIG_MTD_CONCAT=m
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=m
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
CONFIG_MTD_OF_PARTS=m
CONFIG_MTD_AR7_PARTS=m

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=m
CONFIG_MTD_BLKDEVS=m
CONFIG_MTD_BLOCK=m
CONFIG_MTD_BLOCK_RO=m
CONFIG_FTL=m
CONFIG_NFTL=m
CONFIG_NFTL_RW=y
CONFIG_INFTL=m
CONFIG_RFD_FTL=m
CONFIG_SSFDC=m
# CONFIG_SM_FTL is not set
CONFIG_MTD_OOPS=m

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=m
CONFIG_MTD_JEDECPROBE=m
CONFIG_MTD_GEN_PROBE=m
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=m
CONFIG_MTD_CFI_AMDSTD=m
CONFIG_MTD_CFI_STAA=m
CONFIG_MTD_CFI_UTIL=m
CONFIG_MTD_RAM=m
CONFIG_MTD_ROM=m
CONFIG_MTD_ABSENT=m

#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
# CONFIG_MTD_PHYSMAP is not set
CONFIG_MTD_PHYSMAP_OF=m
CONFIG_MTD_PCI=m
# CONFIG_MTD_PCMCIA is not set
# CONFIG_MTD_GPIO_ADDR is not set
# CONFIG_MTD_INTEL_VR_NOR is not set
# CONFIG_MTD_PLATRAM is not set

#
# Self-contained MTD device drivers
#
CONFIG_MTD_PMC551=m
# CONFIG_MTD_PMC551_BUGFIX is not set
# CONFIG_MTD_PMC551_DEBUG is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
CONFIG_MTD_MTDRAM=m
CONFIG_MTDRAM_TOTAL_SIZE=4096
CONFIG_MTDRAM_ERASE_SIZE=128
CONFIG_MTD_BLOCK2MTD=m

#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
CONFIG_MTD_NAND_ECC=m
CONFIG_MTD_NAND_ECC_SMC=y
CONFIG_MTD_NAND=m
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
# CONFIG_MTD_SM_COMMON is not set
# CONFIG_MTD_NAND_MUSEUM_IDS is not set
# CONFIG_MTD_NAND_DENALI is not set
CONFIG_MTD_NAND_DENALI_SCRATCH_REG_ADDR=0xFF108018
CONFIG_MTD_NAND_IDS=m
# CONFIG_MTD_NAND_RICOH is not set
CONFIG_MTD_NAND_DISKONCHIP=m
# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
# CONFIG_MTD_NAND_CAFE is not set
CONFIG_MTD_NAND_PASEMI=m
CONFIG_MTD_NAND_NANDSIM=m
# CONFIG_MTD_NAND_PLATFORM is not set
CONFIG_MTD_ALAUDA=m
# CONFIG_MTD_NAND_FSL_ELBC is not set
# CONFIG_MTD_ONENAND is not set

#
# LPDDR flash memory drivers
#
CONFIG_MTD_LPDDR=m
CONFIG_MTD_QINFO_PROBE=m

#
# UBI - Unsorted block images
#
CONFIG_MTD_UBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set

#
# UBI debugging options
#
# CONFIG_MTD_UBI_DEBUG is not set
CONFIG_OF_FLATTREE=y
CONFIG_OF_DYNAMIC=y
CONFIG_OF_DEVICE=y
CONFIG_OF_GPIO=y
CONFIG_OF_I2C=y
CONFIG_OF_MDIO=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_PC_PCMCIA=m
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_FD=m
CONFIG_PARIDE=m

#
# Parallel IDE high-level drivers
#
CONFIG_PARIDE_PD=m
CONFIG_PARIDE_PCD=m
CONFIG_PARIDE_PF=m
CONFIG_PARIDE_PT=m
CONFIG_PARIDE_PG=m

#
# Parallel IDE protocol modules
#
CONFIG_PARIDE_ATEN=m
CONFIG_PARIDE_BPCK=m
CONFIG_PARIDE_COMM=m
CONFIG_PARIDE_DSTR=m
CONFIG_PARIDE_FIT2=m
CONFIG_PARIDE_FIT3=m
CONFIG_PARIDE_EPAT=m
CONFIG_PARIDE_EPATC8=y
CONFIG_PARIDE_EPIA=m
CONFIG_PARIDE_FRIQ=m
CONFIG_PARIDE_FRPW=m
CONFIG_PARIDE_KBIC=m
CONFIG_PARIDE_KTTI=m
CONFIG_PARIDE_ON20=m
CONFIG_PARIDE_ON26=m
CONFIG_BLK_CPQ_CISS_DA=m
CONFIG_CISS_SCSI_TAPE=y
CONFIG_BLK_DEV_DAC960=m
CONFIG_BLK_DEV_UMEM=m
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_DRBD=m
# CONFIG_DRBD_FAULT_INJECTION is not set
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_OSD=m
CONFIG_BLK_DEV_SX8=m
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
CONFIG_ATA_OVER_ETH=m
CONFIG_VIRTIO_BLK=m
# CONFIG_BLK_DEV_HD is not set
CONFIG_MISC_DEVICES=y
# CONFIG_AD525X_DPOT is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
CONFIG_TIFM_CORE=m
CONFIG_TIFM_7XX1=m
CONFIG_ICS932S401=m
CONFIG_ENCLOSURE_SERVICES=m
# CONFIG_HP_ILO is not set
CONFIG_ISL29003=m
CONFIG_SENSORS_TSL2550=m
# CONFIG_DS1682 is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
CONFIG_EEPROM_AT24=m
CONFIG_EEPROM_LEGACY=m
CONFIG_EEPROM_MAX6875=m
CONFIG_EEPROM_93CX6=m
CONFIG_CB710_CORE=m
# CONFIG_CB710_DEBUG is not set
CONFIG_CB710_DEBUG_ASSUMPTIONS=y
CONFIG_IWMC3200TOP=m
# CONFIG_IWMC3200TOP_DEBUG is not set
CONFIG_IWMC3200TOP_DEBUGFS=y
CONFIG_HAVE_IDE=y
CONFIG_IDE=y

#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_XFER_MODE=y
CONFIG_IDE_TIMINGS=y
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_IDE_GD=y
CONFIG_IDE_GD_ATA=y
CONFIG_IDE_GD_ATAPI=y
# CONFIG_BLK_DEV_IDECS is not set
CONFIG_BLK_DEV_DELKIN=m
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_IDE_TASK_IOCTL=y
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
# CONFIG_BLK_DEV_PLATFORM is not set
CONFIG_BLK_DEV_IDEDMA_SFF=y

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_IDEPCI_PCIBUS_ORDER is not set
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
CONFIG_BLK_DEV_IT8172=m
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SL82C105 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_BLK_DEV_CELLEB is not set
CONFIG_BLK_DEV_IDE_PMAC=y
CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
CONFIG_BLK_DEV_IDEDMA=y

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_RAID_ATTRS=m
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_CHR_DEV_SCH=m
CONFIG_SCSI_ENCLOSURE=m
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=m
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_FC_TGT_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_SAS_HOST_SMP=y
# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
CONFIG_SCSI_SRP_ATTRS=m
CONFIG_SCSI_SRP_TGT_ATTRS=y
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=m
CONFIG_SCSI_CXGB3_ISCSI=m
CONFIG_SCSI_BNX2_ISCSI=m
CONFIG_BE2ISCSI=m
CONFIG_BLK_DEV_3W_XXXX_RAID=m
CONFIG_SCSI_HPSA=m
CONFIG_SCSI_3W_9XXX=m
CONFIG_SCSI_3W_SAS=m
CONFIG_SCSI_ACARD=m
CONFIG_SCSI_AACRAID=m
CONFIG_SCSI_AIC7XXX=m
CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
CONFIG_AIC7XXX_DEBUG_MASK=0
# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
CONFIG_SCSI_AIC7XXX_OLD=m
CONFIG_SCSI_AIC79XX=m
CONFIG_AIC79XX_CMDS_PER_DEVICE=4
CONFIG_AIC79XX_RESET_DELAY_MS=15000
# CONFIG_AIC79XX_DEBUG_ENABLE is not set
CONFIG_AIC79XX_DEBUG_MASK=0
# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
CONFIG_SCSI_AIC94XX=m
# CONFIG_AIC94XX_DEBUG is not set
CONFIG_SCSI_MVSAS=m
# CONFIG_SCSI_MVSAS_DEBUG is not set
CONFIG_SCSI_ARCMSR=m
CONFIG_SCSI_ARCMSR_AER=y
CONFIG_MEGARAID_NEWGEN=y
CONFIG_MEGARAID_MM=m
CONFIG_MEGARAID_MAILBOX=m
CONFIG_MEGARAID_LEGACY=m
CONFIG_MEGARAID_SAS=m
CONFIG_SCSI_MPT2SAS=m
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
CONFIG_SCSI_MPT2SAS_LOGGING=y
CONFIG_SCSI_HPTIOP=m
CONFIG_LIBFC=m
CONFIG_LIBFCOE=m
CONFIG_FCOE=m
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
CONFIG_SCSI_GDTH=m
# CONFIG_SCSI_IPS is not set
CONFIG_SCSI_IBMVSCSI=m
CONFIG_SCSI_IBMVSCSIS=m
CONFIG_SCSI_IBMVFC=m
CONFIG_SCSI_IBMVFC_TRACE=y
CONFIG_SCSI_INITIO=m
CONFIG_SCSI_INIA100=m
CONFIG_SCSI_PPA=m
CONFIG_SCSI_IMM=m
# CONFIG_SCSI_IZIP_EPP16 is not set
# CONFIG_SCSI_IZIP_SLOW_CTR is not set
CONFIG_SCSI_STEX=m
CONFIG_SCSI_SYM53C8XX_2=m
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
CONFIG_SCSI_SYM53C8XX_MMIO=y
CONFIG_SCSI_IPR=m
CONFIG_SCSI_IPR_TRACE=y
CONFIG_SCSI_IPR_DUMP=y
CONFIG_SCSI_QLOGIC_1280=m
CONFIG_SCSI_QLA_FC=m
CONFIG_SCSI_QLA_ISCSI=m
CONFIG_SCSI_LPFC=m
# CONFIG_SCSI_LPFC_DEBUG_FS is not set
CONFIG_SCSI_DC395x=m
# CONFIG_SCSI_DC390T is not set
CONFIG_SCSI_DEBUG=m
CONFIG_SCSI_PMCRAID=m
CONFIG_SCSI_PM8001=m
CONFIG_SCSI_SRP=m
CONFIG_SCSI_BFA_FC=m
CONFIG_SCSI_LOWLEVEL_PCMCIA=y
# CONFIG_PCMCIA_FDOMAIN is not set
CONFIG_PCMCIA_QLOGIC=m
CONFIG_PCMCIA_SYM53C500=m
CONFIG_SCSI_DH=y
CONFIG_SCSI_DH_RDAC=m
CONFIG_SCSI_DH_HP_SW=m
CONFIG_SCSI_DH_EMC=m
CONFIG_SCSI_DH_ALUA=m
CONFIG_SCSI_OSD_INITIATOR=m
CONFIG_SCSI_OSD_ULD=m
CONFIG_SCSI_OSD_DPRINT_SENSE=1
# CONFIG_SCSI_OSD_DEBUG is not set
CONFIG_ATA=y
CONFIG_ATA_NONSTANDARD=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
# CONFIG_SATA_AHCI_PLATFORM is not set
CONFIG_SATA_INIC162X=m
CONFIG_SATA_SIL24=m
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
CONFIG_PDC_ADMA=m
CONFIG_SATA_QSTOR=m
CONFIG_SATA_SX4=m
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y
CONFIG_SATA_MV=m
CONFIG_SATA_NV=m
CONFIG_SATA_PROMISE=m
CONFIG_SATA_SIL=m
CONFIG_SATA_SIS=m
CONFIG_SATA_SVW=m
CONFIG_SATA_ULI=m
CONFIG_SATA_VIA=m
CONFIG_SATA_VITESSE=m

#
# PATA SFF controllers with BMDMA
#
CONFIG_PATA_ALI=m
CONFIG_PATA_AMD=m
CONFIG_PATA_ARTOP=m
CONFIG_PATA_ATIIXP=m
CONFIG_PATA_ATP867X=m
CONFIG_PATA_CMD64X=m
CONFIG_PATA_CS5520=m
CONFIG_PATA_CS5530=m
CONFIG_PATA_CYPRESS=m
CONFIG_PATA_EFAR=m
CONFIG_PATA_HPT366=m
CONFIG_PATA_HPT37X=m
CONFIG_PATA_HPT3X2N=m
CONFIG_PATA_HPT3X3=m
# CONFIG_PATA_HPT3X3_DMA is not set
CONFIG_PATA_IT8213=m
CONFIG_PATA_IT821X=m
CONFIG_PATA_JMICRON=m
CONFIG_PATA_MACIO=m
CONFIG_PATA_MARVELL=m
CONFIG_PATA_NETCELL=m
CONFIG_PATA_NINJA32=m
CONFIG_PATA_NS87415=m
CONFIG_PATA_OLDPIIX=m
CONFIG_PATA_OPTIDMA=m
CONFIG_PATA_PDC2027X=m
CONFIG_PATA_PDC_OLD=m
# CONFIG_PATA_RADISYS is not set
CONFIG_PATA_RDC=m
# CONFIG_PATA_SC1200 is not set
CONFIG_PATA_SCC=m
CONFIG_PATA_SCH=m
CONFIG_PATA_SERVERWORKS=m
CONFIG_PATA_SIL680=m
CONFIG_PATA_SIS=m
CONFIG_PATA_TOSHIBA=m
CONFIG_PATA_TRIFLEX=m
CONFIG_PATA_VIA=m
CONFIG_PATA_WINBOND=m

#
# PIO-only SFF controllers
#
CONFIG_PATA_CMD640_PCI=m
CONFIG_PATA_MPIIX=m
CONFIG_PATA_NS87410=m
CONFIG_PATA_OPTI=m
CONFIG_PATA_PCMCIA=m
CONFIG_PATA_PLATFORM=m
CONFIG_PATA_OF_PLATFORM=m
# CONFIG_PATA_RZ1000 is not set

#
# Generic fallback / legacy drivers
#
CONFIG_ATA_GENERIC=m
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
# CONFIG_MULTICORE_RAID456 is not set
CONFIG_MD_RAID6_PQ=m
CONFIG_ASYNC_RAID6_TEST=m
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=y
CONFIG_DM_DEBUG=y
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_MIRROR=y
CONFIG_DM_LOG_USERSPACE=m
CONFIG_DM_ZERO=y
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_QL=m
CONFIG_DM_MULTIPATH_ST=m
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_FC=m
CONFIG_FUSION_SAS=m
CONFIG_FUSION_MAX_SGE=40
CONFIG_FUSION_CTL=m
CONFIG_FUSION_LAN=m
CONFIG_FUSION_LOGGING=y

#
# IEEE 1394 (FireWire) support
#

#
# You can enable one or both FireWire driver stacks.
#

#
# The newer stack is recommended.
#
CONFIG_FIREWIRE=m
CONFIG_FIREWIRE_OHCI=m
CONFIG_FIREWIRE_OHCI_DEBUG=y
CONFIG_FIREWIRE_SBP2=m
CONFIG_FIREWIRE_NET=m
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_ADB_PMU=y
CONFIG_ADB_PMU_LED=y
CONFIG_ADB_PMU_LED_IDE=y
CONFIG_PMAC_SMU=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_THERM_PM72=y
CONFIG_WINDFARM=y
CONFIG_WINDFARM_PM81=y
CONFIG_WINDFARM_PM91=y
CONFIG_WINDFARM_PM112=y
CONFIG_WINDFARM_PM121=y
CONFIG_PMAC_RACKMETER=m
CONFIG_NETDEVICES=y
CONFIG_IFB=m
CONFIG_DUMMY=m
CONFIG_BONDING=m
CONFIG_MACVLAN=m
# CONFIG_MACVTAP is not set
CONFIG_EQUALIZER=m
CONFIG_TUN=m
CONFIG_VETH=m
# CONFIG_ARCNET is not set
CONFIG_PHYLIB=y

#
# MII PHY device drivers
#
CONFIG_MARVELL_PHY=m
CONFIG_DAVICOM_PHY=m
CONFIG_QSEMI_PHY=m
CONFIG_LXT_PHY=m
CONFIG_CICADA_PHY=m
CONFIG_VITESSE_PHY=m
CONFIG_SMSC_PHY=m
CONFIG_BROADCOM_PHY=m
CONFIG_ICPLUS_PHY=m
CONFIG_REALTEK_PHY=m
CONFIG_NATIONAL_PHY=m
CONFIG_STE10XP=m
CONFIG_LSI_ET1011C_PHY=m
# CONFIG_MICREL_PHY is not set
CONFIG_FIXED_PHY=y
CONFIG_MDIO_BITBANG=m
CONFIG_MDIO_GPIO=m
CONFIG_NET_ETHERNET=y
CONFIG_MII=m
CONFIG_HAPPYMEAL=m
CONFIG_SUNGEM=m
CONFIG_CASSINI=m
CONFIG_NET_VENDOR_3COM=y
CONFIG_VORTEX=m
CONFIG_TYPHOON=m
CONFIG_ETHOC=m
CONFIG_DNET=m
CONFIG_NET_TULIP=y
CONFIG_DE2104X=m
CONFIG_DE2104X_DSL=0
CONFIG_TULIP=m
# CONFIG_TULIP_MWI is not set
CONFIG_TULIP_MMIO=y
# CONFIG_TULIP_NAPI is not set
CONFIG_DE4X5=m
CONFIG_WINBOND_840=m
CONFIG_DM9102=m
CONFIG_ULI526X=m
CONFIG_PCMCIA_XIRCOM=m
# CONFIG_HP100 is not set
CONFIG_IBMVETH=m
CONFIG_IBM_NEW_EMAC=m
CONFIG_IBM_NEW_EMAC_RXB=128
CONFIG_IBM_NEW_EMAC_TXB=64
CONFIG_IBM_NEW_EMAC_POLL_WEIGHT=32
CONFIG_IBM_NEW_EMAC_RX_COPY_THRESHOLD=256
CONFIG_IBM_NEW_EMAC_RX_SKB_HEADROOM=0
# CONFIG_IBM_NEW_EMAC_DEBUG is not set
CONFIG_IBM_NEW_EMAC_ZMII=y
CONFIG_IBM_NEW_EMAC_RGMII=y
CONFIG_IBM_NEW_EMAC_TAH=y
CONFIG_IBM_NEW_EMAC_EMAC4=y
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
CONFIG_PCNET32=m
CONFIG_AMD8111_ETH=m
CONFIG_ADAPTEC_STARFIRE=m
# CONFIG_KSZ884X_PCI is not set
CONFIG_B44=m
CONFIG_B44_PCI_AUTOSELECT=y
CONFIG_B44_PCICORE_AUTOSELECT=y
CONFIG_B44_PCI=y
CONFIG_FORCEDETH=m
CONFIG_E100=m
CONFIG_FEALNX=m
CONFIG_NATSEMI=m
CONFIG_NE2K_PCI=m
CONFIG_8139CP=m
CONFIG_8139TOO=m
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
CONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not set
CONFIG_R6040=m
CONFIG_SIS900=m
CONFIG_EPIC100=m
CONFIG_SMSC9420=m
CONFIG_SUNDANCE=m
# CONFIG_SUNDANCE_MMIO is not set
CONFIG_TLAN=m
# CONFIG_KS8842 is not set
# CONFIG_KS8851_MLL is not set
CONFIG_VIA_RHINE=m
CONFIG_VIA_RHINE_MMIO=y
CONFIG_SC92031=m
CONFIG_NET_POCKET=y
CONFIG_DE600=m
CONFIG_DE620=m
CONFIG_ATL2=m
CONFIG_NETDEV_1000=y
CONFIG_ACENIC=m
# CONFIG_ACENIC_OMIT_TIGON_I is not set
CONFIG_DL2K=m
CONFIG_E1000=m
CONFIG_E1000E=m
CONFIG_IP1000=m
CONFIG_IGB=m
CONFIG_IGBVF=m
CONFIG_NS83820=m
CONFIG_HAMACHI=m
CONFIG_YELLOWFIN=m
CONFIG_R8169=m
CONFIG_R8169_VLAN=y
CONFIG_SIS190=m
CONFIG_SKGE=m
# CONFIG_SKGE_DEBUG is not set
CONFIG_SKY2=m
# CONFIG_SKY2_DEBUG is not set
CONFIG_VIA_VELOCITY=m
CONFIG_TIGON3=m
CONFIG_BNX2=m
CONFIG_CNIC=m
CONFIG_SPIDER_NET=m
CONFIG_GELIC_NET=m
CONFIG_GELIC_WIRELESS=y
# CONFIG_XILINX_LL_TEMAC is not set
CONFIG_QLA3XXX=m
CONFIG_ATL1=m
CONFIG_ATL1E=m
CONFIG_ATL1C=m
CONFIG_JME=m
CONFIG_NETDEV_10000=y
CONFIG_MDIO=m
CONFIG_CHELSIO_T1=m
CONFIG_CHELSIO_T1_1G=y
CONFIG_CHELSIO_T3_DEPENDS=y
CONFIG_CHELSIO_T3=m
CONFIG_CHELSIO_T4_DEPENDS=y
# CONFIG_CHELSIO_T4 is not set
CONFIG_EHEA=m
CONFIG_ENIC=m
CONFIG_IXGBE=m
CONFIG_IXGBE_DCB=y
# CONFIG_IXGBEVF is not set
CONFIG_IXGB=m
CONFIG_S2IO=m
CONFIG_VXGE=m
CONFIG_VXGE_DEBUG_TRACE_ALL=y
CONFIG_MYRI10GE=m
CONFIG_NETXEN_NIC=m
CONFIG_NIU=m
CONFIG_PASEMI_MAC=m
CONFIG_MLX4_EN=m
CONFIG_MLX4_CORE=m
CONFIG_MLX4_DEBUG=y
CONFIG_TEHUTI=m
CONFIG_BNX2X=m
# CONFIG_QLCNIC is not set
CONFIG_QLGE=m
CONFIG_SFC=m
CONFIG_SFC_MTD=y
CONFIG_BE2NET=m
# CONFIG_TR is not set
CONFIG_WLAN=y
# CONFIG_PCMCIA_RAYCS is not set
CONFIG_LIBERTAS_THINFIRM=m
# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set
CONFIG_LIBERTAS_THINFIRM_USB=m
CONFIG_AIRO=m
CONFIG_ATMEL=m
CONFIG_PCI_ATMEL=m
CONFIG_PCMCIA_ATMEL=m
CONFIG_AT76C50X_USB=m
CONFIG_AIRO_CS=m
CONFIG_PCMCIA_WL3501=m
# CONFIG_PRISM54 is not set
CONFIG_USB_ZD1201=m
CONFIG_USB_NET_RNDIS_WLAN=m
CONFIG_RTL8180=m
CONFIG_RTL8187=m
CONFIG_RTL8187_LEDS=y
CONFIG_ADM8211=m
CONFIG_MAC80211_HWSIM=m
CONFIG_MWL8K=m
CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG is not set
CONFIG_ATH5K=m
CONFIG_ATH5K_DEBUG=y
CONFIG_ATH9K_HW=m
CONFIG_ATH9K_COMMON=m
CONFIG_ATH9K=m
CONFIG_ATH9K_DEBUGFS=y
# CONFIG_ATH9K_HTC is not set
CONFIG_AR9170_USB=m
CONFIG_AR9170_LEDS=y
CONFIG_B43=m
CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y
CONFIG_B43_PCMCIA=y
CONFIG_B43_SDIO=y
CONFIG_B43_PIO=y
CONFIG_B43_PHY_LP=y
CONFIG_B43_LEDS=y
CONFIG_B43_HWRNG=y
# CONFIG_B43_DEBUG is not set
CONFIG_B43LEGACY=m
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
CONFIG_B43LEGACY_PCICORE_AUTOSELECT=y
CONFIG_B43LEGACY_LEDS=y
CONFIG_B43LEGACY_HWRNG=y
# CONFIG_B43LEGACY_DEBUG is not set
CONFIG_B43LEGACY_DMA=y
CONFIG_B43LEGACY_PIO=y
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
# CONFIG_B43LEGACY_DMA_MODE is not set
# CONFIG_B43LEGACY_PIO_MODE is not set
CONFIG_HOSTAP=m
CONFIG_HOSTAP_FIRMWARE=y
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
CONFIG_HOSTAP_PLX=m
CONFIG_HOSTAP_PCI=m
CONFIG_HOSTAP_CS=m
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
CONFIG_IWLWIFI=m
CONFIG_IWLWIFI_DEBUG=y
CONFIG_IWLWIFI_DEBUGFS=y
CONFIG_IWLWIFI_DEVICE_TRACING=y
CONFIG_IWLAGN=m
CONFIG_IWL4965=y
CONFIG_IWL5000=y
CONFIG_IWL3945=m
CONFIG_IWM=m
# CONFIG_IWM_DEBUG is not set
CONFIG_IWM_TRACING=y
CONFIG_LIBERTAS=m
CONFIG_LIBERTAS_USB=m
CONFIG_LIBERTAS_CS=m
CONFIG_LIBERTAS_SDIO=m
CONFIG_LIBERTAS_DEBUG=y
# CONFIG_LIBERTAS_MESH is not set
CONFIG_HERMES=m
# CONFIG_HERMES_PRISM is not set
CONFIG_HERMES_CACHE_FW_ON_INIT=y
CONFIG_APPLE_AIRPORT=m
CONFIG_PLX_HERMES=m
CONFIG_TMD_HERMES=m
CONFIG_NORTEL_HERMES=m
CONFIG_PCMCIA_HERMES=m
CONFIG_PCMCIA_SPECTRUM=m
# CONFIG_ORINOCO_USB is not set
CONFIG_P54_COMMON=m
CONFIG_P54_USB=m
CONFIG_P54_PCI=m
CONFIG_P54_LEDS=y
CONFIG_RT2X00=m
CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m
CONFIG_RT61PCI=m
CONFIG_RT2800PCI_PCI=y
CONFIG_RT2800PCI=m
# CONFIG_RT2800PCI_RT30XX is not set
# CONFIG_RT2800PCI_RT35XX is not set
CONFIG_RT2500USB=m
CONFIG_RT73USB=m
CONFIG_RT2800USB=m
# CONFIG_RT2800USB_RT30XX is not set
# CONFIG_RT2800USB_RT35XX is not set
# CONFIG_RT2800USB_UNKNOWN is not set
CONFIG_RT2800_LIB=m
CONFIG_RT2X00_LIB_PCI=m
CONFIG_RT2X00_LIB_USB=m
CONFIG_RT2X00_LIB=m
CONFIG_RT2X00_LIB_HT=y
CONFIG_RT2X00_LIB_FIRMWARE=y
CONFIG_RT2X00_LIB_CRYPTO=y
CONFIG_RT2X00_LIB_LEDS=y
CONFIG_RT2X00_LIB_DEBUGFS=y
# CONFIG_RT2X00_DEBUG is not set
CONFIG_WL12XX=m
CONFIG_WL1251=m
CONFIG_WL1251_SDIO=m
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set

#
# WiMAX Wireless Broadband devices
#
CONFIG_WIMAX_I2400M=m
CONFIG_WIMAX_I2400M_USB=m
CONFIG_WIMAX_I2400M_SDIO=m
CONFIG_WIMAX_IWMC3200_SDIO=y
CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8

#
# USB Network Adapters
#
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_DM9601=m
# CONFIG_USB_NET_SMSC75XX is not set
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_HSO=m
CONFIG_USB_NET_INT51X1=m
CONFIG_USB_CDC_PHONET=m
# CONFIG_USB_IPHETH is not set
# CONFIG_USB_SIERRA_NET is not set
CONFIG_NET_PCMCIA=y
CONFIG_PCMCIA_3C589=m
CONFIG_PCMCIA_3C574=m
CONFIG_PCMCIA_FMVJ18X=m
CONFIG_PCMCIA_PCNET=m
CONFIG_PCMCIA_NMCLAN=m
CONFIG_PCMCIA_SMC91C92=m
CONFIG_PCMCIA_XIRC2PS=m
CONFIG_PCMCIA_AXNET=m
# CONFIG_WAN is not set
CONFIG_ATM_DRIVERS=y
# CONFIG_ATM_DUMMY is not set
CONFIG_ATM_TCP=m
# CONFIG_ATM_LANAI is not set
CONFIG_ATM_ENI=m
# CONFIG_ATM_ENI_DEBUG is not set
# CONFIG_ATM_ENI_TUNE_BURST is not set
# CONFIG_ATM_IDT77252 is not set
# CONFIG_ATM_IA is not set
# CONFIG_ATM_FORE200E is not set
CONFIG_ATM_HE=m
# CONFIG_ATM_HE_USE_SUNI is not set
CONFIG_ATM_SOLOS=m
CONFIG_IEEE802154_DRIVERS=m
CONFIG_IEEE802154_FAKEHARD=m
CONFIG_ISERIES_VETH=m
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
CONFIG_SKFP=m
# CONFIG_HIPPI is not set
CONFIG_PLIP=m
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
# CONFIG_PPP_BSDCOMP is not set
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
CONFIG_PPPOATM=m
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLHC=m
CONFIG_SLIP_SMART=y
# CONFIG_SLIP_MODE_SLIP6 is not set
CONFIG_NET_FC=y
CONFIG_NETCONSOLE=m
CONFIG_NETCONSOLE_DYNAMIC=y
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
CONFIG_VIRTIO_NET=m
CONFIG_VMXNET3=m
CONFIG_ISDN=y
CONFIG_ISDN_I4L=m
CONFIG_ISDN_PPP=y
CONFIG_ISDN_PPP_VJ=y
CONFIG_ISDN_MPP=y
CONFIG_IPPP_FILTER=y
# CONFIG_ISDN_PPP_BSDCOMP is not set
CONFIG_ISDN_AUDIO=y
CONFIG_ISDN_TTY_FAX=y

#
# ISDN feature submodules
#
CONFIG_ISDN_DIVERSION=m

#
# ISDN4Linux hardware drivers
#

#
# Passive cards
#
CONFIG_ISDN_DRV_HISAX=m

#
# D-channel protocol features
#
CONFIG_HISAX_EURO=y
CONFIG_DE_AOC=y
CONFIG_HISAX_NO_SENDCOMPLETE=y
CONFIG_HISAX_NO_LLC=y
CONFIG_HISAX_NO_KEYPAD=y
CONFIG_HISAX_1TR6=y
CONFIG_HISAX_NI1=y
CONFIG_HISAX_MAX_CARDS=8

#
# HiSax supported cards
#
CONFIG_HISAX_16_3=y
CONFIG_HISAX_S0BOX=y
CONFIG_HISAX_AVM_A1_PCMCIA=y
CONFIG_HISAX_ELSA=y
CONFIG_HISAX_DIEHLDIVA=y
CONFIG_HISAX_SEDLBAUER=y
CONFIG_HISAX_NICCY=y
CONFIG_HISAX_BKM_A4T=y
CONFIG_HISAX_SCT_QUADRO=y
CONFIG_HISAX_GAZEL=y
CONFIG_HISAX_W6692=y
CONFIG_HISAX_HFC_SX=y
# CONFIG_HISAX_DEBUG is not set

#
# HiSax PCMCIA card service modules
#
CONFIG_HISAX_SEDLBAUER_CS=m
CONFIG_HISAX_ELSA_CS=m
CONFIG_HISAX_AVM_A1_CS=m
CONFIG_HISAX_TELES_CS=m

#
# HiSax sub driver modules
#
CONFIG_HISAX_ST5481=m
# CONFIG_HISAX_HFCUSB is not set
CONFIG_HISAX_HFC4S8S=m
CONFIG_HISAX_FRITZ_PCIPNP=m

#
# Active cards
#
CONFIG_ISDN_CAPI=m
CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
CONFIG_CAPI_TRACE=y
CONFIG_ISDN_CAPI_MIDDLEWARE=y
CONFIG_ISDN_CAPI_CAPI20=m
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
CONFIG_ISDN_CAPI_CAPIFS=m
CONFIG_ISDN_CAPI_CAPIDRV=m

#
# CAPI hardware drivers
#
CONFIG_CAPI_AVM=y
CONFIG_ISDN_DRV_AVMB1_B1PCI=m
CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
CONFIG_ISDN_DRV_AVMB1_T1PCI=m
CONFIG_ISDN_DRV_AVMB1_C4=m
CONFIG_CAPI_EICON=y
CONFIG_ISDN_DIVAS=m
CONFIG_ISDN_DIVAS_BRIPCI=y
CONFIG_ISDN_DIVAS_PRIPCI=y
CONFIG_ISDN_DIVAS_DIVACAPI=m
CONFIG_ISDN_DIVAS_USERIDI=m
CONFIG_ISDN_DIVAS_MAINT=m
CONFIG_ISDN_DRV_GIGASET=m
CONFIG_GIGASET_CAPI=y
# CONFIG_GIGASET_I4L is not set
# CONFIG_GIGASET_DUMMYLL is not set
CONFIG_GIGASET_BASE=m
CONFIG_GIGASET_M105=m
CONFIG_GIGASET_M101=m
# CONFIG_GIGASET_DEBUG is not set
CONFIG_HYSDN=m
CONFIG_HYSDN_CAPI=y
CONFIG_MISDN=m
CONFIG_MISDN_DSP=m
CONFIG_MISDN_L1OIP=m

#
# mISDN hardware drivers
#
CONFIG_MISDN_HFCPCI=m
CONFIG_MISDN_HFCMULTI=m
CONFIG_MISDN_HFCUSB=m
CONFIG_MISDN_AVMFRITZ=m
CONFIG_MISDN_SPEEDFAX=m
CONFIG_MISDN_INFINEON=m
CONFIG_MISDN_W6692=m
CONFIG_MISDN_NETJET=m
CONFIG_MISDN_IPAC=m
CONFIG_MISDN_ISAR=m
CONFIG_ISDN_HDLC=m
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ADP5588=m
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
CONFIG_KEYBOARD_MAX7359=m
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_KEYBOARD_OPENCORES=m
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_MOUSE_PS2_SENTELIC=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_SERIAL=m
CONFIG_MOUSE_APPLETOUCH=m
CONFIG_MOUSE_BCM5974=m
CONFIG_MOUSE_VSXXXAA=m
# CONFIG_MOUSE_GPIO is not set
CONFIG_MOUSE_SYNAPTICS_I2C=m
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ANALOG=m
CONFIG_JOYSTICK_A3D=m
CONFIG_JOYSTICK_ADI=m
CONFIG_JOYSTICK_COBRA=m
CONFIG_JOYSTICK_GF2K=m
CONFIG_JOYSTICK_GRIP=m
CONFIG_JOYSTICK_GRIP_MP=m
CONFIG_JOYSTICK_GUILLEMOT=m
CONFIG_JOYSTICK_INTERACT=m
CONFIG_JOYSTICK_SIDEWINDER=m
CONFIG_JOYSTICK_TMDC=m
CONFIG_JOYSTICK_IFORCE=m
CONFIG_JOYSTICK_IFORCE_USB=y
CONFIG_JOYSTICK_IFORCE_232=y
CONFIG_JOYSTICK_WARRIOR=m
CONFIG_JOYSTICK_MAGELLAN=m
CONFIG_JOYSTICK_SPACEORB=m
CONFIG_JOYSTICK_SPACEBALL=m
CONFIG_JOYSTICK_STINGER=m
CONFIG_JOYSTICK_TWIDJOY=m
CONFIG_JOYSTICK_ZHENHUA=m
CONFIG_JOYSTICK_DB9=m
CONFIG_JOYSTICK_GAMECON=m
CONFIG_JOYSTICK_TURBOGRAFX=m
CONFIG_JOYSTICK_JOYDUMP=m
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
CONFIG_JOYSTICK_WALKERA0701=m
CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=m
CONFIG_TABLET_USB_AIPTEK=m
CONFIG_TABLET_USB_GTCO=m
CONFIG_TABLET_USB_KBTAB=m
CONFIG_TABLET_USB_WACOM=m
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_AD7879_I2C=m
CONFIG_TOUCHSCREEN_AD7879=m
CONFIG_TOUCHSCREEN_DA9034=m
CONFIG_TOUCHSCREEN_DYNAPRO=m
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
CONFIG_TOUCHSCREEN_EETI=m
CONFIG_TOUCHSCREEN_FUJITSU=m
CONFIG_TOUCHSCREEN_GUNZE=m
CONFIG_TOUCHSCREEN_ELO=m
CONFIG_TOUCHSCREEN_WACOM_W8001=m
CONFIG_TOUCHSCREEN_MCS5000=m
CONFIG_TOUCHSCREEN_MTOUCH=m
CONFIG_TOUCHSCREEN_INEXIO=m
CONFIG_TOUCHSCREEN_MK712=m
CONFIG_TOUCHSCREEN_PENMOUNT=m
CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
CONFIG_TOUCHSCREEN_TOUCHWIN=m
# CONFIG_TOUCHSCREEN_WM97XX is not set
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
CONFIG_TOUCHSCREEN_USB_ITM=y
CONFIG_TOUCHSCREEN_USB_ETURBO=y
CONFIG_TOUCHSCREEN_USB_GUNZE=y
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
CONFIG_TOUCHSCREEN_USB_GOTOP=y
CONFIG_TOUCHSCREEN_USB_JASTEC=y
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
CONFIG_TOUCHSCREEN_USB_ETT_TC5UH=y
CONFIG_TOUCHSCREEN_USB_NEXIO=y
CONFIG_TOUCHSCREEN_TOUCHIT213=m
CONFIG_TOUCHSCREEN_TSC2007=m
# CONFIG_TOUCHSCREEN_TPS6507X is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_PCSPKR is not set
CONFIG_INPUT_ATI_REMOTE=m
CONFIG_INPUT_ATI_REMOTE2=m
CONFIG_INPUT_KEYSPAN_REMOTE=m
CONFIG_INPUT_POWERMATE=m
CONFIG_INPUT_YEALINK=m
CONFIG_INPUT_CM109=m
CONFIG_INPUT_UINPUT=m
# CONFIG_INPUT_PCF8574 is not set
CONFIG_INPUT_GPIO_ROTARY_ENCODER=m

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
CONFIG_SERIO_XILINX_XPS_PS2=m
CONFIG_SERIO_ALTERA_PS2=m
CONFIG_GAMEPORT=m
CONFIG_GAMEPORT_NS558=m
CONFIG_GAMEPORT_L4=m
CONFIG_GAMEPORT_EMU10K1=m
CONFIG_GAMEPORT_FM801=m

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_DEVKMEM is not set
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_COMPUTONE is not set
CONFIG_ROCKETPORT=m
CONFIG_CYCLADES=m
# CONFIG_CYZ_INTR is not set
# CONFIG_DIGIEPCA is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_ISI is not set
CONFIG_SYNCLINK=m
CONFIG_SYNCLINKMP=m
CONFIG_SYNCLINK_GT=m
CONFIG_N_HDLC=m
# CONFIG_N_GSM is not set
# CONFIG_RISCOM8 is not set
# CONFIG_SPECIALIX is not set
# CONFIG_STALDRV is not set
CONFIG_NOZOMI=m

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_CS=m
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_SERIAL_PMACZILOG=m
# CONFIG_SERIAL_PMACZILOG_TTYS is not set
CONFIG_SERIAL_ICOM=m
CONFIG_SERIAL_TXX9=y
CONFIG_HAS_TXX9_SERIAL=y
CONFIG_SERIAL_TXX9_NR_UARTS=6
CONFIG_SERIAL_TXX9_CONSOLE=y
CONFIG_SERIAL_JSM=m
CONFIG_SERIAL_OF_PLATFORM=m
CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL=m
# CONFIG_SERIAL_TIMBERDALE is not set
CONFIG_SERIAL_GRLIB_GAISLER_APBUART=m
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
CONFIG_UNIX98_PTYS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=m
CONFIG_LP_CONSOLE=y
CONFIG_PPDEV=m
CONFIG_HVC_DRIVER=y
CONFIG_HVC_IRQ=y
CONFIG_HVC_CONSOLE=y
CONFIG_HVC_ISERIES=y
CONFIG_HVC_RTAS=y
CONFIG_HVC_BEAT=y
# CONFIG_HVC_UDBG is not set
CONFIG_VIRTIO_CONSOLE=m
CONFIG_HVCS=m
CONFIG_IBM_BSR=m
CONFIG_IPMI_HANDLER=m
# CONFIG_IPMI_PANIC_EVENT is not set
CONFIG_IPMI_DEVICE_INTERFACE=m
CONFIG_IPMI_SI=m
CONFIG_IPMI_WATCHDOG=m
CONFIG_IPMI_POWEROFF=m
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_TIMERIOMEM=m
CONFIG_HW_RANDOM_PASEMI=m
CONFIG_HW_RANDOM_VIRTIO=m
CONFIG_R3964=m
# CONFIG_APPLICOM is not set

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
CONFIG_CARDMAN_4000=m
CONFIG_CARDMAN_4040=m
CONFIG_IPWIRELESS=m
CONFIG_RAW_DRIVER=y
CONFIG_MAX_RAW_DEVS=8192
CONFIG_HANGCHECK_TIMER=m
CONFIG_TCG_TPM=m
# CONFIG_TCG_TIS is not set
CONFIG_TCG_NSC=m
CONFIG_TCG_ATMEL=m
CONFIG_DEVPORT=y
# CONFIG_RAMOOPS is not set
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=m
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_ALGOPCA=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
CONFIG_I2C_NFORCE2=m
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# Mac SMBus host controller drivers
#
CONFIG_I2C_POWERMAC=y

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
CONFIG_I2C_PASEMI=m
CONFIG_I2C_PCA_PLATFORM=m
CONFIG_I2C_SIMTEC=m
# CONFIG_I2C_XILINX is not set

#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_PARPORT=m
CONFIG_I2C_PARPORT_LIGHT=m
# CONFIG_I2C_TAOS_EVM is not set
CONFIG_I2C_TINY_USB=m

#
# Other I2C/SMBus bus drivers
#
CONFIG_I2C_STUB=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_SPI is not set

#
# PPS support
#
CONFIG_PPS=m
# CONFIG_PPS_DEBUG is not set

#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set

#
# Memory mapped GPIO expanders:
#
# CONFIG_GPIO_IT8761E is not set
CONFIG_GPIO_XILINX=y
# CONFIG_GPIO_SCH is not set

#
# I2C GPIO expanders:
#
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
CONFIG_GPIO_PCA953X=m
CONFIG_GPIO_PCF857X=m
# CONFIG_GPIO_ADP5588 is not set

#
# PCI GPIO expanders:
#
# CONFIG_GPIO_CS5535 is not set
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIO_RDC321X is not set

#
# SPI GPIO expanders:
#

#
# AC97 GPIO expanders:
#

#
# MODULbus GPIO expanders:
#
CONFIG_W1=m
CONFIG_W1_CON=y

#
# 1-wire Bus Masters
#
# CONFIG_W1_MASTER_MATROX is not set
CONFIG_W1_MASTER_DS2490=m
CONFIG_W1_MASTER_DS2482=m
# CONFIG_W1_MASTER_GPIO is not set

#
# 1-wire Slaves
#
CONFIG_W1_SLAVE_THERM=m
CONFIG_W1_SLAVE_SMEM=m
CONFIG_W1_SLAVE_DS2431=m
CONFIG_W1_SLAVE_DS2433=m
CONFIG_W1_SLAVE_DS2433_CRC=y
CONFIG_W1_SLAVE_DS2760=m
CONFIG_W1_SLAVE_BQ27000=m
CONFIG_POWER_SUPPLY=m
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
# CONFIG_BATTERY_DS2782 is not set
CONFIG_BATTERY_BQ27x00=m
CONFIG_BATTERY_DA9030=m
CONFIG_BATTERY_MAX17040=m
CONFIG_HWMON=y
CONFIG_HWMON_VID=m
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
CONFIG_SENSORS_AD7414=m
CONFIG_SENSORS_AD7418=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM1025=m
CONFIG_SENSORS_ADM1026=m
CONFIG_SENSORS_ADM1029=m
CONFIG_SENSORS_ADM1031=m
CONFIG_SENSORS_ADM9240=m
# CONFIG_SENSORS_ADT7411 is not set
CONFIG_SENSORS_ADT7462=m
CONFIG_SENSORS_ADT7470=m
CONFIG_SENSORS_ADT7475=m
# CONFIG_SENSORS_ASC7621 is not set
CONFIG_SENSORS_ATXP1=m
CONFIG_SENSORS_DS1621=m
# CONFIG_SENSORS_I5K_AMB is not set
CONFIG_SENSORS_F71805F=m
CONFIG_SENSORS_F71882FG=m
CONFIG_SENSORS_F75375S=m
CONFIG_SENSORS_G760A=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_GL520SM=m
CONFIG_SENSORS_IBMAEM=m
CONFIG_SENSORS_IBMPEX=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM63=m
CONFIG_SENSORS_LM73=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM77=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_LM83=m
CONFIG_SENSORS_LM85=m
CONFIG_SENSORS_LM87=m
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_LM92=m
CONFIG_SENSORS_LM93=m
CONFIG_SENSORS_LTC4215=m
CONFIG_SENSORS_LTC4245=m
CONFIG_SENSORS_LM95241=m
CONFIG_SENSORS_MAX1619=m
CONFIG_SENSORS_MAX6650=m
CONFIG_SENSORS_PC87360=m
CONFIG_SENSORS_PC87427=m
CONFIG_SENSORS_PCF8591=m
CONFIG_SENSORS_SHT15=m
CONFIG_SENSORS_SIS5595=m
CONFIG_SENSORS_DME1737=m
# CONFIG_SENSORS_EMC1403 is not set
CONFIG_SENSORS_SMSC47M1=m
CONFIG_SENSORS_SMSC47M192=m
CONFIG_SENSORS_SMSC47B397=m
CONFIG_SENSORS_ADS7828=m
CONFIG_SENSORS_AMC6821=m
CONFIG_SENSORS_THMC50=m
# CONFIG_SENSORS_TMP102 is not set
CONFIG_SENSORS_TMP401=m
CONFIG_SENSORS_TMP421=m
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_VT1211=m
CONFIG_SENSORS_VT8231=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_W83791D=m
CONFIG_SENSORS_W83792D=m
CONFIG_SENSORS_W83793=m
CONFIG_SENSORS_W83L785TS=m
CONFIG_SENSORS_W83L786NG=m
CONFIG_SENSORS_W83627HF=m
CONFIG_SENSORS_W83627EHF=m
CONFIG_SENSORS_LIS3_I2C=m
CONFIG_THERMAL=y
CONFIG_THERMAL_HWMON=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=m
CONFIG_ALIM7101_WDT=m
CONFIG_WATCHDOG_RTAS=m

#
# PCI-based Watchdog Cards
#
CONFIG_PCIPCWATCHDOG=m
CONFIG_WDTPCI=m

#
# USB-based Watchdog Cards
#
CONFIG_USBPCWATCHDOG=m
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_SSB=m
CONFIG_SSB_SPROM=y
CONFIG_SSB_BLOCKIO=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
CONFIG_SSB_B43_PCI_BRIDGE=y
CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
CONFIG_SSB_PCMCIAHOST=y
CONFIG_SSB_SDIOHOST_POSSIBLE=y
CONFIG_SSB_SDIOHOST=y
# CONFIG_SSB_DEBUG is not set
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_MFD_SUPPORT=y
CONFIG_MFD_CORE=m
# CONFIG_MFD_88PM860X is not set
CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
# CONFIG_HTC_PASIC3 is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_UCB1400_CORE is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_MFD_TC35892 is not set
# CONFIG_MFD_TMIO is not set
CONFIG_PMIC_DA903X=y
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_MAX8925 is not set
CONFIG_MFD_WM8400=m
# CONFIG_MFD_WM831X is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_MFD_TIMBERDALE is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
# CONFIG_REGULATOR_DUMMY is not set
CONFIG_REGULATOR_FIXED_VOLTAGE=m
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
CONFIG_REGULATOR_USERSPACE_CONSUMER=m
CONFIG_REGULATOR_BQ24022=m
CONFIG_REGULATOR_MAX1586=m
# CONFIG_REGULATOR_MAX8649 is not set
CONFIG_REGULATOR_MAX8660=m
CONFIG_REGULATOR_WM8400=m
CONFIG_REGULATOR_DA903X=m
CONFIG_REGULATOR_LP3971=m
CONFIG_REGULATOR_TPS65023=m
CONFIG_REGULATOR_TPS6507X=m
CONFIG_MEDIA_SUPPORT=m

#
# Multimedia core support
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_VIDEO_ALLOW_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_DVB_CORE=m
CONFIG_VIDEO_MEDIA=m

#
# Multimedia drivers
#
CONFIG_VIDEO_SAA7146=m
CONFIG_VIDEO_SAA7146_VV=m
CONFIG_IR_CORE=m
CONFIG_VIDEO_IR=m
CONFIG_RC_MAP=m
CONFIG_IR_NEC_DECODER=m
CONFIG_IR_RC5_DECODER=m
CONFIG_IR_RC6_DECODER=m
CONFIG_IR_JVC_DECODER=m
CONFIG_IR_SONY_DECODER=m
# CONFIG_IR_IMON is not set
CONFIG_MEDIA_ATTACH=y
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_CUSTOMISE=y
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA827X=m
CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_MT2060=m
CONFIG_MEDIA_TUNER_MT2266=m
CONFIG_MEDIA_TUNER_MT2131=m
CONFIG_MEDIA_TUNER_QT1010=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MAX2165=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_V4L1=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_BTCX=m
CONFIG_VIDEO_TVEEPROM=m
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
CONFIG_VIDEO_IR_I2C=m
CONFIG_VIDEO_TVAUDIO=m
CONFIG_VIDEO_TDA7432=m
CONFIG_VIDEO_TDA9840=m
CONFIG_VIDEO_TEA6415C=m
CONFIG_VIDEO_TEA6420=m
CONFIG_VIDEO_MSP3400=m
CONFIG_VIDEO_CS5345=m
CONFIG_VIDEO_CS53L32A=m
CONFIG_VIDEO_M52790=m
CONFIG_VIDEO_WM8775=m
CONFIG_VIDEO_WM8739=m
CONFIG_VIDEO_VP27SMPX=m
CONFIG_VIDEO_SAA6588=m
CONFIG_VIDEO_MT9V011=m
CONFIG_VIDEO_SAA711X=m
CONFIG_VIDEO_SAA717X=m
CONFIG_VIDEO_TVP5150=m
CONFIG_VIDEO_CX25840=m
CONFIG_VIDEO_CX2341X=m
CONFIG_VIDEO_SAA7127=m
CONFIG_VIDEO_UPD64031A=m
CONFIG_VIDEO_UPD64083=m
CONFIG_VIDEO_BT848=m
CONFIG_VIDEO_BT848_DVB=y
CONFIG_VIDEO_BWQCAM=m
CONFIG_VIDEO_CQCAM=m
CONFIG_VIDEO_W9966=m
# CONFIG_VIDEO_CPIA is not set
CONFIG_VIDEO_CPIA2=m
CONFIG_VIDEO_SAA5246A=m
CONFIG_VIDEO_SAA5249=m
CONFIG_VIDEO_SAA7134=m
CONFIG_VIDEO_SAA7134_ALSA=m
CONFIG_VIDEO_SAA7134_DVB=m
CONFIG_VIDEO_MXB=m
CONFIG_VIDEO_HEXIUM_ORION=m
CONFIG_VIDEO_HEXIUM_GEMINI=m
CONFIG_VIDEO_CX88=m
CONFIG_VIDEO_CX88_ALSA=m
CONFIG_VIDEO_CX88_BLACKBIRD=m
CONFIG_VIDEO_CX88_DVB=m
CONFIG_VIDEO_CX88_MPEG=m
CONFIG_VIDEO_CX88_VP3054=m
CONFIG_VIDEO_CX23885=m
CONFIG_VIDEO_AU0828=m
CONFIG_VIDEO_IVTV=m
CONFIG_VIDEO_FB_IVTV=m
CONFIG_VIDEO_CX18=m
# CONFIG_VIDEO_CX18_ALSA is not set
CONFIG_VIDEO_SAA7164=m
# CONFIG_VIDEO_CAFE_CCIC is not set
CONFIG_SOC_CAMERA=m
CONFIG_SOC_CAMERA_MT9M001=m
CONFIG_SOC_CAMERA_MT9M111=m
CONFIG_SOC_CAMERA_MT9T031=m
CONFIG_SOC_CAMERA_MT9T112=m
CONFIG_SOC_CAMERA_MT9V022=m
CONFIG_SOC_CAMERA_RJ54N1=m
CONFIG_SOC_CAMERA_TW9910=m
CONFIG_SOC_CAMERA_PLATFORM=m
CONFIG_SOC_CAMERA_OV772X=m
CONFIG_SOC_CAMERA_OV9640=m
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_USB_M5602=m
CONFIG_USB_STV06XX=m
CONFIG_USB_GL860=m
CONFIG_USB_GSPCA_BENQ=m
CONFIG_USB_GSPCA_CONEX=m
CONFIG_USB_GSPCA_CPIA1=m
CONFIG_USB_GSPCA_ETOMS=m
CONFIG_USB_GSPCA_FINEPIX=m
CONFIG_USB_GSPCA_JEILINJ=m
CONFIG_USB_GSPCA_MARS=m
CONFIG_USB_GSPCA_MR97310A=m
CONFIG_USB_GSPCA_OV519=m
CONFIG_USB_GSPCA_OV534=m
CONFIG_USB_GSPCA_OV534_9=m
CONFIG_USB_GSPCA_PAC207=m
CONFIG_USB_GSPCA_PAC7302=m
CONFIG_USB_GSPCA_PAC7311=m
CONFIG_USB_GSPCA_SN9C2028=m
CONFIG_USB_GSPCA_SN9C20X=m
CONFIG_USB_GSPCA_SONIXB=m
CONFIG_USB_GSPCA_SONIXJ=m
CONFIG_USB_GSPCA_SPCA500=m
CONFIG_USB_GSPCA_SPCA501=m
CONFIG_USB_GSPCA_SPCA505=m
CONFIG_USB_GSPCA_SPCA506=m
CONFIG_USB_GSPCA_SPCA508=m
CONFIG_USB_GSPCA_SPCA561=m
CONFIG_USB_GSPCA_SQ905=m
CONFIG_USB_GSPCA_SQ905C=m
CONFIG_USB_GSPCA_STK014=m
CONFIG_USB_GSPCA_STV0680=m
CONFIG_USB_GSPCA_SUNPLUS=m
CONFIG_USB_GSPCA_T613=m
CONFIG_USB_GSPCA_TV8532=m
CONFIG_USB_GSPCA_VC032X=m
CONFIG_USB_GSPCA_ZC3XX=m
CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
CONFIG_VIDEO_HDPVR=m
CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
# CONFIG_VIDEO_TLG2300 is not set
CONFIG_VIDEO_CX231XX=m
CONFIG_VIDEO_CX231XX_ALSA=m
CONFIG_VIDEO_CX231XX_DVB=m
CONFIG_VIDEO_USBVISION=m
CONFIG_VIDEO_USBVIDEO=m
CONFIG_USB_VICAM=m
CONFIG_USB_IBMCAM=m
CONFIG_USB_KONICAWC=m
# CONFIG_USB_QUICKCAM_MESSENGER is not set
# CONFIG_USB_ET61X251 is not set
# CONFIG_VIDEO_OVCAMCHIP is not set
# CONFIG_USB_OV511 is not set
CONFIG_USB_SE401=m
# CONFIG_USB_SN9C102 is not set
# CONFIG_USB_STV680 is not set
# CONFIG_USB_ZC0301 is not set
CONFIG_USB_PWC=m
# CONFIG_USB_PWC_DEBUG is not set
CONFIG_USB_PWC_INPUT_EVDEV=y
CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
CONFIG_RADIO_ADAPTERS=y
CONFIG_RADIO_GEMTEK_PCI=m
CONFIG_RADIO_MAXIRADIO=m
CONFIG_RADIO_MAESTRO=m
CONFIG_I2C_SI4713=m
CONFIG_RADIO_SI4713=m
CONFIG_USB_DSBR=m
CONFIG_RADIO_SI470X=y
CONFIG_USB_SI470X=m
CONFIG_I2C_SI470X=m
CONFIG_USB_MR800=m
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_RADIO_SAA7706H is not set
# CONFIG_RADIO_TEF6862 is not set
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y
CONFIG_DVB_CAPTURE_DRIVERS=y

#
# Supported SAA7146 based PCI Adapters
#
CONFIG_TTPCI_EEPROM=m
CONFIG_DVB_AV7110=m
CONFIG_DVB_AV7110_OSD=y
CONFIG_DVB_BUDGET_CORE=m
CONFIG_DVB_BUDGET=m
CONFIG_DVB_BUDGET_CI=m
CONFIG_DVB_BUDGET_AV=m
CONFIG_DVB_BUDGET_PATCH=m

#
# Supported USB Adapters
#
CONFIG_DVB_USB=m
# CONFIG_DVB_USB_DEBUG is not set
CONFIG_DVB_USB_A800=m
CONFIG_DVB_USB_DIBUSB_MB=m
# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
CONFIG_DVB_USB_DIBUSB_MC=m
CONFIG_DVB_USB_DIB0700=m
CONFIG_DVB_USB_UMT_010=m
CONFIG_DVB_USB_CXUSB=m
CONFIG_DVB_USB_M920X=m
CONFIG_DVB_USB_GL861=m
CONFIG_DVB_USB_AU6610=m
CONFIG_DVB_USB_DIGITV=m
CONFIG_DVB_USB_VP7045=m
CONFIG_DVB_USB_VP702X=m
CONFIG_DVB_USB_GP8PSK=m
CONFIG_DVB_USB_NOVA_T_USB2=m
CONFIG_DVB_USB_TTUSB2=m
CONFIG_DVB_USB_DTT200U=m
CONFIG_DVB_USB_OPERA1=m
CONFIG_DVB_USB_AF9005=m
CONFIG_DVB_USB_AF9005_REMOTE=m
CONFIG_DVB_USB_DW2102=m
CONFIG_DVB_USB_CINERGY_T2=m
CONFIG_DVB_USB_ANYSEE=m
CONFIG_DVB_USB_DTV5100=m
CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_USB_FRIIO=m
CONFIG_DVB_USB_EC168=m
# CONFIG_DVB_USB_AZ6027 is not set
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
CONFIG_SMS_SIANO_MDTV=m

#
# Siano module components
#
CONFIG_SMS_USB_DRV=m
CONFIG_SMS_SDIO_DRV=m

#
# Supported FlexCopII (B2C2) Adapters
#
CONFIG_DVB_B2C2_FLEXCOP=m
CONFIG_DVB_B2C2_FLEXCOP_PCI=m
CONFIG_DVB_B2C2_FLEXCOP_USB=m
# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set

#
# Supported BT878 Adapters
#
CONFIG_DVB_BT8XX=m

#
# Supported Pluto2 Adapters
#
CONFIG_DVB_PLUTO2=m

#
# Supported SDMC DM1105 Adapters
#
CONFIG_DVB_DM1105=m
CONFIG_DVB_FIREDTV=m
CONFIG_DVB_FIREDTV_FIREWIRE=y
# CONFIG_DVB_FIREDTV_IEEE1394 is not set
CONFIG_DVB_FIREDTV_INPUT=y

#
# Supported Earthsoft PT1 Adapters
#
CONFIG_DVB_PT1=m

#
# Supported Mantis Adapters
#
CONFIG_MANTIS_CORE=m
CONFIG_DVB_MANTIS=m
CONFIG_DVB_HOPPER=m

#
# Supported nGene Adapters
#
# CONFIG_DVB_NGENE is not set

#
# Supported DVB Frontends
#
CONFIG_DVB_FE_CUSTOMISE=y

#
# Customise DVB Frontends
#

#
# Multistandard (satellite) frontends
#
CONFIG_DVB_STB0899=m
CONFIG_DVB_STB6100=m
CONFIG_DVB_STV090x=m
CONFIG_DVB_STV6110x=m

#
# DVB-S (satellite) frontends
#
CONFIG_DVB_CX24110=m
CONFIG_DVB_CX24123=m
CONFIG_DVB_MT312=m
CONFIG_DVB_ZL10036=m
CONFIG_DVB_ZL10039=m
CONFIG_DVB_S5H1420=m
CONFIG_DVB_STV0288=m
CONFIG_DVB_STB6000=m
CONFIG_DVB_STV0299=m
CONFIG_DVB_STV6110=m
CONFIG_DVB_STV0900=m
CONFIG_DVB_TDA8083=m
CONFIG_DVB_TDA10086=m
CONFIG_DVB_TDA8261=m
CONFIG_DVB_VES1X93=m
CONFIG_DVB_TUNER_ITD1000=m
CONFIG_DVB_TUNER_CX24113=m
CONFIG_DVB_TDA826X=m
CONFIG_DVB_TUA6100=m
CONFIG_DVB_CX24116=m
CONFIG_DVB_SI21XX=m
CONFIG_DVB_DS3000=m
CONFIG_DVB_MB86A16=m

#
# DVB-T (terrestrial) frontends
#
CONFIG_DVB_SP8870=m
CONFIG_DVB_SP887X=m
CONFIG_DVB_CX22700=m
CONFIG_DVB_CX22702=m
CONFIG_DVB_DRX397XD=m
CONFIG_DVB_L64781=m
CONFIG_DVB_TDA1004X=m
CONFIG_DVB_NXT6000=m
CONFIG_DVB_MT352=m
CONFIG_DVB_ZL10353=m
CONFIG_DVB_DIB3000MB=m
CONFIG_DVB_DIB3000MC=m
CONFIG_DVB_DIB7000M=m
CONFIG_DVB_DIB7000P=m
CONFIG_DVB_TDA10048=m
CONFIG_DVB_AF9013=m
CONFIG_DVB_EC100=m

#
# DVB-C (cable) frontends
#
CONFIG_DVB_VES1820=m
CONFIG_DVB_TDA10021=m
CONFIG_DVB_TDA10023=m
CONFIG_DVB_STV0297=m

#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
#
CONFIG_DVB_NXT200X=m
CONFIG_DVB_OR51211=m
CONFIG_DVB_OR51132=m
CONFIG_DVB_BCM3510=m
CONFIG_DVB_LGDT330X=m
CONFIG_DVB_LGDT3304=m
CONFIG_DVB_LGDT3305=m
CONFIG_DVB_S5H1409=m
CONFIG_DVB_AU8522=m
CONFIG_DVB_S5H1411=m

#
# ISDB-T (terrestrial) frontends
#
CONFIG_DVB_S921=m
CONFIG_DVB_DIB8000=m

#
# Digital terrestrial only tuners/PLL
#
CONFIG_DVB_PLL=m
CONFIG_DVB_TUNER_DIB0070=m
CONFIG_DVB_TUNER_DIB0090=m

#
# SEC control devices for DVB-S
#
CONFIG_DVB_LNBP21=m
CONFIG_DVB_ISL6405=m
CONFIG_DVB_ISL6421=m
CONFIG_DVB_ISL6423=m
CONFIG_DVB_LGS8GL5=m
CONFIG_DVB_LGS8GXX=m
CONFIG_DVB_ATBM8830=m
CONFIG_DVB_TDA665x=m

#
# Tools to develop new frontends
#
CONFIG_DVB_DUMMY_FE=m
CONFIG_DAB=y
CONFIG_USB_DABUSB=m

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_UNINORTH=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_DRM=m
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_TTM=m
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
CONFIG_DRM_RADEON=m
# CONFIG_DRM_RADEON_KMS is not set
CONFIG_DRM_MGA=m
CONFIG_DRM_SIS=m
CONFIG_DRM_VIA=m
CONFIG_DRM_SAVAGE=m
CONFIG_VGASTATE=m
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FB_DDC=y
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_SVGALIB=m
CONFIG_FB_MACMODES=y
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
CONFIG_FB_CIRRUS=m
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
CONFIG_FB_OF=y
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_NVIDIA=m
CONFIG_FB_NVIDIA_I2C=y
# CONFIG_FB_NVIDIA_DEBUG is not set
CONFIG_FB_NVIDIA_BACKLIGHT=y
CONFIG_FB_RIVA=m
# CONFIG_FB_RIVA_I2C is not set
# CONFIG_FB_RIVA_DEBUG is not set
CONFIG_FB_RIVA_BACKLIGHT=y
CONFIG_FB_MATROX=y
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G=y
CONFIG_FB_MATROX_I2C=m
CONFIG_FB_MATROX_MAVEN=m
CONFIG_FB_RADEON=y
CONFIG_FB_RADEON_I2C=y
CONFIG_FB_RADEON_BACKLIGHT=y
# CONFIG_FB_RADEON_DEBUG is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
CONFIG_FB_S3=m
CONFIG_FB_SAVAGE=m
CONFIG_FB_SAVAGE_I2C=y
CONFIG_FB_SAVAGE_ACCEL=y
# CONFIG_FB_SIS is not set
CONFIG_FB_VIA=m
# CONFIG_FB_VIA_DIRECT_PROCFS is not set
CONFIG_FB_NEOMAGIC=m
CONFIG_FB_KYRO=m
CONFIG_FB_3DFX=m
CONFIG_FB_3DFX_ACCEL=y
CONFIG_FB_3DFX_I2C=y
CONFIG_FB_VOODOO1=m
# CONFIG_FB_VT8623 is not set
CONFIG_FB_TRIDENT=m
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_TMIO is not set
CONFIG_FB_SM501=m
CONFIG_FB_IBM_GXT4500=y
CONFIG_FB_PS3=y
CONFIG_FB_PS3_DEFAULT_SIZE_M=18
CONFIG_FB_VIRTUAL=m
CONFIG_FB_METRONOME=m
CONFIG_FB_MB862XX=m
CONFIG_FB_MB862XX_PCI_GDC=y
# CONFIG_FB_BROADSHEET is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_LCD_PLATFORM=m
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_DA903X=m
# CONFIG_BACKLIGHT_ADP8860 is not set

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=m

#
# Display hardware drivers
#

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_LOGO=y
CONFIG_FB_LOGO_EXTRA=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_HRTIMER=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_DYNAMIC_MINORS=y
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_VERBOSE is not set
CONFIG_SND_PCM_XRUN_DEBUG=y
CONFIG_SND_VMASTER=y
CONFIG_SND_RAWMIDI_SEQ=m
CONFIG_SND_OPL3_LIB_SEQ=m
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
CONFIG_SND_EMU10K1_SEQ=m
CONFIG_SND_MPU401_UART=m
CONFIG_SND_OPL3_LIB=m
CONFIG_SND_VX_LIB=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MTS64=m
CONFIG_SND_SERIAL_U16550=m
CONFIG_SND_MPU401=m
CONFIG_SND_PORTMAN2X4=m
CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0
CONFIG_SND_SB_COMMON=m
CONFIG_SND_SB16_DSP=m
CONFIG_SND_PCI=y
CONFIG_SND_AD1889=m
CONFIG_SND_ALS300=m
CONFIG_SND_ALS4000=m
CONFIG_SND_ALI5451=m
CONFIG_SND_ATIIXP=m
CONFIG_SND_ATIIXP_MODEM=m
CONFIG_SND_AU8810=m
CONFIG_SND_AU8820=m
CONFIG_SND_AU8830=m
# CONFIG_SND_AW2 is not set
CONFIG_SND_AZT3328=m
CONFIG_SND_BT87X=m
# CONFIG_SND_BT87X_OVERCLOCK is not set
CONFIG_SND_CA0106=m
CONFIG_SND_CMIPCI=m
CONFIG_SND_OXYGEN_LIB=m
CONFIG_SND_OXYGEN=m
CONFIG_SND_CS4281=m
CONFIG_SND_CS46XX=m
CONFIG_SND_CS46XX_NEW_DSP=y
CONFIG_SND_CS5530=m
CONFIG_SND_CS5535AUDIO=m
CONFIG_SND_CTXFI=m
CONFIG_SND_DARLA20=m
CONFIG_SND_GINA20=m
CONFIG_SND_LAYLA20=m
CONFIG_SND_DARLA24=m
CONFIG_SND_GINA24=m
CONFIG_SND_LAYLA24=m
CONFIG_SND_MONA=m
CONFIG_SND_MIA=m
CONFIG_SND_ECHO3G=m
CONFIG_SND_INDIGO=m
CONFIG_SND_INDIGOIO=m
CONFIG_SND_INDIGODJ=m
CONFIG_SND_INDIGOIOX=m
CONFIG_SND_INDIGODJX=m
CONFIG_SND_EMU10K1=m
CONFIG_SND_EMU10K1X=m
CONFIG_SND_ENS1370=m
CONFIG_SND_ENS1371=m
CONFIG_SND_ES1938=m
CONFIG_SND_ES1968=m
# CONFIG_SND_ES1968_INPUT is not set
CONFIG_SND_FM801=m
CONFIG_SND_FM801_TEA575X_BOOL=y
CONFIG_SND_FM801_TEA575X=m
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_ATIHDMI=y
CONFIG_SND_HDA_CODEC_NVHDMI=y
CONFIG_SND_HDA_CODEC_INTELHDMI=y
CONFIG_SND_HDA_ELD=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDSP=m
CONFIG_SND_HDSPM=m
CONFIG_SND_HIFIER=m
CONFIG_SND_ICE1712=m
CONFIG_SND_ICE1724=m
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m
CONFIG_SND_KORG1212=m
CONFIG_SND_LX6464ES=m
CONFIG_SND_MAESTRO3=m
# CONFIG_SND_MAESTRO3_INPUT is not set
CONFIG_SND_MIXART=m
CONFIG_SND_NM256=m
CONFIG_SND_PCXHR=m
CONFIG_SND_RIPTIDE=m
CONFIG_SND_RME32=m
CONFIG_SND_RME96=m
CONFIG_SND_RME9652=m
CONFIG_SND_SONICVIBES=m
CONFIG_SND_TRIDENT=m
CONFIG_SND_VIA82XX=m
CONFIG_SND_VIA82XX_MODEM=m
CONFIG_SND_VIRTUOSO=m
CONFIG_SND_VX222=m
CONFIG_SND_YMFPCI=m
CONFIG_SND_PPC=y
CONFIG_SND_POWERMAC=m
CONFIG_SND_POWERMAC_AUTO_DRC=y
CONFIG_SND_PS3=m
CONFIG_SND_PS3_DEFAULT_START_DELAY=1000
CONFIG_SND_AOA=m
CONFIG_SND_AOA_FABRIC_LAYOUT=m
CONFIG_SND_AOA_ONYX=m
CONFIG_SND_AOA_TAS=m
CONFIG_SND_AOA_TOONIE=m
CONFIG_SND_AOA_SOUNDBUS=m
CONFIG_SND_AOA_SOUNDBUS_I2S=m
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
# CONFIG_SND_USB_UA101 is not set
CONFIG_SND_USB_USX2Y=m
CONFIG_SND_USB_CAIAQ=m
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_PCMCIA=y
CONFIG_SND_VXPOCKET=m
CONFIG_SND_PDAUDIOCF=m
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y

#
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y

#
# Special HID drivers
#
# CONFIG_HID_3M_PCT is not set
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
# CONFIG_HID_CANDO is not set
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
# CONFIG_HID_PRODIKEYS is not set
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
CONFIG_DRAGONRISE_FF=y
# CONFIG_HID_EGALAX is not set
CONFIG_HID_EZKEY=y
CONFIG_HID_KYE=y
CONFIG_HID_GYRATION=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LOGITECH=y
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
# CONFIG_LOGIG940_FF is not set
# CONFIG_HID_MAGICMOUSE is not set
CONFIG_HID_MICROSOFT=y
# CONFIG_HID_MOSART is not set
CONFIG_HID_MONTEREY=y
CONFIG_HID_NTRIG=y
# CONFIG_HID_ORTEK is not set
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PETALYNX=y
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_QUANTA is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_ROCCAT_KONE is not set
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
# CONFIG_HID_STANTUM is not set
CONFIG_HID_SUNPLUS=y
CONFIG_HID_GREENASIA=y
CONFIG_GREENASIA_FF=y
CONFIG_HID_SMARTJOYPLUS=y
CONFIG_SMARTJOYPLUS_FF=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_WACOM=m
# CONFIG_HID_WACOM_POWER_SUPPLY is not set
CONFIG_HID_ZEROPLUS=y
CONFIG_ZEROPLUS_FF=y
# CONFIG_HID_ZYDACRON is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
CONFIG_USB_MON=y
CONFIG_USB_WUSB=m
CONFIG_USB_WUSB_CBAF=m
# CONFIG_USB_WUSB_CBAF_DEBUG is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_XHCI_HCD=m
# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_EHCI_HCD_PPC_OF=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
CONFIG_USB_ISP1362_HCD=m
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
CONFIG_USB_OHCI_HCD_PPC_OF=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_U132_HCD=m
CONFIG_USB_SL811_HCD=m
# CONFIG_USB_SL811_CS is not set
# CONFIG_USB_R8A66597_HCD is not set
CONFIG_USB_WHCI_HCD=m
CONFIG_USB_HWA_HCD=m

#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
CONFIG_USB_TMC=m

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_DATAFAB=m
CONFIG_USB_STORAGE_FREECOM=m
# CONFIG_USB_STORAGE_ISD200 is not set
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_STORAGE_SDDR09=m
CONFIG_USB_STORAGE_SDDR55=m
CONFIG_USB_STORAGE_JUMPSHOT=m
CONFIG_USB_STORAGE_ALAUDA=m
CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
CONFIG_USB_STORAGE_CYPRESS_ATACB=m
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
CONFIG_USB_MDC800=m
CONFIG_USB_MICROTEK=m

#
# USB port drivers
#
CONFIG_USB_USS720=m
CONFIG_USB_SERIAL=m
CONFIG_USB_EZUSB=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_AIRCABLE=m
CONFIG_USB_SERIAL_ARK3116=m
CONFIG_USB_SERIAL_BELKIN=m
CONFIG_USB_SERIAL_CH341=m
CONFIG_USB_SERIAL_WHITEHEAT=m
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_USB_SERIAL_CYPRESS_M8=m
CONFIG_USB_SERIAL_EMPEG=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_FUNSOFT=m
CONFIG_USB_SERIAL_VISOR=m
CONFIG_USB_SERIAL_IPAQ=m
CONFIG_USB_SERIAL_IR=m
CONFIG_USB_SERIAL_EDGEPORT=m
CONFIG_USB_SERIAL_EDGEPORT_TI=m
CONFIG_USB_SERIAL_GARMIN=m
CONFIG_USB_SERIAL_IPW=m
CONFIG_USB_SERIAL_IUU=m
CONFIG_USB_SERIAL_KEYSPAN_PDA=m
CONFIG_USB_SERIAL_KEYSPAN=m
CONFIG_USB_SERIAL_KLSI=m
CONFIG_USB_SERIAL_KOBIL_SCT=m
CONFIG_USB_SERIAL_MCT_U232=m
CONFIG_USB_SERIAL_MOS7720=m
# CONFIG_USB_SERIAL_MOS7715_PARPORT is not set
CONFIG_USB_SERIAL_MOS7840=m
CONFIG_USB_SERIAL_MOTOROLA=m
CONFIG_USB_SERIAL_NAVMAN=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_SERIAL_OTI6858=m
# CONFIG_USB_SERIAL_QCAUX is not set
CONFIG_USB_SERIAL_QUALCOMM=m
CONFIG_USB_SERIAL_SPCP8X5=m
CONFIG_USB_SERIAL_HP4X=m
CONFIG_USB_SERIAL_SAFE=m
CONFIG_USB_SERIAL_SAFE_PADDED=y
CONFIG_USB_SERIAL_SIEMENS_MPI=m
CONFIG_USB_SERIAL_SIERRAWIRELESS=m
CONFIG_USB_SERIAL_SYMBOL=m
CONFIG_USB_SERIAL_TI=m
CONFIG_USB_SERIAL_CYBERJACK=m
CONFIG_USB_SERIAL_XIRCOM=m
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_SERIAL_OPTICON=m
# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
# CONFIG_USB_SERIAL_ZIO is not set
CONFIG_USB_SERIAL_DEBUG=m

#
# USB Miscellaneous drivers
#
CONFIG_USB_EMI62=m
CONFIG_USB_EMI26=m
CONFIG_USB_ADUTUX=m
CONFIG_USB_SEVSEG=m
# CONFIG_USB_RIO500 is not set
CONFIG_USB_LEGOTOWER=m
CONFIG_USB_LCD=m
CONFIG_USB_LED=m
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
CONFIG_USB_IDMOUSE=m
CONFIG_USB_FTDI_ELAN=m
CONFIG_USB_APPLEDISPLAY=m
CONFIG_USB_SISUSBVGA=m
CONFIG_USB_SISUSBVGA_CON=y
CONFIG_USB_LD=m
CONFIG_USB_TRANCEVIBRATOR=m
CONFIG_USB_IOWARRIOR=m
# CONFIG_USB_TEST is not set
CONFIG_USB_ISIGHTFW=m
CONFIG_USB_ATM=m
CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_CXACRU=m
CONFIG_USB_UEAGLEATM=m
CONFIG_USB_XUSBATM=m
# CONFIG_USB_GADGET is not set

#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
CONFIG_NOP_USB_XCEIV=m
CONFIG_UWB=m
CONFIG_UWB_HWA=m
CONFIG_UWB_WHCI=m
CONFIG_UWB_WLP=m
CONFIG_UWB_I1480U=m
CONFIG_UWB_I1480U_WLP=m
CONFIG_MMC=m
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_UNSAFE_RESUME is not set

#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=m
CONFIG_MMC_BLOCK_BOUNCE=y
CONFIG_SDIO_UART=m
# CONFIG_MMC_TEST is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_SDHCI=m
CONFIG_MMC_SDHCI_PCI=m
# CONFIG_MMC_RICOH_MMC is not set
CONFIG_MMC_SDHCI_OF=m
# CONFIG_MMC_SDHCI_OF_ESDHC is not set
# CONFIG_MMC_SDHCI_OF_HLWD is not set
CONFIG_MMC_SDHCI_PLTFM=m
CONFIG_MMC_WBSD=m
CONFIG_MMC_TIFM_SD=m
CONFIG_MMC_SDRICOH_CS=m
CONFIG_MMC_CB710=m
CONFIG_MMC_VIA_SDMMC=m
CONFIG_MEMSTICK=m
# CONFIG_MEMSTICK_DEBUG is not set

#
# MemoryStick drivers
#
# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
CONFIG_MSPRO_BLOCK=m

#
# MemoryStick Host Controller Drivers
#
CONFIG_MEMSTICK_TIFM_MS=m
CONFIG_MEMSTICK_JMICRON_38X=m
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not set
CONFIG_LEDS_LP3944=m
# CONFIG_LEDS_PCA955X is not set
CONFIG_LEDS_DA903X=m
CONFIG_LEDS_REGULATOR=m
# CONFIG_LEDS_BD2802 is not set
CONFIG_LEDS_LT3593=m
CONFIG_LEDS_TRIGGERS=y

#
# LED Triggers
#
CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_IDE_DISK=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
CONFIG_LEDS_TRIGGER_BACKLIGHT=m
CONFIG_LEDS_TRIGGER_GPIO=m
CONFIG_LEDS_TRIGGER_DEFAULT_ON=m

#
# iptables trigger is under Netfilter config (LED target)
#
CONFIG_ACCESSIBILITY=y
CONFIG_A11Y_BRAILLE_CONSOLE=y
CONFIG_INFINIBAND=m
CONFIG_INFINIBAND_USER_MAD=m
CONFIG_INFINIBAND_USER_ACCESS=m
CONFIG_INFINIBAND_USER_MEM=y
CONFIG_INFINIBAND_ADDR_TRANS=y
CONFIG_INFINIBAND_MTHCA=m
CONFIG_INFINIBAND_MTHCA_DEBUG=y
# CONFIG_INFINIBAND_QIB is not set
CONFIG_INFINIBAND_EHCA=m
CONFIG_INFINIBAND_AMSO1100=m
# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
CONFIG_INFINIBAND_CXGB3=m
# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
CONFIG_MLX4_INFINIBAND=m
CONFIG_INFINIBAND_NES=m
# CONFIG_INFINIBAND_NES_DEBUG is not set
CONFIG_INFINIBAND_IPOIB=m
CONFIG_INFINIBAND_IPOIB_CM=y
CONFIG_INFINIBAND_IPOIB_DEBUG=y
CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
CONFIG_INFINIBAND_SRP=m
CONFIG_INFINIBAND_ISER=m
CONFIG_EDAC=y

#
# Reporting subsystems
#
# CONFIG_EDAC_DEBUG is not set
CONFIG_EDAC_MM_EDAC=m
CONFIG_EDAC_PASEMI=m
CONFIG_EDAC_CELL=m
CONFIG_EDAC_AMD8131=m
CONFIG_EDAC_AMD8111=m
CONFIG_EDAC_CPC925=m
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
CONFIG_RTC_DRV_DS1307=m
CONFIG_RTC_DRV_DS1374=m
CONFIG_RTC_DRV_DS1672=m
CONFIG_RTC_DRV_MAX6900=m
CONFIG_RTC_DRV_RS5C372=m
CONFIG_RTC_DRV_ISL1208=m
CONFIG_RTC_DRV_X1205=m
CONFIG_RTC_DRV_PCF8563=m
CONFIG_RTC_DRV_PCF8583=m
CONFIG_RTC_DRV_M41T80=m
CONFIG_RTC_DRV_M41T80_WDT=y
CONFIG_RTC_DRV_BQ32K=m
# CONFIG_RTC_DRV_S35390A is not set
CONFIG_RTC_DRV_FM3130=m
CONFIG_RTC_DRV_RX8581=m
CONFIG_RTC_DRV_RX8025=m

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
CONFIG_RTC_DRV_DS1286=m
CONFIG_RTC_DRV_DS1511=m
CONFIG_RTC_DRV_DS1553=m
CONFIG_RTC_DRV_DS1742=m
CONFIG_RTC_DRV_STK17TA8=m
# CONFIG_RTC_DRV_M48T86 is not set
CONFIG_RTC_DRV_M48T35=m
CONFIG_RTC_DRV_M48T59=m
CONFIG_RTC_DRV_MSM6242=m
CONFIG_RTC_DRV_BQ4802=m
CONFIG_RTC_DRV_RP5C01=m
CONFIG_RTC_DRV_V3020=m

#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_GENERIC=y
CONFIG_RTC_DRV_PS3=y
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set

#
# DMA Devices
#
# CONFIG_TIMB_DMA is not set
CONFIG_AUXDISPLAY=y
CONFIG_KS0108=m
CONFIG_KS0108_PORT=0x378
CONFIG_KS0108_DELAY=2
CONFIG_UIO=m
CONFIG_UIO_CIF=m
CONFIG_UIO_PDRV=m
CONFIG_UIO_PDRV_GENIRQ=m
CONFIG_UIO_AEC=m
CONFIG_UIO_SERCOS3=m
CONFIG_UIO_PCI_GENERIC=m
# CONFIG_UIO_NETX is not set
CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
# CONFIG_ET131X is not set
# CONFIG_VIDEO_GO7007 is not set
# CONFIG_VIDEO_CX25821 is not set
# CONFIG_VIDEO_TM6000 is not set
# CONFIG_USB_IP_COMMON is not set
# CONFIG_W35UND is not set
# CONFIG_PRISM2_USB is not set
# CONFIG_ECHO is not set
# CONFIG_OTUS is not set
# CONFIG_COMEDI is not set
# CONFIG_ASUS_OLED is not set
# CONFIG_PANEL is not set
# CONFIG_R8187SE is not set
# CONFIG_RTL8192SU is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTL8192E is not set
# CONFIG_TRANZPORT is not set
# CONFIG_POHMELFS is not set
# CONFIG_IDE_PHISON is not set
# CONFIG_LINE6_USB is not set
# CONFIG_DRM_VMWGFX is not set
CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
CONFIG_DRM_NOUVEAU_DEBUG=y

#
# I2C encoder or helper chips
#
CONFIG_DRM_I2C_CH7006=m
# CONFIG_USB_SERIAL_QUATECH2 is not set
# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
# CONFIG_FB_UDL is not set
# CONFIG_VME_BUS is not set

#
# RAR Register Driver
#
# CONFIG_RAR_REGISTER is not set
# CONFIG_IIO is not set
# CONFIG_RAMZSWAP is not set
# CONFIG_WLAGS49_H2 is not set
# CONFIG_WLAGS49_H25 is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_FB_SM7XX is not set
# CONFIG_DT3155 is not set
# CONFIG_VIDEO_DT3155 is not set
CONFIG_CRYSTALHD=m

#
# Texas Instruments shared transport line discipline
#
# CONFIG_TI_ST is not set
# CONFIG_ST_BT is not set
# CONFIG_FB_XGI is not set

#
# File systems
#
CONFIG_EXT2_FS=m
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
CONFIG_FS_XIP=y
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=m
CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set
# CONFIG_XFS_DEBUG is not set
CONFIG_GFS2_FS=m
CONFIG_GFS2_FS_LOCKING_DLM=y
CONFIG_OCFS2_FS=m
CONFIG_OCFS2_FS_O2CB=m
CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
# CONFIG_OCFS2_FS_STATS is not set
# CONFIG_OCFS2_DEBUG_MASKLOG is not set
# CONFIG_OCFS2_DEBUG_FS is not set
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_NILFS2_FS=m
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
# CONFIG_QUOTA_DEBUG is not set
CONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_GENERIC_ACL=y

#
# Caches
#
CONFIG_FSCACHE=m
CONFIG_FSCACHE_STATS=y
# CONFIG_FSCACHE_HISTOGRAM is not set
# CONFIG_FSCACHE_DEBUG is not set
CONFIG_FSCACHE_OBJECT_LIST=y
CONFIG_CACHEFILES=m
# CONFIG_CACHEFILES_DEBUG is not set
# CONFIG_CACHEFILES_HISTOGRAM is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
CONFIG_AFFS_FS=m
CONFIG_ECRYPT_FS=m
CONFIG_HFS_FS=m
CONFIG_HFSPLUS_FS=m
CONFIG_BEFS_FS=m
# CONFIG_BEFS_DEBUG is not set
CONFIG_BFS_FS=m
CONFIG_EFS_FS=m
CONFIG_JFFS2_FS=m
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_FS_XATTR=y
CONFIG_JFFS2_FS_POSIX_ACL=y
CONFIG_JFFS2_FS_SECURITY=y
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
# CONFIG_JFFS2_LZO is not set
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_UBIFS_FS=m
CONFIG_UBIFS_FS_XATTR=y
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
# CONFIG_UBIFS_FS_DEBUG is not set
# CONFIG_LOGFS is not set
CONFIG_CRAMFS=m
CONFIG_SQUASHFS=m
# CONFIG_SQUASHFS_XATTRS is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_VXFS_FS=m
CONFIG_MINIX_FS=m
CONFIG_OMFS_FS=m
# CONFIG_HPFS_FS is not set
CONFIG_QNX4FS_FS=m
CONFIG_ROMFS_FS=m
CONFIG_ROMFS_BACKED_BY_BLOCK=y
# CONFIG_ROMFS_BACKED_BY_MTD is not set
# CONFIG_ROMFS_BACKED_BY_BOTH is not set
CONFIG_ROMFS_ON_BLOCK=y
CONFIG_SYSV_FS=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
CONFIG_EXOFS_FS=m
# CONFIG_EXOFS_DEBUG is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_FSCACHE=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_XPRT_RDMA=m
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_RPCSEC_GSS_SPKM3=m
# CONFIG_SMB_FS is not set
# CONFIG_CEPH_FS is not set
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
# CONFIG_CIFS_STATS2 is not set
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_DFS_UPCALL=y
CONFIG_CIFS_EXPERIMENTAL=y
CONFIG_NCP_FS=m
CONFIG_NCPFS_PACKET_SIGNING=y
CONFIG_NCPFS_IOCTL_LOCKING=y
CONFIG_NCPFS_STRONG=y
CONFIG_NCPFS_NFS_NS=y
CONFIG_NCPFS_OS2_NS=y
CONFIG_NCPFS_SMALLDOS=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y
CONFIG_CODA_FS=m
# CONFIG_AFS_FS is not set
CONFIG_9P_FS=m
CONFIG_9P_FSCACHE=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
# CONFIG_ATARI_PARTITION is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
CONFIG_DLM=m
CONFIG_DLM_DEBUG=y
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
CONFIG_CRC7=m
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_LZO_COMPRESS=m
CONFIG_LZO_DECOMPRESS=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_DEC16=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m

#
# Kernel hacking
#
# CONFIG_PRINTK_TIME is not set
# CONFIG_ENABLE_WARN_DEPRECATED is not set
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=2048
CONFIG_MAGIC_SYSRQ=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
CONFIG_HEADERS_CHECK=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_LIST=y
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
CONFIG_FRAME_POINTER=y
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_KPROBES_SANITY_TEST is not set
CONFIG_BACKTRACE_SELF_TEST=y
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
CONFIG_LKDTM=m
CONFIG_CPU_NOTIFIER_ERROR_INJECT=m
CONFIG_FAULT_INJECTION=y
CONFIG_FAILSLAB=y
CONFIG_FAIL_PAGE_ALLOC=y
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAIL_IO_TIMEOUT=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y
CONFIG_LATENCYTOP=y
# CONFIG_SYSCTL_SYSCALL_CHECK is not set
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_RING_BUFFER_ALLOW_SWAP=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
CONFIG_IRQSOFF_TRACER=y
CONFIG_SCHED_TRACER=y
CONFIG_BOOT_TRACER=y
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_KMEMTRACE=y
CONFIG_WORKQUEUE_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENT=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FUNCTION_PROFILER=y
CONFIG_FTRACE_MCOUNT_RECORD=y
CONFIG_FTRACE_SELFTEST=y
CONFIG_FTRACE_STARTUP_TEST=y
CONFIG_EVENT_TRACE_TEST_SYSCALLS=y
CONFIG_RING_BUFFER_BENCHMARK=m
# CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set
CONFIG_BUILD_DOCSRC=y
CONFIG_DYNAMIC_DEBUG=y
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_TESTS=y
# CONFIG_KGDB_TESTS_ON_BOOT is not set
# CONFIG_KGDB_KDB is not set
CONFIG_PPC_DISABLE_WERROR=y
CONFIG_PRINT_STACK_DEPTH=64
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
CONFIG_HCALL_STATS=y
CONFIG_PPC_EMULATED_STATS=y
# CONFIG_CODE_PATCHING_SELFTEST is not set
# CONFIG_FTR_FIXUP_SELFTEST is not set
CONFIG_MSI_BITMAP_SELFTEST=y
CONFIG_XMON=y
# CONFIG_XMON_DEFAULT is not set
CONFIG_XMON_DISASSEMBLY=y
CONFIG_DEBUGGER=y
# CONFIG_VIRQ_DEBUG is not set
CONFIG_BOOTX_TEXT=y

#
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_DEBUG_PROC_KEYS=y
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y
# CONFIG_SECURITY_PATH is not set
CONFIG_LSM_MMAP_MIN_ADDR=65536
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
# CONFIG_SECURITY_SMACK is not set
# CONFIG_SECURITY_TOMOYO is not set
# CONFIG_IMA is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_SMACK is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_DEFAULT_SECURITY="selinux"
CONFIG_KEYS_COMPAT=y
CONFIG_XOR_BLOCKS=m
CONFIG_ASYNC_CORE=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_ASYNC_PQ=m
CONFIG_ASYNC_RAID6_RECOV=m
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_TESTS=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_TEST=m

#
# Authenticated Encryption with Associated Data
#
CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_GCM=m
CONFIG_CRYPTO_SEQIV=m

#
# Block modes
#
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_CTR=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_XTS=m

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_VMAC=m

#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_GHASH=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_RMD128=m
CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_RMD256=m
CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m

#
# Ciphers
#
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_DES=m
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_SALSA20=m
CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_ZLIB=m
CONFIG_CRYPTO_LZO=m

#
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=m
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_HIFN_795X=m
CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
# CONFIG_PPC_CLOCK is not set
CONFIG_KVM_MMIO=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
CONFIG_KVM_BOOK3S_HANDLER=y
CONFIG_KVM_BOOK3S_64_HANDLER=y
CONFIG_KVM_BOOK3S_64=m
CONFIG_VHOST_NET=m
CONFIG_VIRTIO=m
CONFIG_VIRTIO_RING=m
CONFIG_VIRTIO_PCI=m
CONFIG_VIRTIO_BALLOON=m

[-- Attachment #3: Type: text/plain, Size: 276 bytes --]

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-09-28 16:05 ` Subrata Modak
@ 2010-10-04  7:13   ` Subrata Modak
  2010-10-13  7:21   ` Subrata Modak
  1 sibling, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-04  7:13 UTC (permalink / raw)
  To: Li Zefan; +Cc: ltp-list

Hi Li,

Can you please address the following queries/issues ?

Regards--
Subrata

On Tue, 2010-09-28 at 21:35 +0530, Subrata Modak wrote: 
> On Tue, 2010-09-07 at 10:50 +0800, Li Zefan wrote:
> > We test ftrace by forking processes to simultaneously and
> > constantly read/write different tracing files in debugfs
> > and procfs. This stress test aims at revealing races in
> > various corner cases
> > 
> > The test will be skipped if the kernel is older than 2.6.34,
> > mainly because it can crash old kernels.
> > 
> > The test will run by default and will run for 90 seconds.
> > 
> > To run this test only:
> > 
> > 	# ./runltp -f tracing
> > 
> > 
> > Changelog for v2:
> > 
> > - Addressed the comments from Garrett
> > 
> > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> 
> Sorry for responding late. I gave a try to these tests and has my
> following observations:
> 
> You said that the tests can run on kernels above 2.6.34 without issues.
> But, i ran them on stable 2.6.35.4 and still found kernel panics. I
> built kernel 2.6.35.4 on my existing Fedora 13 PowerPC box.
> 
> # uname -a
> Linux 2.6.35.4 #2 SMP Tue Sep 28 16:07:27 IST 2010 ppc64 ppc64 ppc64
> GNU/Linux
> # cat /etc/issue
> Fedora release 13 (Goddard)
> Kernel \r on an \m (\l)
> 
> When i ran the tests:
> Running tests.......
> <<<test_start>>>
> tag=ftrace-stress-test stime=1285684343
> cmdline="ftrace_stress_test.sh 90"
> contacts=""
> analysis=exit
> <<<test_output>>>
> incrementing stop
> Ftrace Stress Test Begin
> ...
> 
> The following panic and system reboot was observed on mu Serial console:
> ========================================================================
> Unable to handle kernel paging request for data at address
> 0xbffffe4007fc8040
> Unable to handle kernel paging request for data at address
> 0xbffffe4007fc8040
> Faulting instruction address: 0xc00000000010f4a8
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=128 NUMA pSeries
> last sysfs
> file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
> Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
> scsi_tgt [last unloaded: scsi_wait_scan]
> NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
> REGS: c0000000dafa70a0 TRAP: 0300   Tainted: G        W    (2.6.35.4)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
> DAR: bffffe4007fc8040, DSISR: 0000000040000000
> TASK = c0000000daf950d0[9] 'migration/2' THREAD: c0000000dafa4000 CPU: 2
> GPR00: 0000000000009c35 c0000000dafa7320 c000000001735d40
> 0000000000000000 
> GPR04: c00000000010f308 c0000000dafa7278 0000000000000000
> 0000000000009c34 
> GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
> c000000001033720 
> GPR12: 0000000028002042 c000000007fc8e00 0000000006e3fa78
> 00000000005f3000 
> GPR16: c0000000dafa77d0 c000000001c852b0 c0000000dafa77c0
> 0000000000000000 
> GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
> c0000000017dea80 
> GPR24: 0000000000c55000 c0000000daeabc00 0000000001dcff22
> c0000000daf950d0 
> GPR28: c000000001c87780 c0000000017cea80 c0000000016a5df0
> c0000000dafa7320 
> NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
> LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
> Call Trace:
> [c0000000dafa7320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
> (unreliable)
> [c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
> [c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Instruction dump:
> e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
> 7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
> 7c0b512a 
> Faulting instruction address: 0xc00000000010f4a8
> Oops: Kernel access of bad area, sig: 11 [#2]
> SMP NR_CPUS=128 NUMA pSeries
> last sysfs
> file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
> Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
> scsi_tgt [last unloaded: scsi_wait_scan]
> NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
> REGS: c0000000dafc30a0 TRAP: 0300   Tainted: G      D W    (2.6.35.4)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
> DAR: bffffe4007fc8040, DSISR: 0000000040000000
> TASK = c0000000dafb35e0[12] 'migration/3' THREAD: c0000000dafc0000 CPU:
> 3
> GPR00: 0000000000009c34 c0000000dafc3320 c000000001735d40
> 0000000000000000 
> GPR04: c00000000010f308 c0000000dafc3278 0000000000000000
> 0000000000009c33 
> GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
> c000000001033720 
> GPR12: c0000000d1725300 c000000007fc9500 0000000006e3fa78
> 00000000005f3000 
> GPR16: c0000000dafc37d0 c000000001cc52b0 c0000000dafc37c0
> 0000000000000000 
> GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
> c0000000017dea80 
> GPR24: 0000000000c95000 c0000000dafb8800 0000000001daff3e
> c0000000dafb35e0 
> GPR28: c000000001cc7780 c0000000017cea80 c0000000016a5df0
> c0000000dafc3320 
> NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
> LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
> Call Trace:
> [c0000000dafc3320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
> (unreliable)
> [c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
> [c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Instruction dump:
> e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
> 7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
> 7c0b512a 
> Kernel panic - not syncing: Fatal exception in interrupt
> Call Trace:
> [c0000000dafa6ce0] [c00000000001d068] .show_stack+0x148/0x384
> (unreliable)
> [c0000000dafa6dc0] [c000000000bdd208] .dump_stack+0x50/0x78
> [c0000000dafa6e50] [c000000000bdd328] .panic+0xf8/0x26c
> [c0000000dafa6ef0] [c00000000004a2d8] .die+0x434/0x494
> [c0000000dafa6fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
> [c0000000dafa7030] [c000000000005704] handle_page_fault+0x3c/0x74
> --- Exception: 300 at .update_curr_rt+0x1e8/0x538
>     LR = .update_curr_rt+0x4c/0x538
> [c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
> Kernel panic - not syncing: Fatal exception in interrupt
> [c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Call Trace:
> [c0000000dafc2ce0] [c00000000001d068] .show_stack+0x148/0x384
> (unreliable)
> [c0000000dafc2dc0] [c000000000bdd208] .dump_stack+0x50/0x78
> [c0000000dafc2e50] [c000000000bdd328] .panic+0xf8/0x26c
> [c0000000dafc2ef0] [c00000000004a2d8] .die+0x434/0x494
> [c0000000dafc2fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
> [c0000000dafc3030] [c000000000005704] handle_page_fault+0x3c/0x74
> --- Exception: 300 at .update_curr_rt+0x1e8/0x538
>     LR = .update_curr_rt+0x4c/0x538
> [c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
> [c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
> RTAS: event: 29, Type: Platform Error, Severity: 2
> ibm,os-term call failed -1
> Rebooting in 180 seconds..
> RTAS: event: 30, Type: Platform Error, Severity: 2
> ibm,os-term call failed -1
> Rebooting in 180 seconds..
> ========================================================================
> 
> Can you please address the following things:
>      1. I was not sure which particular CONFIG options to enable when
>         building kernel to enable tracing options that these tests would
>         require. So, i had enabled most of them while building the
>         kernel. Please see the attached config file. In your next
>         patch[v3], can you please a bit of documentation on this front
>         of what other system requirements are needed to execute these
>         tests, including the kernel CONFIG options to be enabled,
>      2. So, going by your description, the tests should run on kernel
>         greater than 2.6.34. But, on kernel 2.6.35.4 it still creates
>         kernel panic. So, is this
>              I. a test case issues ?
>             II. or, real kernel bug which has not yet being addressed
>                 till now ?
> 
> Regards--
> Subrata
> 
> > ---
> >  runltp                                             |    3 +-
> >  runtest/tracing                                    |    2 +
> >  testcases/kernel/Makefile                          |    2 +-
> >  testcases/kernel/tracing/Makefile                  |    5 +
> >  .../kernel/tracing/ftrace_stress_test/Makefile     |    7 +
> >  .../ftrace_stress_test/ftrace_get_page_size.c      |   10 +
> >  .../ftrace_stress/ftrace_buffer_size.sh            |   43 ++++
> >  .../ftrace_stress/ftrace_current_tracer.sh         |   34 +++
> >  .../ftrace_stress/ftrace_ftrace_enabled.sh         |   39 ++++
> >  .../ftrace_stress/ftrace_profile_enabled.sh        |   50 ++++
> >  .../ftrace_stress/ftrace_set_event.sh              |   44 ++++
> >  .../ftrace_stress/ftrace_set_ftrace_pid.sh         |   44 ++++
> >  .../ftrace_stress/ftrace_stack_max_size.sh         |   39 ++++
> >  .../ftrace_stress/ftrace_stack_trace.sh            |   46 ++++
> >  .../ftrace_stress/ftrace_trace.sh                  |   27 +++
> >  .../ftrace_stress/ftrace_trace_clock.sh            |   46 ++++
> >  .../ftrace_stress/ftrace_trace_options.sh          |   42 ++++
> >  .../ftrace_stress/ftrace_trace_pipe.sh             |   52 +++++
> >  .../ftrace_stress/ftrace_trace_stat.sh             |   45 ++++
> >  .../ftrace_stress/ftrace_tracing_enabled.sh        |   39 ++++
> >  .../ftrace_stress/ftrace_tracing_max_latency.sh    |   38 +++
> >  .../ftrace_stress/ftrace_tracing_on.sh             |   39 ++++
> >  .../ftrace_stress_test/ftrace_stress_test.sh       |  237 ++++++++++++++++++++
> >  23 files changed, 931 insertions(+), 2 deletions(-)
> >  create mode 100644 runtest/tracing
> >  create mode 100644 testcases/kernel/tracing/Makefile
> >  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/Makefile
> >  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > 
> > diff --git a/runltp b/runltp
> > index b385984..89b1717 100755
> > --- a/runltp
> > +++ b/runltp
> > @@ -593,7 +593,8 @@ main()
> >                           ${LTPROOT}/runtest/numa                    \
> >                           ${LTPROOT}/runtest/hugetlb                 \
> >                           ${LTPROOT}/runtest/commands                \
> > -                         ${LTPROOT}/runtest/hyperthreading
> > +                         ${LTPROOT}/runtest/hyperthreading          \
> > +                         ${LTPROOT}/runtest/tracing
> >          do
> >              [ -e "$SCENFILES" ] || \
> >              {
> > diff --git a/runtest/tracing b/runtest/tracing
> > new file mode 100644
> > index 0000000..ef3a048
> > --- /dev/null
> > +++ b/runtest/tracing
> > @@ -0,0 +1,2 @@
> > +#DESCRIPTION:Tracing testing
> > +ftrace-stress-test	ftrace_stress_test.sh 90
> > diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
> > index e2a9d8e..8c50025 100644
> > --- a/testcases/kernel/Makefile
> > +++ b/testcases/kernel/Makefile
> > @@ -30,7 +30,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
> >  ifneq ($(UCLINUX),1)
> >  SUBDIRS		:= containers connectors controllers fs hotplug io ipc mem \
> >  		   numa performance_counters power_management pty sched \
> > -		   security syscalls timers
> > +		   security syscalls timers tracing
> >  else
> >  SUBDIRS		:= syscalls
> >  endif
> > diff --git a/testcases/kernel/tracing/Makefile b/testcases/kernel/tracing/Makefile
> > new file mode 100644
> > index 0000000..e9f96c3
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/Makefile
> > @@ -0,0 +1,5 @@
> > +top_srcdir		?= ../../..
> > +
> > +include $(top_srcdir)/include/mk/env_pre.mk
> > +
> > +include $(top_srcdir)/include/mk/generic_trunk_target.mk
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/Makefile b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> > new file mode 100644
> > index 0000000..e4a913a
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> > @@ -0,0 +1,7 @@
> > +top_srcdir              ?= ../../../..
> > +
> > +include $(top_srcdir)/include/mk/testcases.mk
> > +
> > +INSTALL_TARGETS         := *.sh ftrace_stress/*
> > +
> > +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> > new file mode 100644
> > index 0000000..b52a109
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> > @@ -0,0 +1,10 @@
> > +#include <unistd.h>
> > +#include <stdio.h>
> > +
> > +int main(void)
> > +{
> > +	printf("%d\n", getpagesize());
> > +
> > +	return 0;
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> > new file mode 100755
> > index 0000000..af5a98e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> > @@ -0,0 +1,43 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +# Use up to 10% of free memory
> > +free_mem=`cat /proc/meminfo | grep '^MemFree' | awk '{ print $2 }'`
> > +step=$(( $free_mem / 10 / $LOOP ))
> > +if [ $step -eq 0 ]; then
> > +	$step=1
> > +	LOOP=50
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	new_size=1
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> > +		new_size=$(( $new_size + $step ))
> > +	}
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		new_size=$(( $new_size - $step ))
> > +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> > new file mode 100755
> > index 0000000..88d576f
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> > @@ -0,0 +1,34 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		for tracer in `cat "$TRACING_PATH"/available_tracers`
> > +		do
> > +			if [ "$tracer" = mmiotrace ]; then
> > +				continue
> > +			fi
> > +
> > +			echo $tracer > "$TRACING_PATH"/current_tracer 2> /dev/null
> > +		done
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> > new file mode 100755
> > index 0000000..20bb234
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > /proc/sys/kernel/ftrace_enabled
> > +		echo 1 > /proc/sys/kernel/ftrace_enabled
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 1 > /proc/sys/kernel/ftrace_enabled
> > +	else
> > +		echo 0 > /proc/sys/kernel/ftrace_enabled
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> > new file mode 100755
> > index 0000000..9c6162a
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> > @@ -0,0 +1,50 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	else
> > +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> > new file mode 100755
> > index 0000000..d7efdd4
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> > @@ -0,0 +1,44 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < 100; i++))
> > +	{
> > +		echo 1 > "$TRACING_PATH"/events/enable
> > +		echo 0 > "$TRACING_PATH"/events/enable
> > +	}
> > +
> > +	for dir in `ls $TRACING_PATH/events/`
> > +	do
> > +		if [ ! -d $dir -o "$dir" = ftrace ]; then
> > +			continue;
> > +		fi
> > +
> > +		for ((i = 0; i < 20; i++))
> > +		{
> > +			echo 1 > "$TRACING_PATH"/events/$dir/enable
> > +			echo 0 > "$TRACING_PATH"/events/$dir/enable
> > +		}
> > +	done
> > +
> > +	for event in `cat $TRACING_PATH/available_events`;
> > +	do
> > +		echo $event >> "$TRACING_PATH"/set_event
> > +	done
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> > new file mode 100755
> > index 0000000..541215c
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> > @@ -0,0 +1,44 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=300
> > +
> > +if [ ! -e "$TRACING_PATH"/set_ftrace_pid ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ; ))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((j = 0; j < $LOOP; j++))
> > +	{
> > +		for ((k = 1; k <= NR_PIDS; k++))
> > +		{
> > +			str="\$pid$k"
> > +			eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
> > +		}
> > +
> > +		echo > "$TRACING_PATH"/set_ftrace_pid
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> > new file mode 100755
> > index 0000000..682d05e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_STACK_SIZE=8192
> > +
> > +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $MAX_STACK_SIZE; i += 70))
> > +	{
> > +		echo $i > "$TRACING_PATH"/stack_max_size
> > +		cat "$TRACING_PATH"/stack_max_size > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> > new file mode 100755
> > index 0000000..a406c51
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> > @@ -0,0 +1,46 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=400
> > +
> > +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/stack_trace > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		echo 0 > /proc/sys/kernel/stack_tracer_enabled
> > +		echo 1 > /proc/sys/kernel/stack_tracer_enabled
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> > new file mode 100755
> > index 0000000..e36712b
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> > @@ -0,0 +1,27 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> > new file mode 100755
> > index 0000000..de6bbea
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> > @@ -0,0 +1,46 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=400
> > +
> > +# In kernel which is older than 2.6.32, we set global clock
> > +# via trace_options.
> > +tst_kvercmp 2 6 32
> > +if [ $? -eq 0 ]; then
> > +        old_kernel=1
> > +else
> > +        old_kernel=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $old_kernel -eq 1 ];
> > +	then
> > +		for ((i = 0; i < $LOOP; i++))
> > +		{
> > +			echo 1 > "$TRACING_PATH"/options/global-clock
> > +			echo 0 > "$TRACING_PATH"/options/global-clock
> > +		}
> > +	else
> > +		for ((i = 0; i < $LOOP; i++))
> > +		{
> > +			echo local > "$TRACING_PATH"/trace_clock
> > +			echo global > "$TRACING_PATH"/trace_clock
> > +		}
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> > new file mode 100755
> > index 0000000..47d2a62
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> > @@ -0,0 +1,42 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +trace_options=(print-parent sym-offset sym-addr verbose raw hex bin block trace_printk ftrace_preempt branch annotate userstacktrace sym-userobj printk-msg-only context-info latency-format sleep-time graph-time)
> > +
> > +NR_TRACE_OPTIONS=19
> > +
> > +for ((; ; ))
> > +{
> > +	for ((j = 0; j < $LOOP; j++))
> > +	{
> > +		num=`date +%N`
> > +		num=`printf 1%s $num`
> > +
> > +		for ((i = 0; i < $NR_TRACE_OPTIONS; i++))
> > +		{
> > +			n=$(( ( $num >> $i ) % 2 ))
> > +			if [ $n -eq 0 ]; then
> > +				echo 0 > "$TRACING_PATH"/options/${trace_options[$i]}
> > +			else
> > +				echo 1 > "$TRACING_PATH"/options/${trace_options[$i]}
> > +			fi
> > +		}
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> > new file mode 100755
> > index 0000000..47d42bc
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> > @@ -0,0 +1,52 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +ftrace_sleep()
> > +{
> > +	# usleep is not a standard command?
> > +	usleep 200000 2> /dev/null
> > +	if [ $? -ne 0 ]; then
> > +		sleep 1
> > +	fi
> > +}
> > +
> > +kill_this_pid()
> > +{
> > +	/bin/kill -SIGKILL $this_pid
> > +	wait $this_pid
> > +	exit 0
> > +}
> > +
> > +trap kill_this_pid SIGUSR1
> > +
> > +LOOP=20
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace_pipe > /dev/null &
> > +
> > +		this_pid=$!
> > +		ftrace_sleep
> > +		/bin/kill -SIGINT $this_pid
> > +		wait $this_pid
> > +		this_pid=0
> > +		ftrace_sleep
> > +	}
> > +
> > +	sleep 2
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> > new file mode 100755
> > index 0000000..cb601db
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> > @@ -0,0 +1,45 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +should_skip=0
> > +
> > +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> > +        should_skip=1
> > +fi
> > +
> > +# For kernels older than 2.6.36, this testcase can result in 
> > +# divide-by-zero kernel bug
> > +tst_kvercmp 2 6 36
> > +if [ $? -eq 0 ]; then
> > +	should_skip=1
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace_stat/function0 > /dev/null 2>&1
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> > new file mode 100755
> > index 0000000..69f2ae6
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/tracing_enabled
> > +		echo 1 > "$TRACING_PATH"/tracing_enabled
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 0 > "$TRACING_PATH"/tracing_enabled
> > +	else
> > +		echo 1 > "$TRACING_PATH"/tracing_enabled
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> > new file mode 100755
> > index 0000000..f19d734
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> > @@ -0,0 +1,38 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LATENCY=100000
> > +
> > +if [ ! -e "$TRACING_PATH"/tracing_max_latency ]; then
> > +        should_skip=1
> > +else
> > +        should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +        if [ $should_skip -eq 1 ]; then
> > +                sleep 2
> > +                continue
> > +        fi
> > +
> > +	for ((i = 0; i < $MAX_LATENCY; i += 400))
> > +	{
> > +		echo $i > "$TRACING_PATH"/tracing_max_latency
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> > new file mode 100755
> > index 0000000..672c223
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/tracing_on
> > +		echo 1 > "$TRACING_PATH"/tracing_on
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 0 > "$TRACING_PATH"/tracing_on
> > +	else
> > +		echo 1 > "$TRACING_PATH"/tracing_on
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > new file mode 100755
> > index 0000000..874268e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > @@ -0,0 +1,237 @@
> > +#! /bin/sh
> > +
> > +################################################################################
> > +##                                                                            ##
> > +## Copyright (c) 2010 FUJITSU LIMITED                                         ##
> > +##                                                                            ##
> > +## This program is free software;  you can redistribute it and#or modify      ##
> > +## it under the terms of the GNU General Public License as published by       ##
> > +## the Free Software Foundation; either version 2 of the License, or          ##
> > +## (at your option) any later version.                                        ##
> > +##                                                                            ##
> > +## This program is distributed in the hope that it will be useful, but        ##
> > +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
> > +## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
> > +## for more details.                                                          ##
> > +##                                                                            ##
> > +## You should have received a copy of the GNU General Public License          ##
> > +## along with this program;  if not, write to the Free Software               ##
> > +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
> > +##                                                                            ##
> > +## Author: Li Zefan <lizf@cn.fujitsu.com>                                     ##
> > +##                                                                            ##
> > +################################################################################
> > +
> > +cd $LTPROOT/testcases/bin
> > +
> > +export TCID="ftrace-stress-test"
> > +export TST_TOTAL=1
> > +export TST_COUNT=1
> > +
> > +export TPATH="$PWD"
> > +export DEBUGFS_PATH="$PWD/debugfs"
> > +export TRACING_PATH="$PWD/debugfs/tracing"
> > +export SPATH="$TPATH/ftrace_stress"
> > +
> > +test_interval=$1
> > +
> > +save_old_setting()
> > +{
> > +	cd $TRACING_PATH
> > +
> > +	old_trace_options=( `cat trace_options` )
> > +	old_tracing_on=`cat tracing_on`
> > +	old_tracing_enabled=`cat tracing_enabled`
> > +	old_buffer_size=`cat buffer_size_kb`
> > +
> > +	if [ -e stack_max_size ]; then
> > +		old_stack_tracer_enabled=`cat /proc/sys/kernel/stack_tracer_enabled`
> > +	fi
> > +
> > +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> > +		old_ftrace_enabled=`cat /proc/sys/kernel/ftrace_enabled`
> > +	fi
> > +
> > +	if [ -e "function_profile_enabled" ]; then
> > +		old_profile_enabled=`cat function_profile_enabled`
> > +	fi
> > +
> > +	cd - > /dev/null
> > +}
> > +
> > +restore_old_setting()
> > +{
> > +	cd $TRACING_PATH
> > +
> > +	echo nop > current_tracer
> > +	echo 0 > events/enable
> > +	echo 0 > tracing_max_latency 2> /dev/null
> > +
> > +	if [ -e trace_clock ]; then
> > +		echo local > trace_clock
> > +	fi
> > +
> > +	if [ -e "function_pofile_enabled" ]; then
> > +		echo $old_profile_enabled > function_profile_enabled
> > +	fi
> > +
> > +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> > +		echo $old_ftrace_enabled > /proc/sys/kernel/ftrace_enabled
> > +	fi
> > +
> > +	if [ -e stack_max_size ]; then
> > +		echo $old_stack_tracer_enabled > /proc/sys/kernel/stack_tracer_enabled
> > +		echo 0 > stack_max_size
> > +	fi
> > +
> > +	echo $old_buffer_size > buffer_size_kb
> > +	echo $old_tracing_on > tracing_on
> > +	echo $old_tracing_enabled > tracing_enabled
> > +
> > +	for option in $old_trace_options
> > +	do
> > +		echo $option > trace_options 2> /dev/null
> > +	done
> > +
> > +	echo > trace
> > +
> > +	cd - > /dev/null
> > +}
> > +
> > +clean_up()
> > +{
> > +	kill -KILL $pid1
> > +	kill -KILL $pid2
> > +	kill -KILL $pid3
> > +	kill -KILL $pid4
> > +	kill -KILL $pid5
> > +	kill -KILL $pid6
> > +	kill -KILL $pid7
> > +	kill -KILL $pid8
> > +	kill -KILL $pid9
> > +	kill -KILL $pid10
> > +	kill -KILL $pid11
> > +	kill -USR1 $pid12
> > +	kill -KILL $pid13
> > +	kill -KILL $pid14
> > +	kill -KILL $pid15
> > +	kill -KILL $pid16
> > +
> > +	sleep 2
> > +	restore_old_setting
> > +
> > +	umount $DEBUGFS_PATH
> > +	rmdir $DEBUGFS_PATH
> > +}
> > +
> > +clean_up_exit()
> > +{
> > +	clean_up
> > +	exit 1
> > +}
> > +
> > +export_pids()
> > +{
> > +	export pid1 pid2 pid3 pid4 pid5 pid6 pid7 pid8 pid9 pid10 pid11 pid12 \
> > +		pid13 pid14 pid15 pid16
> > +
> > +	export NR_PIDS=16
> > +}
> > +
> > +test_begin()
> > +{
> > +	start_time=`date +%s`
> > +}
> > +
> > +test_wait()
> > +{
> > +	for ((; ;))
> > +	{
> > +		sleep 2
> > +
> > +		cur_time=`date +%s`
> > +		elapsed=$(( $cur_time - $start_time ))
> > +
> > +		# run the stress test for $test_interval secs
> > +		if [ $elapsed -ge $test_interval ]; then
> > +			break
> > +		fi
> > +	}
> > +}
> > +
> > +trap clean_up_exit SIGINT
> > +
> > +# Should be run by root user
> > +if [ `id -ru` != 0 ]; then
> > +	tst_brkm TCONF ignored "The test should be run by root user. Skip the test..."
> > +	exit 0
> > +fi
> > +
> > +# Don't run the test on kernels older than 2.6.34, otherwise
> > +# it can crash the system if the kernel is not latest-stable
> > +tst_kvercmp 2 6 34
> > +if [ $? -eq 0 ]; then
> > +	tst_brkm TCONF ignored "The test should be run in kernels >= 2.6.34. Skip the test..."
> > +	exit 0
> > +fi
> > +
> > +mkdir $DEBUGFS_PATH
> > +mount -t debugfs xxx $DEBUGFS_PATH
> > +
> > +# Check to see tracing feature is supported or not
> > +if [ ! -d $TRACING_PATH ]; then
> > +	tst_brkm TCONF ignored "Tracing is not supported. Skip the test..."
> > +	umount $DEBUGFS_PATH
> > +	rmdir $DEBUGFS_PATH
> > +	exit 0
> > +fi
> > +
> > +echo "Ftrace Stress Test Begin"
> > +
> > +save_old_setting
> > +
> > +test_begin
> > +
> > +$SPATH/ftrace_trace_clock.sh &
> > +pid1=$!
> > +$SPATH/ftrace_current_tracer.sh &
> > +pid2=$!
> > +$SPATH/ftrace_trace_options.sh &
> > +pid3=$!
> > +$SPATH/ftrace_tracing_max_latency.sh &
> > +pid4=$!
> > +$SPATH/ftrace_stack_trace.sh &
> > +pid5=$!
> > +$SPATH/ftrace_stack_max_size.sh &
> > +pid6=$!
> > +$SPATH/ftrace_tracing_on.sh &
> > +pid7=$!
> > +$SPATH/ftrace_tracing_enabled.sh &
> > +pid8=$!
> > +$SPATH/ftrace_set_event.sh &
> > +pid9=$!
> > +$SPATH/ftrace_buffer_size.sh &
> > +pid10=$!
> > +$SPATH/ftrace_trace.sh &
> > +pid11=$!
> > +$SPATH/ftrace_trace_pipe.sh &
> > +pid12=$!
> > +$SPATH/ftrace_ftrace_enabled.sh &
> > +pid13=$!
> > +$SPATH/ftrace_set_ftrace_pid.sh &
> > +pid14=$!
> > +$SPATH/ftrace_profile_enabled.sh &
> > +pid15=$!
> > +$SPATH/ftrace_trace_stat.sh &
> > +pid16=$!
> > +
> > +export_pids
> > +
> > +test_wait
> > +
> > +clean_up
> > +
> > +echo "Ftrace Stress Test End"
> > +
> > +tst_resm TPASS "finished running the test. Run dmesg to double-check for bugs"
> > +
> > -- 
> > 1.6.3
> > 
> > ------------------------------------------------------------------------------
> > This SF.net Dev2Dev email is sponsored by:
> > 
> > Show off your parallel programming skills.
> > Enter the Intel(R) Threading Challenge 2010.
> > http://p.sf.net/sfu/intel-thread-sfd
> > _______________________________________________
> > Ltp-list mailing list
> > Ltp-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ltp-list
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-09-28 16:05 ` Subrata Modak
  2010-10-04  7:13   ` Subrata Modak
@ 2010-10-13  7:21   ` Subrata Modak
  2010-10-13  7:29     ` Li Zefan
  1 sibling, 1 reply; 37+ messages in thread
From: Subrata Modak @ 2010-10-13  7:21 UTC (permalink / raw)
  To: Li Zefan; +Cc: ltp-list

Li,

Can you kindly fix the below issues and send me a new patch ?

Regards--
Subrata

On Tue, 2010-09-28 at 21:35 +0530, Subrata Modak wrote:
> On Tue, 2010-09-07 at 10:50 +0800, Li Zefan wrote:
> > We test ftrace by forking processes to simultaneously and
> > constantly read/write different tracing files in debugfs
> > and procfs. This stress test aims at revealing races in
> > various corner cases
> > 
> > The test will be skipped if the kernel is older than 2.6.34,
> > mainly because it can crash old kernels.
> > 
> > The test will run by default and will run for 90 seconds.
> > 
> > To run this test only:
> > 
> > 	# ./runltp -f tracing
> > 
> > 
> > Changelog for v2:
> > 
> > - Addressed the comments from Garrett
> > 
> > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> 
> Sorry for responding late. I gave a try to these tests and has my
> following observations:
> 
> You said that the tests can run on kernels above 2.6.34 without issues.
> But, i ran them on stable 2.6.35.4 and still found kernel panics. I
> built kernel 2.6.35.4 on my existing Fedora 13 PowerPC box.
> 
> # uname -a
> Linux 2.6.35.4 #2 SMP Tue Sep 28 16:07:27 IST 2010 ppc64 ppc64 ppc64
> GNU/Linux
> # cat /etc/issue
> Fedora release 13 (Goddard)
> Kernel \r on an \m (\l)
> 
> When i ran the tests:
> Running tests.......
> <<<test_start>>>
> tag=ftrace-stress-test stime=1285684343
> cmdline="ftrace_stress_test.sh 90"
> contacts=""
> analysis=exit
> <<<test_output>>>
> incrementing stop
> Ftrace Stress Test Begin
> ...
> 
> The following panic and system reboot was observed on mu Serial console:
> ========================================================================
> Unable to handle kernel paging request for data at address
> 0xbffffe4007fc8040
> Unable to handle kernel paging request for data at address
> 0xbffffe4007fc8040
> Faulting instruction address: 0xc00000000010f4a8
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=128 NUMA pSeries
> last sysfs
> file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
> Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
> scsi_tgt [last unloaded: scsi_wait_scan]
> NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
> REGS: c0000000dafa70a0 TRAP: 0300   Tainted: G        W    (2.6.35.4)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
> DAR: bffffe4007fc8040, DSISR: 0000000040000000
> TASK = c0000000daf950d0[9] 'migration/2' THREAD: c0000000dafa4000 CPU: 2
> GPR00: 0000000000009c35 c0000000dafa7320 c000000001735d40
> 0000000000000000 
> GPR04: c00000000010f308 c0000000dafa7278 0000000000000000
> 0000000000009c34 
> GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
> c000000001033720 
> GPR12: 0000000028002042 c000000007fc8e00 0000000006e3fa78
> 00000000005f3000 
> GPR16: c0000000dafa77d0 c000000001c852b0 c0000000dafa77c0
> 0000000000000000 
> GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
> c0000000017dea80 
> GPR24: 0000000000c55000 c0000000daeabc00 0000000001dcff22
> c0000000daf950d0 
> GPR28: c000000001c87780 c0000000017cea80 c0000000016a5df0
> c0000000dafa7320 
> NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
> LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
> Call Trace:
> [c0000000dafa7320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
> (unreliable)
> [c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
> [c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Instruction dump:
> e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
> 7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
> 7c0b512a 
> Faulting instruction address: 0xc00000000010f4a8
> Oops: Kernel access of bad area, sig: 11 [#2]
> SMP NR_CPUS=128 NUMA pSeries
> last sysfs
> file: /sys/devices/vio/30000002/host0/target0:0:2/0:0:2:0/model
> Modules linked in: sunrpc ipv6 uinput ehea ibmvscsic scsi_transport_srp
> scsi_tgt [last unloaded: scsi_wait_scan]
> NIP: c00000000010f4a8 LR: c00000000010f30c CTR: c00000000020f698
> REGS: c0000000dafc30a0 TRAP: 0300   Tainted: G      D W    (2.6.35.4)
> MSR: 8000000000001032 <ME,IR,DR>  CR: 48002048  XER: 00000000
> DAR: bffffe4007fc8040, DSISR: 0000000040000000
> TASK = c0000000dafb35e0[12] 'migration/3' THREAD: c0000000dafc0000 CPU:
> 3
> GPR00: 0000000000009c34 c0000000dafc3320 c000000001735d40
> 0000000000000000 
> GPR04: c00000000010f308 c0000000dafc3278 0000000000000000
> 0000000000009c33 
> GPR08: fffffe4000000000 c0000000de003580 bffffe4007fc8000
> c000000001033720 
> GPR12: c0000000d1725300 c000000007fc9500 0000000006e3fa78
> 00000000005f3000 
> GPR16: c0000000dafc37d0 c000000001cc52b0 c0000000dafc37c0
> 0000000000000000 
> GPR20: 0000000000000000 c000000001813350 7fffffffffffffff
> c0000000017dea80 
> GPR24: 0000000000c95000 c0000000dafb8800 0000000001daff3e
> c0000000dafb35e0 
> GPR28: c000000001cc7780 c0000000017cea80 c0000000016a5df0
> c0000000dafc3320 
> NIP [c00000000010f4a8] .update_curr_rt+0x1e8/0x538
> LR [c00000000010f30c] .update_curr_rt+0x4c/0x538
> Call Trace:
> [c0000000dafc3320] [c00000000010f30c] .update_curr_rt+0x4c/0x538
> (unreliable)
> [c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
> [c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Instruction dump:
> e9290050 1d080700 f80b5888 48000038 e95e8010 e97e8000 e94a0000 e8eb5890 
> 7d4a4214 38070001 f80b5890 e9690020 <e94a0040> 7c0b502a 7c00d214
> 7c0b512a 
> Kernel panic - not syncing: Fatal exception in interrupt
> Call Trace:
> [c0000000dafa6ce0] [c00000000001d068] .show_stack+0x148/0x384
> (unreliable)
> [c0000000dafa6dc0] [c000000000bdd208] .dump_stack+0x50/0x78
> [c0000000dafa6e50] [c000000000bdd328] .panic+0xf8/0x26c
> [c0000000dafa6ef0] [c00000000004a2d8] .die+0x434/0x494
> [c0000000dafa6fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
> [c0000000dafa7030] [c000000000005704] handle_page_fault+0x3c/0x74
> --- Exception: 300 at .update_curr_rt+0x1e8/0x538
>     LR = .update_curr_rt+0x4c/0x538
> [c0000000dafa73f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafa7490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafa7550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafa75f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafa76a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafa7750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafa7860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafa7900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7bf0] [c0000000dafa7cb0] 0xc0000000dafa7cb0 (unreliable)
> Kernel panic - not syncing: Fatal exception in interrupt
> [c0000000dafa7c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafa7d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafa7ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafa7f90] [c00000000004e270] .kernel_thread+0x54/0x70
> Call Trace:
> [c0000000dafc2ce0] [c00000000001d068] .show_stack+0x148/0x384
> (unreliable)
> [c0000000dafc2dc0] [c000000000bdd208] .dump_stack+0x50/0x78
> [c0000000dafc2e50] [c000000000bdd328] .panic+0xf8/0x26c
> [c0000000dafc2ef0] [c00000000004a2d8] .die+0x434/0x494
> [c0000000dafc2fa0] [c0000000000679a8] .bad_page_fault+0x154/0x184
> [c0000000dafc3030] [c000000000005704] handle_page_fault+0x3c/0x74
> --- Exception: 300 at .update_curr_rt+0x1e8/0x538
>     LR = .update_curr_rt+0x4c/0x538
> [c0000000dafc33f0] [c00000000010f848] .task_tick_rt+0x50/0x1a4
> [c0000000dafc3490] [c000000000121468] .scheduler_tick+0x2ac/0x684
> [c0000000dafc3550] [c00000000014c2c8] .update_process_times+0xd0/0x120
> [c0000000dafc35f0] [c00000000018b76c] .tick_sched_timer+0x128/0x1a8
> [c0000000dafc36a0] [c000000000174324] .__run_hrtimer+0x28c/0x3d8
> [c0000000dafc3750] [c000000000174960] .hrtimer_interrupt+0x18c/0x3c8
> [c0000000dafc3860] [c000000000047c00] .timer_interrupt+0x40c/0x598
> [c0000000dafc3900] [c000000000003728] decrementer_common+0x128/0x180
> --- Exception: 901 at .raw_local_irq_restore+0x168/0x194
>     LR = .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3bf0] [c0000000dafc3cb0] 0xc0000000dafc3cb0 (unreliable)
> [c0000000dafc3c90] [c0000000001d66c8] .stop_machine_cpu_stop+0x2a4/0x2f4
> [c0000000dafc3d50] [c0000000001d6238] .cpu_stopper_thread+0x1dc/0x3c8
> [c0000000dafc3ec0] [c00000000016be28] .kthread+0x124/0x13c
> [c0000000dafc3f90] [c00000000004e270] .kernel_thread+0x54/0x70
> RTAS: event: 29, Type: Platform Error, Severity: 2
> ibm,os-term call failed -1
> Rebooting in 180 seconds..
> RTAS: event: 30, Type: Platform Error, Severity: 2
> ibm,os-term call failed -1
> Rebooting in 180 seconds..
> ========================================================================
> 
> Can you please address the following things:
>      1. I was not sure which particular CONFIG options to enable when
>         building kernel to enable tracing options that these tests would
>         require. So, i had enabled most of them while building the
>         kernel. Please see the attached config file. In your next
>         patch[v3], can you please a bit of documentation on this front
>         of what other system requirements are needed to execute these
>         tests, including the kernel CONFIG options to be enabled,
>      2. So, going by your description, the tests should run on kernel
>         greater than 2.6.34. But, on kernel 2.6.35.4 it still creates
>         kernel panic. So, is this
>              I. a test case issues ?
>             II. or, real kernel bug which has not yet being addressed
>                 till now ?
> 
> Regards--
> Subrata
> 
> > ---
> >  runltp                                             |    3 +-
> >  runtest/tracing                                    |    2 +
> >  testcases/kernel/Makefile                          |    2 +-
> >  testcases/kernel/tracing/Makefile                  |    5 +
> >  .../kernel/tracing/ftrace_stress_test/Makefile     |    7 +
> >  .../ftrace_stress_test/ftrace_get_page_size.c      |   10 +
> >  .../ftrace_stress/ftrace_buffer_size.sh            |   43 ++++
> >  .../ftrace_stress/ftrace_current_tracer.sh         |   34 +++
> >  .../ftrace_stress/ftrace_ftrace_enabled.sh         |   39 ++++
> >  .../ftrace_stress/ftrace_profile_enabled.sh        |   50 ++++
> >  .../ftrace_stress/ftrace_set_event.sh              |   44 ++++
> >  .../ftrace_stress/ftrace_set_ftrace_pid.sh         |   44 ++++
> >  .../ftrace_stress/ftrace_stack_max_size.sh         |   39 ++++
> >  .../ftrace_stress/ftrace_stack_trace.sh            |   46 ++++
> >  .../ftrace_stress/ftrace_trace.sh                  |   27 +++
> >  .../ftrace_stress/ftrace_trace_clock.sh            |   46 ++++
> >  .../ftrace_stress/ftrace_trace_options.sh          |   42 ++++
> >  .../ftrace_stress/ftrace_trace_pipe.sh             |   52 +++++
> >  .../ftrace_stress/ftrace_trace_stat.sh             |   45 ++++
> >  .../ftrace_stress/ftrace_tracing_enabled.sh        |   39 ++++
> >  .../ftrace_stress/ftrace_tracing_max_latency.sh    |   38 +++
> >  .../ftrace_stress/ftrace_tracing_on.sh             |   39 ++++
> >  .../ftrace_stress_test/ftrace_stress_test.sh       |  237 ++++++++++++++++++++
> >  23 files changed, 931 insertions(+), 2 deletions(-)
> >  create mode 100644 runtest/tracing
> >  create mode 100644 testcases/kernel/tracing/Makefile
> >  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/Makefile
> >  create mode 100644 testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> >  create mode 100755 testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > 
> > diff --git a/runltp b/runltp
> > index b385984..89b1717 100755
> > --- a/runltp
> > +++ b/runltp
> > @@ -593,7 +593,8 @@ main()
> >                           ${LTPROOT}/runtest/numa                    \
> >                           ${LTPROOT}/runtest/hugetlb                 \
> >                           ${LTPROOT}/runtest/commands                \
> > -                         ${LTPROOT}/runtest/hyperthreading
> > +                         ${LTPROOT}/runtest/hyperthreading          \
> > +                         ${LTPROOT}/runtest/tracing
> >          do
> >              [ -e "$SCENFILES" ] || \
> >              {
> > diff --git a/runtest/tracing b/runtest/tracing
> > new file mode 100644
> > index 0000000..ef3a048
> > --- /dev/null
> > +++ b/runtest/tracing
> > @@ -0,0 +1,2 @@
> > +#DESCRIPTION:Tracing testing
> > +ftrace-stress-test	ftrace_stress_test.sh 90
> > diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
> > index e2a9d8e..8c50025 100644
> > --- a/testcases/kernel/Makefile
> > +++ b/testcases/kernel/Makefile
> > @@ -30,7 +30,7 @@ include $(top_srcdir)/include/mk/env_pre.mk
> >  ifneq ($(UCLINUX),1)
> >  SUBDIRS		:= containers connectors controllers fs hotplug io ipc mem \
> >  		   numa performance_counters power_management pty sched \
> > -		   security syscalls timers
> > +		   security syscalls timers tracing
> >  else
> >  SUBDIRS		:= syscalls
> >  endif
> > diff --git a/testcases/kernel/tracing/Makefile b/testcases/kernel/tracing/Makefile
> > new file mode 100644
> > index 0000000..e9f96c3
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/Makefile
> > @@ -0,0 +1,5 @@
> > +top_srcdir		?= ../../..
> > +
> > +include $(top_srcdir)/include/mk/env_pre.mk
> > +
> > +include $(top_srcdir)/include/mk/generic_trunk_target.mk
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/Makefile b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> > new file mode 100644
> > index 0000000..e4a913a
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/Makefile
> > @@ -0,0 +1,7 @@
> > +top_srcdir              ?= ../../../..
> > +
> > +include $(top_srcdir)/include/mk/testcases.mk
> > +
> > +INSTALL_TARGETS         := *.sh ftrace_stress/*
> > +
> > +include $(top_srcdir)/include/mk/generic_leaf_target.mk
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> > new file mode 100644
> > index 0000000..b52a109
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_get_page_size.c
> > @@ -0,0 +1,10 @@
> > +#include <unistd.h>
> > +#include <stdio.h>
> > +
> > +int main(void)
> > +{
> > +	printf("%d\n", getpagesize());
> > +
> > +	return 0;
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> > new file mode 100755
> > index 0000000..af5a98e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_buffer_size.sh
> > @@ -0,0 +1,43 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +# Use up to 10% of free memory
> > +free_mem=`cat /proc/meminfo | grep '^MemFree' | awk '{ print $2 }'`
> > +step=$(( $free_mem / 10 / $LOOP ))
> > +if [ $step -eq 0 ]; then
> > +	$step=1
> > +	LOOP=50
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	new_size=1
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> > +		new_size=$(( $new_size + $step ))
> > +	}
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		new_size=$(( $new_size - $step ))
> > +		echo $new_size > "$TRACING_PATH"/buffer_size_kb
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> > new file mode 100755
> > index 0000000..88d576f
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_current_tracer.sh
> > @@ -0,0 +1,34 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		for tracer in `cat "$TRACING_PATH"/available_tracers`
> > +		do
> > +			if [ "$tracer" = mmiotrace ]; then
> > +				continue
> > +			fi
> > +
> > +			echo $tracer > "$TRACING_PATH"/current_tracer 2> /dev/null
> > +		done
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> > new file mode 100755
> > index 0000000..20bb234
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_ftrace_enabled.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > /proc/sys/kernel/ftrace_enabled
> > +		echo 1 > /proc/sys/kernel/ftrace_enabled
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 1 > /proc/sys/kernel/ftrace_enabled
> > +	else
> > +		echo 0 > /proc/sys/kernel/ftrace_enabled
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> > new file mode 100755
> > index 0000000..9c6162a
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_profile_enabled.sh
> > @@ -0,0 +1,50 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 1 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	else
> > +		echo 0 > "$TRACING_PATH"/function_profile_enabled 2> /dev/null
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> > new file mode 100755
> > index 0000000..d7efdd4
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_event.sh
> > @@ -0,0 +1,44 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < 100; i++))
> > +	{
> > +		echo 1 > "$TRACING_PATH"/events/enable
> > +		echo 0 > "$TRACING_PATH"/events/enable
> > +	}
> > +
> > +	for dir in `ls $TRACING_PATH/events/`
> > +	do
> > +		if [ ! -d $dir -o "$dir" = ftrace ]; then
> > +			continue;
> > +		fi
> > +
> > +		for ((i = 0; i < 20; i++))
> > +		{
> > +			echo 1 > "$TRACING_PATH"/events/$dir/enable
> > +			echo 0 > "$TRACING_PATH"/events/$dir/enable
> > +		}
> > +	done
> > +
> > +	for event in `cat $TRACING_PATH/available_events`;
> > +	do
> > +		echo $event >> "$TRACING_PATH"/set_event
> > +	done
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> > new file mode 100755
> > index 0000000..541215c
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_set_ftrace_pid.sh
> > @@ -0,0 +1,44 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=300
> > +
> > +if [ ! -e "$TRACING_PATH"/set_ftrace_pid ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ; ))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((j = 0; j < $LOOP; j++))
> > +	{
> > +		for ((k = 1; k <= NR_PIDS; k++))
> > +		{
> > +			str="\$pid$k"
> > +			eval echo $str >> "$TRACING_PATH"/set_ftrace_pid
> > +		}
> > +
> > +		echo > "$TRACING_PATH"/set_ftrace_pid
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> > new file mode 100755
> > index 0000000..682d05e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_max_size.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_STACK_SIZE=8192
> > +
> > +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $MAX_STACK_SIZE; i += 70))
> > +	{
> > +		echo $i > "$TRACING_PATH"/stack_max_size
> > +		cat "$TRACING_PATH"/stack_max_size > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> > new file mode 100755
> > index 0000000..a406c51
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_stack_trace.sh
> > @@ -0,0 +1,46 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=400
> > +
> > +if [ ! -e /proc/sys/kernel/stack_tracer_enabled ]; then
> > +	should_skip=1
> > +else
> > +	should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/stack_trace > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		echo 0 > /proc/sys/kernel/stack_tracer_enabled
> > +		echo 1 > /proc/sys/kernel/stack_tracer_enabled
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> > new file mode 100755
> > index 0000000..e36712b
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace.sh
> > @@ -0,0 +1,27 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace > /dev/null
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> > new file mode 100755
> > index 0000000..de6bbea
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_clock.sh
> > @@ -0,0 +1,46 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=400
> > +
> > +# In kernel which is older than 2.6.32, we set global clock
> > +# via trace_options.
> > +tst_kvercmp 2 6 32
> > +if [ $? -eq 0 ]; then
> > +        old_kernel=1
> > +else
> > +        old_kernel=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $old_kernel -eq 1 ];
> > +	then
> > +		for ((i = 0; i < $LOOP; i++))
> > +		{
> > +			echo 1 > "$TRACING_PATH"/options/global-clock
> > +			echo 0 > "$TRACING_PATH"/options/global-clock
> > +		}
> > +	else
> > +		for ((i = 0; i < $LOOP; i++))
> > +		{
> > +			echo local > "$TRACING_PATH"/trace_clock
> > +			echo global > "$TRACING_PATH"/trace_clock
> > +		}
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> > new file mode 100755
> > index 0000000..47d2a62
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_options.sh
> > @@ -0,0 +1,42 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +trace_options=(print-parent sym-offset sym-addr verbose raw hex bin block trace_printk ftrace_preempt branch annotate userstacktrace sym-userobj printk-msg-only context-info latency-format sleep-time graph-time)
> > +
> > +NR_TRACE_OPTIONS=19
> > +
> > +for ((; ; ))
> > +{
> > +	for ((j = 0; j < $LOOP; j++))
> > +	{
> > +		num=`date +%N`
> > +		num=`printf 1%s $num`
> > +
> > +		for ((i = 0; i < $NR_TRACE_OPTIONS; i++))
> > +		{
> > +			n=$(( ( $num >> $i ) % 2 ))
> > +			if [ $n -eq 0 ]; then
> > +				echo 0 > "$TRACING_PATH"/options/${trace_options[$i]}
> > +			else
> > +				echo 1 > "$TRACING_PATH"/options/${trace_options[$i]}
> > +			fi
> > +		}
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> > new file mode 100755
> > index 0000000..47d42bc
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_pipe.sh
> > @@ -0,0 +1,52 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +ftrace_sleep()
> > +{
> > +	# usleep is not a standard command?
> > +	usleep 200000 2> /dev/null
> > +	if [ $? -ne 0 ]; then
> > +		sleep 1
> > +	fi
> > +}
> > +
> > +kill_this_pid()
> > +{
> > +	/bin/kill -SIGKILL $this_pid
> > +	wait $this_pid
> > +	exit 0
> > +}
> > +
> > +trap kill_this_pid SIGUSR1
> > +
> > +LOOP=20
> > +
> > +for ((; ;))
> > +{
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace_pipe > /dev/null &
> > +
> > +		this_pid=$!
> > +		ftrace_sleep
> > +		/bin/kill -SIGINT $this_pid
> > +		wait $this_pid
> > +		this_pid=0
> > +		ftrace_sleep
> > +	}
> > +
> > +	sleep 2
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> > new file mode 100755
> > index 0000000..cb601db
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_trace_stat.sh
> > @@ -0,0 +1,45 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +LOOP=200
> > +
> > +should_skip=0
> > +
> > +if [ ! -e "$TRACING_PATH"/function_profile_enabled ]; then
> > +        should_skip=1
> > +fi
> > +
> > +# For kernels older than 2.6.36, this testcase can result in 
> > +# divide-by-zero kernel bug
> > +tst_kvercmp 2 6 36
> > +if [ $? -eq 0 ]; then
> > +	should_skip=1
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +	if [ $should_skip -eq 1 ]; then
> > +		sleep 2
> > +		continue
> > +	fi
> > +
> > +	for ((i = 0; i < $LOOP; i++))
> > +	{
> > +		cat "$TRACING_PATH"/trace_stat/function0 > /dev/null 2>&1
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> > new file mode 100755
> > index 0000000..69f2ae6
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_enabled.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/tracing_enabled
> > +		echo 1 > "$TRACING_PATH"/tracing_enabled
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 0 > "$TRACING_PATH"/tracing_enabled
> > +	else
> > +		echo 1 > "$TRACING_PATH"/tracing_enabled
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> > new file mode 100755
> > index 0000000..f19d734
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_max_latency.sh
> > @@ -0,0 +1,38 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LATENCY=100000
> > +
> > +if [ ! -e "$TRACING_PATH"/tracing_max_latency ]; then
> > +        should_skip=1
> > +else
> > +        should_skip=0
> > +fi
> > +
> > +for ((; ;))
> > +{
> > +        if [ $should_skip -eq 1 ]; then
> > +                sleep 2
> > +                continue
> > +        fi
> > +
> > +	for ((i = 0; i < $MAX_LATENCY; i += 400))
> > +	{
> > +		echo $i > "$TRACING_PATH"/tracing_max_latency
> > +	}
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> > new file mode 100755
> > index 0000000..672c223
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress/ftrace_tracing_on.sh
> > @@ -0,0 +1,39 @@
> > +#! /bin/sh
> > +
> > +###############################################################################
> > +#                                                                             #
> > +# Copyright (c) 2010 FUJITSU LIMITED                                          #
> > +#                                                                             #
> > +# This program is free software; you can redistribute it and/or modify it     #
> > +# under the terms of the GNU General Public License as published by the Free  #
> > +# Software Foundation; either version 2 of the License, or (at your option)   #
> > +# any later version.                                                          #
> > +#                                                                             #
> > +# Author: Li Zefan <lizf@cn.fujitsu.com>                                      #
> > +#                                                                             #
> > +###############################################################################
> > +
> > +MAX_LOOP=1500
> > +count=0
> > +
> > +for ((; ;))
> > +{
> > +	count=$(( $count + 1 ))
> > +
> > +	for ((i = 0; i < $MAX_LOOP; i++))
> > +	{
> > +		echo 0 > "$TRACING_PATH"/tracing_on
> > +		echo 1 > "$TRACING_PATH"/tracing_on
> > +	}
> > +
> > +	enable=$(( $count % 3 ))
> > +
> > +	if [ $enable -eq 0 ]; then
> > +		echo 0 > "$TRACING_PATH"/tracing_on
> > +	else
> > +		echo 1 > "$TRACING_PATH"/tracing_on
> > +	fi
> > +
> > +	sleep 1
> > +}
> > +
> > diff --git a/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > new file mode 100755
> > index 0000000..874268e
> > --- /dev/null
> > +++ b/testcases/kernel/tracing/ftrace_stress_test/ftrace_stress_test.sh
> > @@ -0,0 +1,237 @@
> > +#! /bin/sh
> > +
> > +################################################################################
> > +##                                                                            ##
> > +## Copyright (c) 2010 FUJITSU LIMITED                                         ##
> > +##                                                                            ##
> > +## This program is free software;  you can redistribute it and#or modify      ##
> > +## it under the terms of the GNU General Public License as published by       ##
> > +## the Free Software Foundation; either version 2 of the License, or          ##
> > +## (at your option) any later version.                                        ##
> > +##                                                                            ##
> > +## This program is distributed in the hope that it will be useful, but        ##
> > +## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
> > +## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
> > +## for more details.                                                          ##
> > +##                                                                            ##
> > +## You should have received a copy of the GNU General Public License          ##
> > +## along with this program;  if not, write to the Free Software               ##
> > +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA    ##
> > +##                                                                            ##
> > +## Author: Li Zefan <lizf@cn.fujitsu.com>                                     ##
> > +##                                                                            ##
> > +################################################################################
> > +
> > +cd $LTPROOT/testcases/bin
> > +
> > +export TCID="ftrace-stress-test"
> > +export TST_TOTAL=1
> > +export TST_COUNT=1
> > +
> > +export TPATH="$PWD"
> > +export DEBUGFS_PATH="$PWD/debugfs"
> > +export TRACING_PATH="$PWD/debugfs/tracing"
> > +export SPATH="$TPATH/ftrace_stress"
> > +
> > +test_interval=$1
> > +
> > +save_old_setting()
> > +{
> > +	cd $TRACING_PATH
> > +
> > +	old_trace_options=( `cat trace_options` )
> > +	old_tracing_on=`cat tracing_on`
> > +	old_tracing_enabled=`cat tracing_enabled`
> > +	old_buffer_size=`cat buffer_size_kb`
> > +
> > +	if [ -e stack_max_size ]; then
> > +		old_stack_tracer_enabled=`cat /proc/sys/kernel/stack_tracer_enabled`
> > +	fi
> > +
> > +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> > +		old_ftrace_enabled=`cat /proc/sys/kernel/ftrace_enabled`
> > +	fi
> > +
> > +	if [ -e "function_profile_enabled" ]; then
> > +		old_profile_enabled=`cat function_profile_enabled`
> > +	fi
> > +
> > +	cd - > /dev/null
> > +}
> > +
> > +restore_old_setting()
> > +{
> > +	cd $TRACING_PATH
> > +
> > +	echo nop > current_tracer
> > +	echo 0 > events/enable
> > +	echo 0 > tracing_max_latency 2> /dev/null
> > +
> > +	if [ -e trace_clock ]; then
> > +		echo local > trace_clock
> > +	fi
> > +
> > +	if [ -e "function_pofile_enabled" ]; then
> > +		echo $old_profile_enabled > function_profile_enabled
> > +	fi
> > +
> > +	if [ -e "/proc/sys/kernel/ftrace_enabled" ]; then
> > +		echo $old_ftrace_enabled > /proc/sys/kernel/ftrace_enabled
> > +	fi
> > +
> > +	if [ -e stack_max_size ]; then
> > +		echo $old_stack_tracer_enabled > /proc/sys/kernel/stack_tracer_enabled
> > +		echo 0 > stack_max_size
> > +	fi
> > +
> > +	echo $old_buffer_size > buffer_size_kb
> > +	echo $old_tracing_on > tracing_on
> > +	echo $old_tracing_enabled > tracing_enabled
> > +
> > +	for option in $old_trace_options
> > +	do
> > +		echo $option > trace_options 2> /dev/null
> > +	done
> > +
> > +	echo > trace
> > +
> > +	cd - > /dev/null
> > +}
> > +
> > +clean_up()
> > +{
> > +	kill -KILL $pid1
> > +	kill -KILL $pid2
> > +	kill -KILL $pid3
> > +	kill -KILL $pid4
> > +	kill -KILL $pid5
> > +	kill -KILL $pid6
> > +	kill -KILL $pid7
> > +	kill -KILL $pid8
> > +	kill -KILL $pid9
> > +	kill -KILL $pid10
> > +	kill -KILL $pid11
> > +	kill -USR1 $pid12
> > +	kill -KILL $pid13
> > +	kill -KILL $pid14
> > +	kill -KILL $pid15
> > +	kill -KILL $pid16
> > +
> > +	sleep 2
> > +	restore_old_setting
> > +
> > +	umount $DEBUGFS_PATH
> > +	rmdir $DEBUGFS_PATH
> > +}
> > +
> > +clean_up_exit()
> > +{
> > +	clean_up
> > +	exit 1
> > +}
> > +
> > +export_pids()
> > +{
> > +	export pid1 pid2 pid3 pid4 pid5 pid6 pid7 pid8 pid9 pid10 pid11 pid12 \
> > +		pid13 pid14 pid15 pid16
> > +
> > +	export NR_PIDS=16
> > +}
> > +
> > +test_begin()
> > +{
> > +	start_time=`date +%s`
> > +}
> > +
> > +test_wait()
> > +{
> > +	for ((; ;))
> > +	{
> > +		sleep 2
> > +
> > +		cur_time=`date +%s`
> > +		elapsed=$(( $cur_time - $start_time ))
> > +
> > +		# run the stress test for $test_interval secs
> > +		if [ $elapsed -ge $test_interval ]; then
> > +			break
> > +		fi
> > +	}
> > +}
> > +
> > +trap clean_up_exit SIGINT
> > +
> > +# Should be run by root user
> > +if [ `id -ru` != 0 ]; then
> > +	tst_brkm TCONF ignored "The test should be run by root user. Skip the test..."
> > +	exit 0
> > +fi
> > +
> > +# Don't run the test on kernels older than 2.6.34, otherwise
> > +# it can crash the system if the kernel is not latest-stable
> > +tst_kvercmp 2 6 34
> > +if [ $? -eq 0 ]; then
> > +	tst_brkm TCONF ignored "The test should be run in kernels >= 2.6.34. Skip the test..."
> > +	exit 0
> > +fi
> > +
> > +mkdir $DEBUGFS_PATH
> > +mount -t debugfs xxx $DEBUGFS_PATH
> > +
> > +# Check to see tracing feature is supported or not
> > +if [ ! -d $TRACING_PATH ]; then
> > +	tst_brkm TCONF ignored "Tracing is not supported. Skip the test..."
> > +	umount $DEBUGFS_PATH
> > +	rmdir $DEBUGFS_PATH
> > +	exit 0
> > +fi
> > +
> > +echo "Ftrace Stress Test Begin"
> > +
> > +save_old_setting
> > +
> > +test_begin
> > +
> > +$SPATH/ftrace_trace_clock.sh &
> > +pid1=$!
> > +$SPATH/ftrace_current_tracer.sh &
> > +pid2=$!
> > +$SPATH/ftrace_trace_options.sh &
> > +pid3=$!
> > +$SPATH/ftrace_tracing_max_latency.sh &
> > +pid4=$!
> > +$SPATH/ftrace_stack_trace.sh &
> > +pid5=$!
> > +$SPATH/ftrace_stack_max_size.sh &
> > +pid6=$!
> > +$SPATH/ftrace_tracing_on.sh &
> > +pid7=$!
> > +$SPATH/ftrace_tracing_enabled.sh &
> > +pid8=$!
> > +$SPATH/ftrace_set_event.sh &
> > +pid9=$!
> > +$SPATH/ftrace_buffer_size.sh &
> > +pid10=$!
> > +$SPATH/ftrace_trace.sh &
> > +pid11=$!
> > +$SPATH/ftrace_trace_pipe.sh &
> > +pid12=$!
> > +$SPATH/ftrace_ftrace_enabled.sh &
> > +pid13=$!
> > +$SPATH/ftrace_set_ftrace_pid.sh &
> > +pid14=$!
> > +$SPATH/ftrace_profile_enabled.sh &
> > +pid15=$!
> > +$SPATH/ftrace_trace_stat.sh &
> > +pid16=$!
> > +
> > +export_pids
> > +
> > +test_wait
> > +
> > +clean_up
> > +
> > +echo "Ftrace Stress Test End"
> > +
> > +tst_resm TPASS "finished running the test. Run dmesg to double-check for bugs"
> > +
> > -- 
> > 1.6.3
> > 
> > ------------------------------------------------------------------------------
> > This SF.net Dev2Dev email is sponsored by:
> > 
> > Show off your parallel programming skills.
> > Enter the Intel(R) Threading Challenge 2010.
> > http://p.sf.net/sfu/intel-thread-sfd
> > _______________________________________________
> > Ltp-list mailing list
> > Ltp-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ltp-list
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-10-13  7:21   ` Subrata Modak
@ 2010-10-13  7:29     ` Li Zefan
  2010-10-13  7:35       ` Li Zefan
  0 siblings, 1 reply; 37+ messages in thread
From: Li Zefan @ 2010-10-13  7:29 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list

Subrata Modak wrote:
> Li,
> 
> Can you kindly fix the below issues and send me a new patch ?
> 

Sure, I will.

Sorry for not responding. I have been busy travling, and I'll be off
again and will be back next monday, so I'll look into this after
the trip.


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-10-13  7:29     ` Li Zefan
@ 2010-10-13  7:35       ` Li Zefan
  2010-10-13 11:29         ` Li Zefan
  0 siblings, 1 reply; 37+ messages in thread
From: Li Zefan @ 2010-10-13  7:35 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list

Li Zefan wrote:
> Subrata Modak wrote:
>> Li,
>>
>> Can you kindly fix the below issues and send me a new patch ?
>>
> 
> Sure, I will.
> 

At a first glance, the kernel bug doesn't seem to come from ftrace,
at least not directly from it.

Question:

Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
haven't tried it, could you test it? Thanks!


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-10-13  7:35       ` Li Zefan
@ 2010-10-13 11:29         ` Li Zefan
  2010-10-13 18:37           ` Subrata Modak
  0 siblings, 1 reply; 37+ messages in thread
From: Li Zefan @ 2010-10-13 11:29 UTC (permalink / raw)
  To: subrata; +Cc: ltp-list

Li Zefan wrote:
> Li Zefan wrote:
>> Subrata Modak wrote:
>>> Li,
>>>
>>> Can you kindly fix the below issues and send me a new patch ?
>>>
>> Sure, I will.
>>
> 
> At a first glance, the kernel bug doesn't seem to come from ftrace,
> at least not directly from it.
> 
> Question:
> 
> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> haven't tried it, could you test it? Thanks!
> 

I got a patch from Peter, though he's not sure about the bug yet.
So could you try this?

Note, I don't know if this patch can be applied to 2.6.35-4..

======================

(From Peter)

Hrmm, not something I've seen before.. but since the migration thread
and stop_machine are involved, does the below patch which rewrites the
migration-thread/stop_macehine/scheduler interaction cure this?

This patch is probably .37 fodder, but who knows..

---
Subject: sched: Create special class for stop/migrate work
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Wed Sep 22 13:53:15 CEST 2010

In order to separate the stop/migrate work thread from the SCHED_FIFO
implementation, create a special class for it that is of higher priority
than SCHED_FIFO itself.

This currently solves a problem where cpu-hotplug consumes so much cpu-time
that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
timer pending on the now dead cpu.

It is also required for when we add the planned deadline scheduling class
above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
tasks.

Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1285165776.2275.1022.camel@laptop>
---
 kernel/sched.c          |   54 ++++++++++++++++++++----
 kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/stop_machine.c   |    8 ++-
 3 files changed, 158 insertions(+), 12 deletions(-)

Index: linux-2.6/kernel/sched.c
===================================================================
--- linux-2.6.orig/kernel/sched.c
+++ linux-2.6/kernel/sched.c
@@ -486,7 +486,7 @@ struct rq {
 	 */
 	unsigned long nr_uninterruptible;
 
-	struct task_struct *curr, *idle;
+	struct task_struct *curr, *idle, *stop;
 	unsigned long next_balance;
 	struct mm_struct *prev_mm;
 
@@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
 
 static const struct sched_class rt_sched_class;
 
-#define sched_class_highest (&rt_sched_class)
+#define sched_class_highest (&stop_sched_class)
 #define for_each_class(class) \
    for (class = sched_class_highest; class; class = class->next)
 
@@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
 #include "sched_idletask.c"
 #include "sched_fair.c"
 #include "sched_rt.c"
+#include "sched_stoptask.c"
 #ifdef CONFIG_SCHED_DEBUG
 # include "sched_debug.c"
 #endif
 
+void sched_set_stop_task(int cpu, struct task_struct *stop)
+{
+	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
+	struct task_struct *old_stop = cpu_rq(cpu)->stop;
+
+	if (stop) {
+		/*
+		 * Make it appear like a SCHED_FIFO task, its something
+		 * userspace knows about and won't get confused about.
+		 *
+		 * Also, it will make PI more or less work without too
+		 * much confusion -- but then, stop work should not
+		 * rely on PI working anyway.
+		 */
+		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
+
+		stop->sched_class = &stop_sched_class;
+	}
+
+	cpu_rq(cpu)->stop = stop;
+
+	if (old_stop) {
+		/*
+		 * Reset it back to a normal scheduling class so that
+		 * it can die in pieces.
+		 */
+		old_stop->sched_class = &rt_sched_class;
+	}
+}
+
 /*
  * __normal_prio - return the priority that is based on the static prio
  */
@@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
 			return p;
 	}
 
-	class = sched_class_highest;
-	for ( ; ; ) {
+	for_each_class(class) {
 		p = class->pick_next_task(rq);
 		if (p)
 			return p;
-		/*
-		 * Will never be NULL as the idle class always
-		 * returns a non-NULL p:
-		 */
-		class = class->next;
 	}
+
+	BUG(); /* the idle class will always have a runnable task */
 }
 
 /*
@@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
 	 */
 	rq = __task_rq_lock(p);
 
+	/*
+	 * Changing the policy of the stop threads its a very bad idea
+	 */
+	if (p == rq->stop) {
+		__task_rq_unlock(rq);
+		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
+		return -EINVAL;
+	}
+
 #ifdef CONFIG_RT_GROUP_SCHED
 	if (user) {
 		/*
Index: linux-2.6/kernel/stop_machine.c
===================================================================
--- linux-2.6.orig/kernel/stop_machine.c
+++ linux-2.6/kernel/stop_machine.c
@@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
 	goto repeat;
 }
 
+extern void sched_set_stop_task(int cpu, struct task_struct *stop);
+
 /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
 static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
 					   unsigned long action, void *hcpu)
 {
-	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
 	unsigned int cpu = (unsigned long)hcpu;
 	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
 	struct task_struct *p;
@@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
 				   cpu);
 		if (IS_ERR(p))
 			return NOTIFY_BAD;
-		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
 		get_task_struct(p);
+		kthread_bind(p, cpu);
+		sched_set_stop_task(cpu, p);
 		stopper->thread = p;
 		break;
 
 	case CPU_ONLINE:
-		kthread_bind(stopper->thread, cpu);
 		/* strictly unnecessary, as first user will wake it */
 		wake_up_process(stopper->thread);
 		/* mark enabled */
@@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
 	{
 		struct cpu_stop_work *work;
 
+		sched_set_stop_task(cpu, NULL);
 		/* kill the stopper */
 		kthread_stop(stopper->thread);
 		/* drain remaining works */
Index: linux-2.6/kernel/sched_stoptask.c
===================================================================
--- /dev/null
+++ linux-2.6/kernel/sched_stoptask.c
@@ -0,0 +1,108 @@
+/*
+ * stop-task scheduling class.
+ *
+ * The stop task is the highest priority task in the system, it preempts
+ * everything and will be preempted by nothing.
+ *
+ * See kernel/stop_machine.c
+ */
+
+#ifdef CONFIG_SMP
+static int
+select_task_rq_stop(struct rq *rq, struct task_struct *p,
+		    int sd_flag, int flags)
+{
+	return task_cpu(p); /* stop tasks as never migrate */
+}
+#endif /* CONFIG_SMP */
+
+static void
+check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
+{
+	resched_task(rq->curr); /* we preempt everything */
+}
+
+static struct task_struct *pick_next_task_stop(struct rq *rq)
+{
+	struct task_struct *stop = rq->stop;
+
+	if (stop && stop->state == TASK_RUNNING)
+		return stop;
+
+	return NULL;
+}
+
+static void
+enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
+{
+}
+
+static void
+dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
+{
+}
+
+static void yield_task_stop(struct rq *rq)
+{
+	BUG(); /* the stop task should never yield, its pointless. */
+}
+
+static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
+{
+}
+
+static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
+{
+}
+
+static void set_curr_task_stop(struct rq *rq)
+{
+}
+
+static void switched_to_stop(struct rq *rq, struct task_struct *p,
+			     int running)
+{
+	BUG(); /* its impossible to change to this class */
+}
+
+static void prio_changed_stop(struct rq *rq, struct task_struct *p,
+			      int oldprio, int running)
+{
+	BUG(); /* how!?, what priority? */
+}
+
+static unsigned int
+get_rr_interval_stop(struct rq *rq, struct task_struct *task)
+{
+	return 0;
+}
+
+/*
+ * Simple, special scheduling class for the per-CPU stop tasks:
+ */
+static const struct sched_class stop_sched_class = {
+	.next			= &rt_sched_class,
+
+	.enqueue_task		= enqueue_task_stop,
+	.dequeue_task		= dequeue_task_stop,
+	.yield_task		= yield_task_stop,
+
+	.check_preempt_curr	= check_preempt_curr_stop,
+
+	.pick_next_task		= pick_next_task_stop,
+	.put_prev_task		= put_prev_task_stop,
+
+#ifdef CONFIG_SMP
+	.select_task_rq		= select_task_rq_stop,
+#endif
+
+	.set_curr_task          = set_curr_task_stop,
+	.task_tick		= task_tick_stop,
+
+	.get_rr_interval	= get_rr_interval_stop,
+
+	.prio_changed		= prio_changed_stop,
+	.switched_to		= switched_to_stop,
+
+	/* no .task_new for stop tasks */
+};




------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-10-13 11:29         ` Li Zefan
@ 2010-10-13 18:37           ` Subrata Modak
  2010-10-13 19:01             ` Subrata Modak
  2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
  0 siblings, 2 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-13 18:37 UTC (permalink / raw)
  To: Li Zefan; +Cc: ltp-list

I get a bigger trace with this patch:

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc0000000002133f0
cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
    pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
    lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
    sp: c0000000d9f8b7e0
   msr: 800000000200b032
   dar: 0
 dsisr: 40000000
  current = 0xc0000000d9f7d100
  paca    = 0xc000000007fc8e00
    pid   = 1667, comm = ftrace_stack_tr
Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
address 0xbffFffffe0175b688
PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
le) at [c0000000d9f8a6a0]
p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl


    lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
    sp: c0000000018804e8
   msr: 8000000000001032
  current = 0xc0000000d838d100
  paca    = 0xc000000007fc8000
    pid   = 1668, comm = ftrace_stack_ma
 pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
[c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
+0x24c/0x2a4
[c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
[c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
+0x44/0x6c
[c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
+0x7c/0x144
[c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
[c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
[c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
[c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
[c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804

Regards--
Subrata

On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
> Li Zefan wrote:
> > Li Zefan wrote:
> >> Subrata Modak wrote:
> >>> Li,
> >>>
> >>> Can you kindly fix the below issues and send me a new patch ?
> >>>
> >> Sure, I will.
> >>
> > 
> > At a first glance, the kernel bug doesn't seem to come from ftrace,
> > at least not directly from it.
> > 
> > Question:
> > 
> > Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> > haven't tried it, could you test it? Thanks!
> > 
> 
> I got a patch from Peter, though he's not sure about the bug yet.
> So could you try this?
> 
> Note, I don't know if this patch can be applied to 2.6.35-4..
> 
> ======================
> 
> (From Peter)
> 
> Hrmm, not something I've seen before.. but since the migration thread
> and stop_machine are involved, does the below patch which rewrites the
> migration-thread/stop_macehine/scheduler interaction cure this?
> 
> This patch is probably .37 fodder, but who knows..
> 
> ---
> Subject: sched: Create special class for stop/migrate work
> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Wed Sep 22 13:53:15 CEST 2010
> 
> In order to separate the stop/migrate work thread from the SCHED_FIFO
> implementation, create a special class for it that is of higher priority
> than SCHED_FIFO itself.
> 
> This currently solves a problem where cpu-hotplug consumes so much cpu-time
> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
> timer pending on the now dead cpu.
> 
> It is also required for when we add the planned deadline scheduling class
> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
> tasks.
> 
> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> LKML-Reference: <1285165776.2275.1022.camel@laptop>
> ---
>  kernel/sched.c          |   54 ++++++++++++++++++++----
>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
>  kernel/stop_machine.c   |    8 ++-
>  3 files changed, 158 insertions(+), 12 deletions(-)
> 
> Index: linux-2.6/kernel/sched.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched.c
> +++ linux-2.6/kernel/sched.c
> @@ -486,7 +486,7 @@ struct rq {
>  	 */
>  	unsigned long nr_uninterruptible;
> 
> -	struct task_struct *curr, *idle;
> +	struct task_struct *curr, *idle, *stop;
>  	unsigned long next_balance;
>  	struct mm_struct *prev_mm;
> 
> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
> 
>  static const struct sched_class rt_sched_class;
> 
> -#define sched_class_highest (&rt_sched_class)
> +#define sched_class_highest (&stop_sched_class)
>  #define for_each_class(class) \
>     for (class = sched_class_highest; class; class = class->next)
> 
> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
>  #include "sched_idletask.c"
>  #include "sched_fair.c"
>  #include "sched_rt.c"
> +#include "sched_stoptask.c"
>  #ifdef CONFIG_SCHED_DEBUG
>  # include "sched_debug.c"
>  #endif
> 
> +void sched_set_stop_task(int cpu, struct task_struct *stop)
> +{
> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
> +
> +	if (stop) {
> +		/*
> +		 * Make it appear like a SCHED_FIFO task, its something
> +		 * userspace knows about and won't get confused about.
> +		 *
> +		 * Also, it will make PI more or less work without too
> +		 * much confusion -- but then, stop work should not
> +		 * rely on PI working anyway.
> +		 */
> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
> +
> +		stop->sched_class = &stop_sched_class;
> +	}
> +
> +	cpu_rq(cpu)->stop = stop;
> +
> +	if (old_stop) {
> +		/*
> +		 * Reset it back to a normal scheduling class so that
> +		 * it can die in pieces.
> +		 */
> +		old_stop->sched_class = &rt_sched_class;
> +	}
> +}
> +
>  /*
>   * __normal_prio - return the priority that is based on the static prio
>   */
> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
>  			return p;
>  	}
> 
> -	class = sched_class_highest;
> -	for ( ; ; ) {
> +	for_each_class(class) {
>  		p = class->pick_next_task(rq);
>  		if (p)
>  			return p;
> -		/*
> -		 * Will never be NULL as the idle class always
> -		 * returns a non-NULL p:
> -		 */
> -		class = class->next;
>  	}
> +
> +	BUG(); /* the idle class will always have a runnable task */
>  }
> 
>  /*
> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
>  	 */
>  	rq = __task_rq_lock(p);
> 
> +	/*
> +	 * Changing the policy of the stop threads its a very bad idea
> +	 */
> +	if (p == rq->stop) {
> +		__task_rq_unlock(rq);
> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
> +		return -EINVAL;
> +	}
> +
>  #ifdef CONFIG_RT_GROUP_SCHED
>  	if (user) {
>  		/*
> Index: linux-2.6/kernel/stop_machine.c
> ===================================================================
> --- linux-2.6.orig/kernel/stop_machine.c
> +++ linux-2.6/kernel/stop_machine.c
> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
>  	goto repeat;
>  }
> 
> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
> +
>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
>  					   unsigned long action, void *hcpu)
>  {
> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>  	unsigned int cpu = (unsigned long)hcpu;
>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
>  	struct task_struct *p;
> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
>  				   cpu);
>  		if (IS_ERR(p))
>  			return NOTIFY_BAD;
> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
>  		get_task_struct(p);
> +		kthread_bind(p, cpu);
> +		sched_set_stop_task(cpu, p);
>  		stopper->thread = p;
>  		break;
> 
>  	case CPU_ONLINE:
> -		kthread_bind(stopper->thread, cpu);
>  		/* strictly unnecessary, as first user will wake it */
>  		wake_up_process(stopper->thread);
>  		/* mark enabled */
> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
>  	{
>  		struct cpu_stop_work *work;
> 
> +		sched_set_stop_task(cpu, NULL);
>  		/* kill the stopper */
>  		kthread_stop(stopper->thread);
>  		/* drain remaining works */
> Index: linux-2.6/kernel/sched_stoptask.c
> ===================================================================
> --- /dev/null
> +++ linux-2.6/kernel/sched_stoptask.c
> @@ -0,0 +1,108 @@
> +/*
> + * stop-task scheduling class.
> + *
> + * The stop task is the highest priority task in the system, it preempts
> + * everything and will be preempted by nothing.
> + *
> + * See kernel/stop_machine.c
> + */
> +
> +#ifdef CONFIG_SMP
> +static int
> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
> +		    int sd_flag, int flags)
> +{
> +	return task_cpu(p); /* stop tasks as never migrate */
> +}
> +#endif /* CONFIG_SMP */
> +
> +static void
> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
> +{
> +	resched_task(rq->curr); /* we preempt everything */
> +}
> +
> +static struct task_struct *pick_next_task_stop(struct rq *rq)
> +{
> +	struct task_struct *stop = rq->stop;
> +
> +	if (stop && stop->state == TASK_RUNNING)
> +		return stop;
> +
> +	return NULL;
> +}
> +
> +static void
> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> +{
> +}
> +
> +static void
> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> +{
> +}
> +
> +static void yield_task_stop(struct rq *rq)
> +{
> +	BUG(); /* the stop task should never yield, its pointless. */
> +}
> +
> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> +{
> +}
> +
> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
> +{
> +}
> +
> +static void set_curr_task_stop(struct rq *rq)
> +{
> +}
> +
> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
> +			     int running)
> +{
> +	BUG(); /* its impossible to change to this class */
> +}
> +
> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
> +			      int oldprio, int running)
> +{
> +	BUG(); /* how!?, what priority? */
> +}
> +
> +static unsigned int
> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
> +{
> +	return 0;
> +}
> +
> +/*
> + * Simple, special scheduling class for the per-CPU stop tasks:
> + */
> +static const struct sched_class stop_sched_class = {
> +	.next			= &rt_sched_class,
> +
> +	.enqueue_task		= enqueue_task_stop,
> +	.dequeue_task		= dequeue_task_stop,
> +	.yield_task		= yield_task_stop,
> +
> +	.check_preempt_curr	= check_preempt_curr_stop,
> +
> +	.pick_next_task		= pick_next_task_stop,
> +	.put_prev_task		= put_prev_task_stop,
> +
> +#ifdef CONFIG_SMP
> +	.select_task_rq		= select_task_rq_stop,
> +#endif
> +
> +	.set_curr_task          = set_curr_task_stop,
> +	.task_tick		= task_tick_stop,
> +
> +	.get_rr_interval	= get_rr_interval_stop,
> +
> +	.prio_changed		= prio_changed_stop,
> +	.switched_to		= switched_to_stop,
> +
> +	/* no .task_new for stop tasks */
> +};
> 
> 
> 


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH v2] Add ftrace-stress-test to LTP
  2010-10-13 18:37           ` Subrata Modak
@ 2010-10-13 19:01             ` Subrata Modak
  2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
  1 sibling, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-13 19:01 UTC (permalink / raw)
  To: Li Zefan; +Cc: ltp-list

On Thu, 2010-10-14 at 00:07 +0530, Subrata Modak wrote:
> I get a bigger trace with this patch:

However i merged this test cases with LTP just now except the default
running part. I will raise a bug internally and try to see if a fix is
available.

Regards--
Subrata

> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc0000000002133f0
> cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
>     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
>     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
>     sp: c0000000d9f8b7e0
>    msr: 800000000200b032
>    dar: 0
>  dsisr: 40000000
>   current = 0xc0000000d9f7d100
>   paca    = 0xc000000007fc8e00
>     pid   = 1667, comm = ftrace_stack_tr
> Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> address 0xbffFffffe0175b688
> PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> le) at [c0000000d9f8a6a0]
> p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> 
> 
>     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
>     sp: c0000000018804e8
>    msr: 8000000000001032
>   current = 0xc0000000d838d100
>   paca    = 0xc000000007fc8000
>     pid   = 1668, comm = ftrace_stack_ma
>  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> 
> Regards--
> Subrata
> 
> On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
> > Li Zefan wrote:
> > > Li Zefan wrote:
> > >> Subrata Modak wrote:
> > >>> Li,
> > >>>
> > >>> Can you kindly fix the below issues and send me a new patch ?
> > >>>
> > >> Sure, I will.
> > >>
> > > 
> > > At a first glance, the kernel bug doesn't seem to come from ftrace,
> > > at least not directly from it.
> > > 
> > > Question:
> > > 
> > > Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> > > haven't tried it, could you test it? Thanks!
> > > 
> > 
> > I got a patch from Peter, though he's not sure about the bug yet.
> > So could you try this?
> > 
> > Note, I don't know if this patch can be applied to 2.6.35-4..
> > 
> > ======================
> > 
> > (From Peter)
> > 
> > Hrmm, not something I've seen before.. but since the migration thread
> > and stop_machine are involved, does the below patch which rewrites the
> > migration-thread/stop_macehine/scheduler interaction cure this?
> > 
> > This patch is probably .37 fodder, but who knows..
> > 
> > ---
> > Subject: sched: Create special class for stop/migrate work
> > From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Date: Wed Sep 22 13:53:15 CEST 2010
> > 
> > In order to separate the stop/migrate work thread from the SCHED_FIFO
> > implementation, create a special class for it that is of higher priority
> > than SCHED_FIFO itself.
> > 
> > This currently solves a problem where cpu-hotplug consumes so much cpu-time
> > that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
> > timer pending on the now dead cpu.
> > 
> > It is also required for when we add the planned deadline scheduling class
> > above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
> > tasks.
> > 
> > Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > LKML-Reference: <1285165776.2275.1022.camel@laptop>
> > ---
> >  kernel/sched.c          |   54 ++++++++++++++++++++----
> >  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
> >  kernel/stop_machine.c   |    8 ++-
> >  3 files changed, 158 insertions(+), 12 deletions(-)
> > 
> > Index: linux-2.6/kernel/sched.c
> > ===================================================================
> > --- linux-2.6.orig/kernel/sched.c
> > +++ linux-2.6/kernel/sched.c
> > @@ -486,7 +486,7 @@ struct rq {
> >  	 */
> >  	unsigned long nr_uninterruptible;
> > 
> > -	struct task_struct *curr, *idle;
> > +	struct task_struct *curr, *idle, *stop;
> >  	unsigned long next_balance;
> >  	struct mm_struct *prev_mm;
> > 
> > @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
> > 
> >  static const struct sched_class rt_sched_class;
> > 
> > -#define sched_class_highest (&rt_sched_class)
> > +#define sched_class_highest (&stop_sched_class)
> >  #define for_each_class(class) \
> >     for (class = sched_class_highest; class; class = class->next)
> > 
> > @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
> >  #include "sched_idletask.c"
> >  #include "sched_fair.c"
> >  #include "sched_rt.c"
> > +#include "sched_stoptask.c"
> >  #ifdef CONFIG_SCHED_DEBUG
> >  # include "sched_debug.c"
> >  #endif
> > 
> > +void sched_set_stop_task(int cpu, struct task_struct *stop)
> > +{
> > +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> > +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
> > +
> > +	if (stop) {
> > +		/*
> > +		 * Make it appear like a SCHED_FIFO task, its something
> > +		 * userspace knows about and won't get confused about.
> > +		 *
> > +		 * Also, it will make PI more or less work without too
> > +		 * much confusion -- but then, stop work should not
> > +		 * rely on PI working anyway.
> > +		 */
> > +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
> > +
> > +		stop->sched_class = &stop_sched_class;
> > +	}
> > +
> > +	cpu_rq(cpu)->stop = stop;
> > +
> > +	if (old_stop) {
> > +		/*
> > +		 * Reset it back to a normal scheduling class so that
> > +		 * it can die in pieces.
> > +		 */
> > +		old_stop->sched_class = &rt_sched_class;
> > +	}
> > +}
> > +
> >  /*
> >   * __normal_prio - return the priority that is based on the static prio
> >   */
> > @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
> >  			return p;
> >  	}
> > 
> > -	class = sched_class_highest;
> > -	for ( ; ; ) {
> > +	for_each_class(class) {
> >  		p = class->pick_next_task(rq);
> >  		if (p)
> >  			return p;
> > -		/*
> > -		 * Will never be NULL as the idle class always
> > -		 * returns a non-NULL p:
> > -		 */
> > -		class = class->next;
> >  	}
> > +
> > +	BUG(); /* the idle class will always have a runnable task */
> >  }
> > 
> >  /*
> > @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
> >  	 */
> >  	rq = __task_rq_lock(p);
> > 
> > +	/*
> > +	 * Changing the policy of the stop threads its a very bad idea
> > +	 */
> > +	if (p == rq->stop) {
> > +		__task_rq_unlock(rq);
> > +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
> > +		return -EINVAL;
> > +	}
> > +
> >  #ifdef CONFIG_RT_GROUP_SCHED
> >  	if (user) {
> >  		/*
> > Index: linux-2.6/kernel/stop_machine.c
> > ===================================================================
> > --- linux-2.6.orig/kernel/stop_machine.c
> > +++ linux-2.6/kernel/stop_machine.c
> > @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
> >  	goto repeat;
> >  }
> > 
> > +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
> > +
> >  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
> >  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
> >  					   unsigned long action, void *hcpu)
> >  {
> > -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >  	unsigned int cpu = (unsigned long)hcpu;
> >  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
> >  	struct task_struct *p;
> > @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
> >  				   cpu);
> >  		if (IS_ERR(p))
> >  			return NOTIFY_BAD;
> > -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
> >  		get_task_struct(p);
> > +		kthread_bind(p, cpu);
> > +		sched_set_stop_task(cpu, p);
> >  		stopper->thread = p;
> >  		break;
> > 
> >  	case CPU_ONLINE:
> > -		kthread_bind(stopper->thread, cpu);
> >  		/* strictly unnecessary, as first user will wake it */
> >  		wake_up_process(stopper->thread);
> >  		/* mark enabled */
> > @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
> >  	{
> >  		struct cpu_stop_work *work;
> > 
> > +		sched_set_stop_task(cpu, NULL);
> >  		/* kill the stopper */
> >  		kthread_stop(stopper->thread);
> >  		/* drain remaining works */
> > Index: linux-2.6/kernel/sched_stoptask.c
> > ===================================================================
> > --- /dev/null
> > +++ linux-2.6/kernel/sched_stoptask.c
> > @@ -0,0 +1,108 @@
> > +/*
> > + * stop-task scheduling class.
> > + *
> > + * The stop task is the highest priority task in the system, it preempts
> > + * everything and will be preempted by nothing.
> > + *
> > + * See kernel/stop_machine.c
> > + */
> > +
> > +#ifdef CONFIG_SMP
> > +static int
> > +select_task_rq_stop(struct rq *rq, struct task_struct *p,
> > +		    int sd_flag, int flags)
> > +{
> > +	return task_cpu(p); /* stop tasks as never migrate */
> > +}
> > +#endif /* CONFIG_SMP */
> > +
> > +static void
> > +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
> > +{
> > +	resched_task(rq->curr); /* we preempt everything */
> > +}
> > +
> > +static struct task_struct *pick_next_task_stop(struct rq *rq)
> > +{
> > +	struct task_struct *stop = rq->stop;
> > +
> > +	if (stop && stop->state == TASK_RUNNING)
> > +		return stop;
> > +
> > +	return NULL;
> > +}
> > +
> > +static void
> > +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> > +{
> > +}
> > +
> > +static void
> > +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> > +{
> > +}
> > +
> > +static void yield_task_stop(struct rq *rq)
> > +{
> > +	BUG(); /* the stop task should never yield, its pointless. */
> > +}
> > +
> > +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> > +{
> > +}
> > +
> > +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
> > +{
> > +}
> > +
> > +static void set_curr_task_stop(struct rq *rq)
> > +{
> > +}
> > +
> > +static void switched_to_stop(struct rq *rq, struct task_struct *p,
> > +			     int running)
> > +{
> > +	BUG(); /* its impossible to change to this class */
> > +}
> > +
> > +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
> > +			      int oldprio, int running)
> > +{
> > +	BUG(); /* how!?, what priority? */
> > +}
> > +
> > +static unsigned int
> > +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
> > +{
> > +	return 0;
> > +}
> > +
> > +/*
> > + * Simple, special scheduling class for the per-CPU stop tasks:
> > + */
> > +static const struct sched_class stop_sched_class = {
> > +	.next			= &rt_sched_class,
> > +
> > +	.enqueue_task		= enqueue_task_stop,
> > +	.dequeue_task		= dequeue_task_stop,
> > +	.yield_task		= yield_task_stop,
> > +
> > +	.check_preempt_curr	= check_preempt_curr_stop,
> > +
> > +	.pick_next_task		= pick_next_task_stop,
> > +	.put_prev_task		= put_prev_task_stop,
> > +
> > +#ifdef CONFIG_SMP
> > +	.select_task_rq		= select_task_rq_stop,
> > +#endif
> > +
> > +	.set_curr_task          = set_curr_task_stop,
> > +	.task_tick		= task_tick_stop,
> > +
> > +	.get_rr_interval	= get_rr_interval_stop,
> > +
> > +	.prio_changed		= prio_changed_stop,
> > +	.switched_to		= switched_to_stop,
> > +
> > +	/* no .task_new for stop tasks */
> > +};
> > 
> > 
> > 
> 
> 
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
  2010-10-13 18:37           ` Subrata Modak
  2010-10-13 19:01             ` Subrata Modak
@ 2010-10-18  3:19               ` Li Zefan
  1 sibling, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-18  3:19 UTC (permalink / raw)
  To: subrata
  Cc: ltp-list, Steven Rostedt, Ingo Molnar, Peter Zijlstra,
	Anton Blanchard, Paul Mackerras, LKML, linuxppc-dev

Cc: Steven
Cc: Ingo
Cc: Peter
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>

For those Cced, More information here:

http://marc.info/?l=ltp-list&m=128569007015044&w=2
http://marc.info/?l=ltp-list&m=128696942432669&w=2

02:37, Subrata Modak wrote:
> I get a bigger trace with this patch:
> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc0000000002133f0
> cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
>     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
>     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
>     sp: c0000000d9f8b7e0
>    msr: 800000000200b032
>    dar: 0
>  dsisr: 40000000
>   current = 0xc0000000d9f7d100
>   paca    = 0xc000000007fc8e00
>     pid   = 1667, comm = ftrace_stack_tr
> Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> address 0xbffFffffe0175b688
> PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> le) at [c0000000d9f8a6a0]
> p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> 
> 
>     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
>     sp: c0000000018804e8
>    msr: 8000000000001032
>   current = 0xc0000000d838d100
>   paca    = 0xc000000007fc8000
>     pid   = 1668, comm = ftrace_stack_ma
>  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0

This is a dead loop:

trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..

And this is a PPC specific bug. Hope some ppc guys will fix it?
Or we kill trace_clock_global() if no one actually uses it..

--
Li Zefan

> [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> 
> Regards--
> Subrata
> 
> On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
>> Li Zefan wrote:
>>> Li Zefan wrote:
>>>> Subrata Modak wrote:
>>>>> Li,
>>>>>
>>>>> Can you kindly fix the below issues and send me a new patch ?
>>>>>
>>>> Sure, I will.
>>>>
>>> At a first glance, the kernel bug doesn't seem to come from ftrace,
>>> at least not directly from it.
>>>
>>> Question:
>>>
>>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
>>> haven't tried it, could you test it? Thanks!
>>>
>> I got a patch from Peter, though he's not sure about the bug yet.
>> So could you try this?
>>
>> Note, I don't know if this patch can be applied to 2.6.35-4..
>>
>> ======================
>>
>> (From Peter)
>>
>> Hrmm, not something I've seen before.. but since the migration thread
>> and stop_machine are involved, does the below patch which rewrites the
>> migration-thread/stop_macehine/scheduler interaction cure this?
>>
>> This patch is probably .37 fodder, but who knows..
>>
>> ---
>> Subject: sched: Create special class for stop/migrate work
>> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Date: Wed Sep 22 13:53:15 CEST 2010
>>
>> In order to separate the stop/migrate work thread from the SCHED_FIFO
>> implementation, create a special class for it that is of higher priority
>> than SCHED_FIFO itself.
>>
>> This currently solves a problem where cpu-hotplug consumes so much cpu-time
>> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
>> timer pending on the now dead cpu.
>>
>> It is also required for when we add the planned deadline scheduling class
>> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
>> tasks.
>>
>> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
>> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> LKML-Reference: <1285165776.2275.1022.camel@laptop>
>> ---
>>  kernel/sched.c          |   54 ++++++++++++++++++++----
>>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  kernel/stop_machine.c   |    8 ++-
>>  3 files changed, 158 insertions(+), 12 deletions(-)
>>
>> Index: linux-2.6/kernel/sched.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/sched.c
>> +++ linux-2.6/kernel/sched.c
>> @@ -486,7 +486,7 @@ struct rq {
>>  	 */
>>  	unsigned long nr_uninterruptible;
>>
>> -	struct task_struct *curr, *idle;
>> +	struct task_struct *curr, *idle, *stop;
>>  	unsigned long next_balance;
>>  	struct mm_struct *prev_mm;
>>
>> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
>>
>>  static const struct sched_class rt_sched_class;
>>
>> -#define sched_class_highest (&rt_sched_class)
>> +#define sched_class_highest (&stop_sched_class)
>>  #define for_each_class(class) \
>>     for (class = sched_class_highest; class; class = class->next)
>>
>> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
>>  #include "sched_idletask.c"
>>  #include "sched_fair.c"
>>  #include "sched_rt.c"
>> +#include "sched_stoptask.c"
>>  #ifdef CONFIG_SCHED_DEBUG
>>  # include "sched_debug.c"
>>  #endif
>>
>> +void sched_set_stop_task(int cpu, struct task_struct *stop)
>> +{
>> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
>> +
>> +	if (stop) {
>> +		/*
>> +		 * Make it appear like a SCHED_FIFO task, its something
>> +		 * userspace knows about and won't get confused about.
>> +		 *
>> +		 * Also, it will make PI more or less work without too
>> +		 * much confusion -- but then, stop work should not
>> +		 * rely on PI working anyway.
>> +		 */
>> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
>> +
>> +		stop->sched_class = &stop_sched_class;
>> +	}
>> +
>> +	cpu_rq(cpu)->stop = stop;
>> +
>> +	if (old_stop) {
>> +		/*
>> +		 * Reset it back to a normal scheduling class so that
>> +		 * it can die in pieces.
>> +		 */
>> +		old_stop->sched_class = &rt_sched_class;
>> +	}
>> +}
>> +
>>  /*
>>   * __normal_prio - return the priority that is based on the static prio
>>   */
>> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
>>  			return p;
>>  	}
>>
>> -	class = sched_class_highest;
>> -	for ( ; ; ) {
>> +	for_each_class(class) {
>>  		p = class->pick_next_task(rq);
>>  		if (p)
>>  			return p;
>> -		/*
>> -		 * Will never be NULL as the idle class always
>> -		 * returns a non-NULL p:
>> -		 */
>> -		class = class->next;
>>  	}
>> +
>> +	BUG(); /* the idle class will always have a runnable task */
>>  }
>>
>>  /*
>> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
>>  	 */
>>  	rq = __task_rq_lock(p);
>>
>> +	/*
>> +	 * Changing the policy of the stop threads its a very bad idea
>> +	 */
>> +	if (p == rq->stop) {
>> +		__task_rq_unlock(rq);
>> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
>> +		return -EINVAL;
>> +	}
>> +
>>  #ifdef CONFIG_RT_GROUP_SCHED
>>  	if (user) {
>>  		/*
>> Index: linux-2.6/kernel/stop_machine.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/stop_machine.c
>> +++ linux-2.6/kernel/stop_machine.c
>> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
>>  	goto repeat;
>>  }
>>
>> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
>> +
>>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
>>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
>>  					   unsigned long action, void *hcpu)
>>  {
>> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>>  	unsigned int cpu = (unsigned long)hcpu;
>>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
>>  	struct task_struct *p;
>> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
>>  				   cpu);
>>  		if (IS_ERR(p))
>>  			return NOTIFY_BAD;
>> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
>>  		get_task_struct(p);
>> +		kthread_bind(p, cpu);
>> +		sched_set_stop_task(cpu, p);
>>  		stopper->thread = p;
>>  		break;
>>
>>  	case CPU_ONLINE:
>> -		kthread_bind(stopper->thread, cpu);
>>  		/* strictly unnecessary, as first user will wake it */
>>  		wake_up_process(stopper->thread);
>>  		/* mark enabled */
>> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
>>  	{
>>  		struct cpu_stop_work *work;
>>
>> +		sched_set_stop_task(cpu, NULL);
>>  		/* kill the stopper */
>>  		kthread_stop(stopper->thread);
>>  		/* drain remaining works */
>> Index: linux-2.6/kernel/sched_stoptask.c
>> ===================================================================
>> --- /dev/null
>> +++ linux-2.6/kernel/sched_stoptask.c
>> @@ -0,0 +1,108 @@
>> +/*
>> + * stop-task scheduling class.
>> + *
>> + * The stop task is the highest priority task in the system, it preempts
>> + * everything and will be preempted by nothing.
>> + *
>> + * See kernel/stop_machine.c
>> + */
>> +
>> +#ifdef CONFIG_SMP
>> +static int
>> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
>> +		    int sd_flag, int flags)
>> +{
>> +	return task_cpu(p); /* stop tasks as never migrate */
>> +}
>> +#endif /* CONFIG_SMP */
>> +
>> +static void
>> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +	resched_task(rq->curr); /* we preempt everything */
>> +}
>> +
>> +static struct task_struct *pick_next_task_stop(struct rq *rq)
>> +{
>> +	struct task_struct *stop = rq->stop;
>> +
>> +	if (stop && stop->state == TASK_RUNNING)
>> +		return stop;
>> +
>> +	return NULL;
>> +}
>> +
>> +static void
>> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void
>> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void yield_task_stop(struct rq *rq)
>> +{
>> +	BUG(); /* the stop task should never yield, its pointless. */
>> +}
>> +
>> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
>> +{
>> +}
>> +
>> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
>> +{
>> +}
>> +
>> +static void set_curr_task_stop(struct rq *rq)
>> +{
>> +}
>> +
>> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
>> +			     int running)
>> +{
>> +	BUG(); /* its impossible to change to this class */
>> +}
>> +
>> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
>> +			      int oldprio, int running)
>> +{
>> +	BUG(); /* how!?, what priority? */
>> +}
>> +
>> +static unsigned int
>> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
>> +{
>> +	return 0;
>> +}
>> +
>> +/*
>> + * Simple, special scheduling class for the per-CPU stop tasks:
>> + */
>> +static const struct sched_class stop_sched_class = {
>> +	.next			= &rt_sched_class,
>> +
>> +	.enqueue_task		= enqueue_task_stop,
>> +	.dequeue_task		= dequeue_task_stop,
>> +	.yield_task		= yield_task_stop,
>> +
>> +	.check_preempt_curr	= check_preempt_curr_stop,
>> +
>> +	.pick_next_task		= pick_next_task_stop,
>> +	.put_prev_task		= put_prev_task_stop,
>> +
>> +#ifdef CONFIG_SMP
>> +	.select_task_rq		= select_task_rq_stop,
>> +#endif
>> +
>> +	.set_curr_task          = set_curr_task_stop,
>> +	.task_tick		= task_tick_stop,
>> +
>> +	.get_rr_interval	= get_rr_interval_stop,
>> +
>> +	.prio_changed		= prio_changed_stop,
>> +	.switched_to		= switched_to_stop,
>> +
>> +	/* no .task_new for stop tasks */
>> +};
>>
>>
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18  3:19               ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-18  3:19 UTC (permalink / raw)
  To: subrata
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

Cc: Steven
Cc: Ingo
Cc: Peter
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>

For those Cced, More information here:

http://marc.info/?l=ltp-list&m=128569007015044&w=2
http://marc.info/?l=ltp-list&m=128696942432669&w=2

02:37, Subrata Modak wrote:
> I get a bigger trace with this patch:
> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc0000000002133f0
> cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
>     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
>     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
>     sp: c0000000d9f8b7e0
>    msr: 800000000200b032
>    dar: 0
>  dsisr: 40000000
>   current = 0xc0000000d9f7d100
>   paca    = 0xc000000007fc8e00
>     pid   = 1667, comm = ftrace_stack_tr
> Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> address 0xbffFffffe0175b688
> PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> le) at [c0000000d9f8a6a0]
> p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> 
> 
>     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
>     sp: c0000000018804e8
>    msr: 8000000000001032
>   current = 0xc0000000d838d100
>   paca    = 0xc000000007fc8000
>     pid   = 1668, comm = ftrace_stack_ma
>  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0

This is a dead loop:

trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..

And this is a PPC specific bug. Hope some ppc guys will fix it?
Or we kill trace_clock_global() if no one actually uses it..

--
Li Zefan

> [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> 
> Regards--
> Subrata
> 
> On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
>> Li Zefan wrote:
>>> Li Zefan wrote:
>>>> Subrata Modak wrote:
>>>>> Li,
>>>>>
>>>>> Can you kindly fix the below issues and send me a new patch ?
>>>>>
>>>> Sure, I will.
>>>>
>>> At a first glance, the kernel bug doesn't seem to come from ftrace,
>>> at least not directly from it.
>>>
>>> Question:
>>>
>>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
>>> haven't tried it, could you test it? Thanks!
>>>
>> I got a patch from Peter, though he's not sure about the bug yet.
>> So could you try this?
>>
>> Note, I don't know if this patch can be applied to 2.6.35-4..
>>
>> ======================
>>
>> (From Peter)
>>
>> Hrmm, not something I've seen before.. but since the migration thread
>> and stop_machine are involved, does the below patch which rewrites the
>> migration-thread/stop_macehine/scheduler interaction cure this?
>>
>> This patch is probably .37 fodder, but who knows..
>>
>> ---
>> Subject: sched: Create special class for stop/migrate work
>> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Date: Wed Sep 22 13:53:15 CEST 2010
>>
>> In order to separate the stop/migrate work thread from the SCHED_FIFO
>> implementation, create a special class for it that is of higher priority
>> than SCHED_FIFO itself.
>>
>> This currently solves a problem where cpu-hotplug consumes so much cpu-time
>> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
>> timer pending on the now dead cpu.
>>
>> It is also required for when we add the planned deadline scheduling class
>> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
>> tasks.
>>
>> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
>> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> LKML-Reference: <1285165776.2275.1022.camel@laptop>
>> ---
>>  kernel/sched.c          |   54 ++++++++++++++++++++----
>>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  kernel/stop_machine.c   |    8 ++-
>>  3 files changed, 158 insertions(+), 12 deletions(-)
>>
>> Index: linux-2.6/kernel/sched.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/sched.c
>> +++ linux-2.6/kernel/sched.c
>> @@ -486,7 +486,7 @@ struct rq {
>>  	 */
>>  	unsigned long nr_uninterruptible;
>>
>> -	struct task_struct *curr, *idle;
>> +	struct task_struct *curr, *idle, *stop;
>>  	unsigned long next_balance;
>>  	struct mm_struct *prev_mm;
>>
>> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
>>
>>  static const struct sched_class rt_sched_class;
>>
>> -#define sched_class_highest (&rt_sched_class)
>> +#define sched_class_highest (&stop_sched_class)
>>  #define for_each_class(class) \
>>     for (class = sched_class_highest; class; class = class->next)
>>
>> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
>>  #include "sched_idletask.c"
>>  #include "sched_fair.c"
>>  #include "sched_rt.c"
>> +#include "sched_stoptask.c"
>>  #ifdef CONFIG_SCHED_DEBUG
>>  # include "sched_debug.c"
>>  #endif
>>
>> +void sched_set_stop_task(int cpu, struct task_struct *stop)
>> +{
>> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
>> +
>> +	if (stop) {
>> +		/*
>> +		 * Make it appear like a SCHED_FIFO task, its something
>> +		 * userspace knows about and won't get confused about.
>> +		 *
>> +		 * Also, it will make PI more or less work without too
>> +		 * much confusion -- but then, stop work should not
>> +		 * rely on PI working anyway.
>> +		 */
>> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
>> +
>> +		stop->sched_class = &stop_sched_class;
>> +	}
>> +
>> +	cpu_rq(cpu)->stop = stop;
>> +
>> +	if (old_stop) {
>> +		/*
>> +		 * Reset it back to a normal scheduling class so that
>> +		 * it can die in pieces.
>> +		 */
>> +		old_stop->sched_class = &rt_sched_class;
>> +	}
>> +}
>> +
>>  /*
>>   * __normal_prio - return the priority that is based on the static prio
>>   */
>> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
>>  			return p;
>>  	}
>>
>> -	class = sched_class_highest;
>> -	for ( ; ; ) {
>> +	for_each_class(class) {
>>  		p = class->pick_next_task(rq);
>>  		if (p)
>>  			return p;
>> -		/*
>> -		 * Will never be NULL as the idle class always
>> -		 * returns a non-NULL p:
>> -		 */
>> -		class = class->next;
>>  	}
>> +
>> +	BUG(); /* the idle class will always have a runnable task */
>>  }
>>
>>  /*
>> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
>>  	 */
>>  	rq = __task_rq_lock(p);
>>
>> +	/*
>> +	 * Changing the policy of the stop threads its a very bad idea
>> +	 */
>> +	if (p == rq->stop) {
>> +		__task_rq_unlock(rq);
>> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
>> +		return -EINVAL;
>> +	}
>> +
>>  #ifdef CONFIG_RT_GROUP_SCHED
>>  	if (user) {
>>  		/*
>> Index: linux-2.6/kernel/stop_machine.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/stop_machine.c
>> +++ linux-2.6/kernel/stop_machine.c
>> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
>>  	goto repeat;
>>  }
>>
>> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
>> +
>>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
>>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
>>  					   unsigned long action, void *hcpu)
>>  {
>> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>>  	unsigned int cpu = (unsigned long)hcpu;
>>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
>>  	struct task_struct *p;
>> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
>>  				   cpu);
>>  		if (IS_ERR(p))
>>  			return NOTIFY_BAD;
>> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
>>  		get_task_struct(p);
>> +		kthread_bind(p, cpu);
>> +		sched_set_stop_task(cpu, p);
>>  		stopper->thread = p;
>>  		break;
>>
>>  	case CPU_ONLINE:
>> -		kthread_bind(stopper->thread, cpu);
>>  		/* strictly unnecessary, as first user will wake it */
>>  		wake_up_process(stopper->thread);
>>  		/* mark enabled */
>> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
>>  	{
>>  		struct cpu_stop_work *work;
>>
>> +		sched_set_stop_task(cpu, NULL);
>>  		/* kill the stopper */
>>  		kthread_stop(stopper->thread);
>>  		/* drain remaining works */
>> Index: linux-2.6/kernel/sched_stoptask.c
>> ===================================================================
>> --- /dev/null
>> +++ linux-2.6/kernel/sched_stoptask.c
>> @@ -0,0 +1,108 @@
>> +/*
>> + * stop-task scheduling class.
>> + *
>> + * The stop task is the highest priority task in the system, it preempts
>> + * everything and will be preempted by nothing.
>> + *
>> + * See kernel/stop_machine.c
>> + */
>> +
>> +#ifdef CONFIG_SMP
>> +static int
>> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
>> +		    int sd_flag, int flags)
>> +{
>> +	return task_cpu(p); /* stop tasks as never migrate */
>> +}
>> +#endif /* CONFIG_SMP */
>> +
>> +static void
>> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +	resched_task(rq->curr); /* we preempt everything */
>> +}
>> +
>> +static struct task_struct *pick_next_task_stop(struct rq *rq)
>> +{
>> +	struct task_struct *stop = rq->stop;
>> +
>> +	if (stop && stop->state == TASK_RUNNING)
>> +		return stop;
>> +
>> +	return NULL;
>> +}
>> +
>> +static void
>> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void
>> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void yield_task_stop(struct rq *rq)
>> +{
>> +	BUG(); /* the stop task should never yield, its pointless. */
>> +}
>> +
>> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
>> +{
>> +}
>> +
>> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
>> +{
>> +}
>> +
>> +static void set_curr_task_stop(struct rq *rq)
>> +{
>> +}
>> +
>> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
>> +			     int running)
>> +{
>> +	BUG(); /* its impossible to change to this class */
>> +}
>> +
>> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
>> +			      int oldprio, int running)
>> +{
>> +	BUG(); /* how!?, what priority? */
>> +}
>> +
>> +static unsigned int
>> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
>> +{
>> +	return 0;
>> +}
>> +
>> +/*
>> + * Simple, special scheduling class for the per-CPU stop tasks:
>> + */
>> +static const struct sched_class stop_sched_class = {
>> +	.next			= &rt_sched_class,
>> +
>> +	.enqueue_task		= enqueue_task_stop,
>> +	.dequeue_task		= dequeue_task_stop,
>> +	.yield_task		= yield_task_stop,
>> +
>> +	.check_preempt_curr	= check_preempt_curr_stop,
>> +
>> +	.pick_next_task		= pick_next_task_stop,
>> +	.put_prev_task		= put_prev_task_stop,
>> +
>> +#ifdef CONFIG_SMP
>> +	.select_task_rq		= select_task_rq_stop,
>> +#endif
>> +
>> +	.set_curr_task          = set_curr_task_stop,
>> +	.task_tick		= task_tick_stop,
>> +
>> +	.get_rr_interval	= get_rr_interval_stop,
>> +
>> +	.prio_changed		= prio_changed_stop,
>> +	.switched_to		= switched_to_stop,
>> +
>> +	/* no .task_new for stop tasks */
>> +};
>>
>>
>>
> 
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18  3:19               ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-18  3:19 UTC (permalink / raw)
  To: subrata
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

Cc: Steven
Cc: Ingo
Cc: Peter
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>

For those Cced, More information here:

http://marc.info/?l=ltp-list&m=128569007015044&w=2
http://marc.info/?l=ltp-list&m=128696942432669&w=2

02:37, Subrata Modak wrote:
> I get a bigger trace with this patch:
> 
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc0000000002133f0
> cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
>     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
>     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
>     sp: c0000000d9f8b7e0
>    msr: 800000000200b032
>    dar: 0
>  dsisr: 40000000
>   current = 0xc0000000d9f7d100
>   paca    = 0xc000000007fc8e00
>     pid   = 1667, comm = ftrace_stack_tr
> Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> address 0xbffFffffe0175b688
> PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> le) at [c0000000d9f8a6a0]
> p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> 
> 
>     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
>     sp: c0000000018804e8
>    msr: 8000000000001032
>   current = 0xc0000000d838d100
>   paca    = 0xc000000007fc8000
>     pid   = 1668, comm = ftrace_stack_ma
>  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0

This is a dead loop:

trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..

And this is a PPC specific bug. Hope some ppc guys will fix it?
Or we kill trace_clock_global() if no one actually uses it..

--
Li Zefan

> [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> +0x24c/0x2a4
> [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> +0x44/0x6c
> [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> +0x7c/0x144
> [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> 
> Regards--
> Subrata
> 
> On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
>> Li Zefan wrote:
>>> Li Zefan wrote:
>>>> Subrata Modak wrote:
>>>>> Li,
>>>>>
>>>>> Can you kindly fix the below issues and send me a new patch ?
>>>>>
>>>> Sure, I will.
>>>>
>>> At a first glance, the kernel bug doesn't seem to come from ftrace,
>>> at least not directly from it.
>>>
>>> Question:
>>>
>>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
>>> haven't tried it, could you test it? Thanks!
>>>
>> I got a patch from Peter, though he's not sure about the bug yet.
>> So could you try this?
>>
>> Note, I don't know if this patch can be applied to 2.6.35-4..
>>
>> ======================
>>
>> (From Peter)
>>
>> Hrmm, not something I've seen before.. but since the migration thread
>> and stop_machine are involved, does the below patch which rewrites the
>> migration-thread/stop_macehine/scheduler interaction cure this?
>>
>> This patch is probably .37 fodder, but who knows..
>>
>> ---
>> Subject: sched: Create special class for stop/migrate work
>> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> Date: Wed Sep 22 13:53:15 CEST 2010
>>
>> In order to separate the stop/migrate work thread from the SCHED_FIFO
>> implementation, create a special class for it that is of higher priority
>> than SCHED_FIFO itself.
>>
>> This currently solves a problem where cpu-hotplug consumes so much cpu-time
>> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
>> timer pending on the now dead cpu.
>>
>> It is also required for when we add the planned deadline scheduling class
>> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
>> tasks.
>>
>> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
>> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>> LKML-Reference: <1285165776.2275.1022.camel@laptop>
>> ---
>>  kernel/sched.c          |   54 ++++++++++++++++++++----
>>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  kernel/stop_machine.c   |    8 ++-
>>  3 files changed, 158 insertions(+), 12 deletions(-)
>>
>> Index: linux-2.6/kernel/sched.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/sched.c
>> +++ linux-2.6/kernel/sched.c
>> @@ -486,7 +486,7 @@ struct rq {
>>  	 */
>>  	unsigned long nr_uninterruptible;
>>
>> -	struct task_struct *curr, *idle;
>> +	struct task_struct *curr, *idle, *stop;
>>  	unsigned long next_balance;
>>  	struct mm_struct *prev_mm;
>>
>> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
>>
>>  static const struct sched_class rt_sched_class;
>>
>> -#define sched_class_highest (&rt_sched_class)
>> +#define sched_class_highest (&stop_sched_class)
>>  #define for_each_class(class) \
>>     for (class = sched_class_highest; class; class = class->next)
>>
>> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
>>  #include "sched_idletask.c"
>>  #include "sched_fair.c"
>>  #include "sched_rt.c"
>> +#include "sched_stoptask.c"
>>  #ifdef CONFIG_SCHED_DEBUG
>>  # include "sched_debug.c"
>>  #endif
>>
>> +void sched_set_stop_task(int cpu, struct task_struct *stop)
>> +{
>> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
>> +
>> +	if (stop) {
>> +		/*
>> +		 * Make it appear like a SCHED_FIFO task, its something
>> +		 * userspace knows about and won't get confused about.
>> +		 *
>> +		 * Also, it will make PI more or less work without too
>> +		 * much confusion -- but then, stop work should not
>> +		 * rely on PI working anyway.
>> +		 */
>> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
>> +
>> +		stop->sched_class = &stop_sched_class;
>> +	}
>> +
>> +	cpu_rq(cpu)->stop = stop;
>> +
>> +	if (old_stop) {
>> +		/*
>> +		 * Reset it back to a normal scheduling class so that
>> +		 * it can die in pieces.
>> +		 */
>> +		old_stop->sched_class = &rt_sched_class;
>> +	}
>> +}
>> +
>>  /*
>>   * __normal_prio - return the priority that is based on the static prio
>>   */
>> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
>>  			return p;
>>  	}
>>
>> -	class = sched_class_highest;
>> -	for ( ; ; ) {
>> +	for_each_class(class) {
>>  		p = class->pick_next_task(rq);
>>  		if (p)
>>  			return p;
>> -		/*
>> -		 * Will never be NULL as the idle class always
>> -		 * returns a non-NULL p:
>> -		 */
>> -		class = class->next;
>>  	}
>> +
>> +	BUG(); /* the idle class will always have a runnable task */
>>  }
>>
>>  /*
>> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
>>  	 */
>>  	rq = __task_rq_lock(p);
>>
>> +	/*
>> +	 * Changing the policy of the stop threads its a very bad idea
>> +	 */
>> +	if (p == rq->stop) {
>> +		__task_rq_unlock(rq);
>> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
>> +		return -EINVAL;
>> +	}
>> +
>>  #ifdef CONFIG_RT_GROUP_SCHED
>>  	if (user) {
>>  		/*
>> Index: linux-2.6/kernel/stop_machine.c
>> ===================================================================
>> --- linux-2.6.orig/kernel/stop_machine.c
>> +++ linux-2.6/kernel/stop_machine.c
>> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
>>  	goto repeat;
>>  }
>>
>> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
>> +
>>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
>>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
>>  					   unsigned long action, void *hcpu)
>>  {
>> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
>>  	unsigned int cpu = (unsigned long)hcpu;
>>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
>>  	struct task_struct *p;
>> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
>>  				   cpu);
>>  		if (IS_ERR(p))
>>  			return NOTIFY_BAD;
>> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
>>  		get_task_struct(p);
>> +		kthread_bind(p, cpu);
>> +		sched_set_stop_task(cpu, p);
>>  		stopper->thread = p;
>>  		break;
>>
>>  	case CPU_ONLINE:
>> -		kthread_bind(stopper->thread, cpu);
>>  		/* strictly unnecessary, as first user will wake it */
>>  		wake_up_process(stopper->thread);
>>  		/* mark enabled */
>> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
>>  	{
>>  		struct cpu_stop_work *work;
>>
>> +		sched_set_stop_task(cpu, NULL);
>>  		/* kill the stopper */
>>  		kthread_stop(stopper->thread);
>>  		/* drain remaining works */
>> Index: linux-2.6/kernel/sched_stoptask.c
>> ===================================================================
>> --- /dev/null
>> +++ linux-2.6/kernel/sched_stoptask.c
>> @@ -0,0 +1,108 @@
>> +/*
>> + * stop-task scheduling class.
>> + *
>> + * The stop task is the highest priority task in the system, it preempts
>> + * everything and will be preempted by nothing.
>> + *
>> + * See kernel/stop_machine.c
>> + */
>> +
>> +#ifdef CONFIG_SMP
>> +static int
>> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
>> +		    int sd_flag, int flags)
>> +{
>> +	return task_cpu(p); /* stop tasks as never migrate */
>> +}
>> +#endif /* CONFIG_SMP */
>> +
>> +static void
>> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +	resched_task(rq->curr); /* we preempt everything */
>> +}
>> +
>> +static struct task_struct *pick_next_task_stop(struct rq *rq)
>> +{
>> +	struct task_struct *stop = rq->stop;
>> +
>> +	if (stop && stop->state == TASK_RUNNING)
>> +		return stop;
>> +
>> +	return NULL;
>> +}
>> +
>> +static void
>> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void
>> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
>> +{
>> +}
>> +
>> +static void yield_task_stop(struct rq *rq)
>> +{
>> +	BUG(); /* the stop task should never yield, its pointless. */
>> +}
>> +
>> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
>> +{
>> +}
>> +
>> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
>> +{
>> +}
>> +
>> +static void set_curr_task_stop(struct rq *rq)
>> +{
>> +}
>> +
>> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
>> +			     int running)
>> +{
>> +	BUG(); /* its impossible to change to this class */
>> +}
>> +
>> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
>> +			      int oldprio, int running)
>> +{
>> +	BUG(); /* how!?, what priority? */
>> +}
>> +
>> +static unsigned int
>> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
>> +{
>> +	return 0;
>> +}
>> +
>> +/*
>> + * Simple, special scheduling class for the per-CPU stop tasks:
>> + */
>> +static const struct sched_class stop_sched_class = {
>> +	.next			= &rt_sched_class,
>> +
>> +	.enqueue_task		= enqueue_task_stop,
>> +	.dequeue_task		= dequeue_task_stop,
>> +	.yield_task		= yield_task_stop,
>> +
>> +	.check_preempt_curr	= check_preempt_curr_stop,
>> +
>> +	.pick_next_task		= pick_next_task_stop,
>> +	.put_prev_task		= put_prev_task_stop,
>> +
>> +#ifdef CONFIG_SMP
>> +	.select_task_rq		= select_task_rq_stop,
>> +#endif
>> +
>> +	.set_curr_task          = set_curr_task_stop,
>> +	.task_tick		= task_tick_stop,
>> +
>> +	.get_rr_interval	= get_rr_interval_stop,
>> +
>> +	.prio_changed		= prio_changed_stop,
>> +	.switched_to		= switched_to_stop,
>> +
>> +	/* no .task_new for stop tasks */
>> +};
>>
>>
>>
> 
> 
> 

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
  2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
  (?)
@ 2010-10-18 10:05                 ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 37+ messages in thread
From: Benjamin Herrenschmidt @ 2010-10-18 10:05 UTC (permalink / raw)
  To: Li Zefan
  Cc: subrata, ltp-list, Peter Zijlstra, LKML, Steven Rostedt,
	Paul Mackerras, Anton Blanchard, Ingo Molnar, linuxppc-dev

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> Cc: Steven
> Cc: Ingo
> Cc: Peter
> Cc: Anton Blanchard <anton@samba.org>
> Cc: Paul Mackerras <paulus@samba.org>
> 
> For those Cced, More information here:
> 
> http://marc.info/?l=ltp-list&m=128569007015044&w=2
> http://marc.info/?l=ltp-list&m=128696942432669&w=2

Hrm... that's nasty...

Should we have some kind of flag to avoid spin_yield() calling H_CEDE
(or whatever it calls) when tracing an hcall to prevent that ? Anton,
Paulus, any other smart idea ? A TLF_ would do...

Cheers,
Ben.

> 02:37, Subrata Modak wrote:
> > I get a bigger trace with this patch:
> > 
> > Unable to handle kernel paging request for data at address 0x00000000
> > Faulting instruction address: 0xc0000000002133f0
> > cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
> >     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
> >     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
> >     sp: c0000000d9f8b7e0
> >    msr: 800000000200b032
> >    dar: 0
> >  dsisr: 40000000
> >   current = 0xc0000000d9f7d100
> >   paca    = 0xc000000007fc8e00
> >     pid   = 1667, comm = ftrace_stack_tr
> > Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> > cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> > address 0xbffFffffe0175b688
> > PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> > le) at [c0000000d9f8a6a0]
> > p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> > 
> > 
> >     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
> >     sp: c0000000018804e8
> >    msr: 8000000000001032
> >   current = 0xc0000000d838d100
> >   paca    = 0xc000000007fc8000
> >     pid   = 1668, comm = ftrace_stack_ma
> >  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> 
> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..
> 
> --
> Li Zefan
> 
> > [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > 
> > Regards--
> > Subrata
> > 
> > On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
> >> Li Zefan wrote:
> >>> Li Zefan wrote:
> >>>> Subrata Modak wrote:
> >>>>> Li,
> >>>>>
> >>>>> Can you kindly fix the below issues and send me a new patch ?
> >>>>>
> >>>> Sure, I will.
> >>>>
> >>> At a first glance, the kernel bug doesn't seem to come from ftrace,
> >>> at least not directly from it.
> >>>
> >>> Question:
> >>>
> >>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> >>> haven't tried it, could you test it? Thanks!
> >>>
> >> I got a patch from Peter, though he's not sure about the bug yet.
> >> So could you try this?
> >>
> >> Note, I don't know if this patch can be applied to 2.6.35-4..
> >>
> >> ======================
> >>
> >> (From Peter)
> >>
> >> Hrmm, not something I've seen before.. but since the migration thread
> >> and stop_machine are involved, does the below patch which rewrites the
> >> migration-thread/stop_macehine/scheduler interaction cure this?
> >>
> >> This patch is probably .37 fodder, but who knows..
> >>
> >> ---
> >> Subject: sched: Create special class for stop/migrate work
> >> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> Date: Wed Sep 22 13:53:15 CEST 2010
> >>
> >> In order to separate the stop/migrate work thread from the SCHED_FIFO
> >> implementation, create a special class for it that is of higher priority
> >> than SCHED_FIFO itself.
> >>
> >> This currently solves a problem where cpu-hotplug consumes so much cpu-time
> >> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
> >> timer pending on the now dead cpu.
> >>
> >> It is also required for when we add the planned deadline scheduling class
> >> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
> >> tasks.
> >>
> >> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> >> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> LKML-Reference: <1285165776.2275.1022.camel@laptop>
> >> ---
> >>  kernel/sched.c          |   54 ++++++++++++++++++++----
> >>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>  kernel/stop_machine.c   |    8 ++-
> >>  3 files changed, 158 insertions(+), 12 deletions(-)
> >>
> >> Index: linux-2.6/kernel/sched.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/sched.c
> >> +++ linux-2.6/kernel/sched.c
> >> @@ -486,7 +486,7 @@ struct rq {
> >>  	 */
> >>  	unsigned long nr_uninterruptible;
> >>
> >> -	struct task_struct *curr, *idle;
> >> +	struct task_struct *curr, *idle, *stop;
> >>  	unsigned long next_balance;
> >>  	struct mm_struct *prev_mm;
> >>
> >> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
> >>
> >>  static const struct sched_class rt_sched_class;
> >>
> >> -#define sched_class_highest (&rt_sched_class)
> >> +#define sched_class_highest (&stop_sched_class)
> >>  #define for_each_class(class) \
> >>     for (class = sched_class_highest; class; class = class->next)
> >>
> >> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
> >>  #include "sched_idletask.c"
> >>  #include "sched_fair.c"
> >>  #include "sched_rt.c"
> >> +#include "sched_stoptask.c"
> >>  #ifdef CONFIG_SCHED_DEBUG
> >>  # include "sched_debug.c"
> >>  #endif
> >>
> >> +void sched_set_stop_task(int cpu, struct task_struct *stop)
> >> +{
> >> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
> >> +
> >> +	if (stop) {
> >> +		/*
> >> +		 * Make it appear like a SCHED_FIFO task, its something
> >> +		 * userspace knows about and won't get confused about.
> >> +		 *
> >> +		 * Also, it will make PI more or less work without too
> >> +		 * much confusion -- but then, stop work should not
> >> +		 * rely on PI working anyway.
> >> +		 */
> >> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
> >> +
> >> +		stop->sched_class = &stop_sched_class;
> >> +	}
> >> +
> >> +	cpu_rq(cpu)->stop = stop;
> >> +
> >> +	if (old_stop) {
> >> +		/*
> >> +		 * Reset it back to a normal scheduling class so that
> >> +		 * it can die in pieces.
> >> +		 */
> >> +		old_stop->sched_class = &rt_sched_class;
> >> +	}
> >> +}
> >> +
> >>  /*
> >>   * __normal_prio - return the priority that is based on the static prio
> >>   */
> >> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
> >>  			return p;
> >>  	}
> >>
> >> -	class = sched_class_highest;
> >> -	for ( ; ; ) {
> >> +	for_each_class(class) {
> >>  		p = class->pick_next_task(rq);
> >>  		if (p)
> >>  			return p;
> >> -		/*
> >> -		 * Will never be NULL as the idle class always
> >> -		 * returns a non-NULL p:
> >> -		 */
> >> -		class = class->next;
> >>  	}
> >> +
> >> +	BUG(); /* the idle class will always have a runnable task */
> >>  }
> >>
> >>  /*
> >> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
> >>  	 */
> >>  	rq = __task_rq_lock(p);
> >>
> >> +	/*
> >> +	 * Changing the policy of the stop threads its a very bad idea
> >> +	 */
> >> +	if (p == rq->stop) {
> >> +		__task_rq_unlock(rq);
> >> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
> >> +		return -EINVAL;
> >> +	}
> >> +
> >>  #ifdef CONFIG_RT_GROUP_SCHED
> >>  	if (user) {
> >>  		/*
> >> Index: linux-2.6/kernel/stop_machine.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/stop_machine.c
> >> +++ linux-2.6/kernel/stop_machine.c
> >> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
> >>  	goto repeat;
> >>  }
> >>
> >> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
> >> +
> >>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
> >>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
> >>  					   unsigned long action, void *hcpu)
> >>  {
> >> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >>  	unsigned int cpu = (unsigned long)hcpu;
> >>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
> >>  	struct task_struct *p;
> >> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  				   cpu);
> >>  		if (IS_ERR(p))
> >>  			return NOTIFY_BAD;
> >> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
> >>  		get_task_struct(p);
> >> +		kthread_bind(p, cpu);
> >> +		sched_set_stop_task(cpu, p);
> >>  		stopper->thread = p;
> >>  		break;
> >>
> >>  	case CPU_ONLINE:
> >> -		kthread_bind(stopper->thread, cpu);
> >>  		/* strictly unnecessary, as first user will wake it */
> >>  		wake_up_process(stopper->thread);
> >>  		/* mark enabled */
> >> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  	{
> >>  		struct cpu_stop_work *work;
> >>
> >> +		sched_set_stop_task(cpu, NULL);
> >>  		/* kill the stopper */
> >>  		kthread_stop(stopper->thread);
> >>  		/* drain remaining works */
> >> Index: linux-2.6/kernel/sched_stoptask.c
> >> ===================================================================
> >> --- /dev/null
> >> +++ linux-2.6/kernel/sched_stoptask.c
> >> @@ -0,0 +1,108 @@
> >> +/*
> >> + * stop-task scheduling class.
> >> + *
> >> + * The stop task is the highest priority task in the system, it preempts
> >> + * everything and will be preempted by nothing.
> >> + *
> >> + * See kernel/stop_machine.c
> >> + */
> >> +
> >> +#ifdef CONFIG_SMP
> >> +static int
> >> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
> >> +		    int sd_flag, int flags)
> >> +{
> >> +	return task_cpu(p); /* stop tasks as never migrate */
> >> +}
> >> +#endif /* CONFIG_SMP */
> >> +
> >> +static void
> >> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +	resched_task(rq->curr); /* we preempt everything */
> >> +}
> >> +
> >> +static struct task_struct *pick_next_task_stop(struct rq *rq)
> >> +{
> >> +	struct task_struct *stop = rq->stop;
> >> +
> >> +	if (stop && stop->state == TASK_RUNNING)
> >> +		return stop;
> >> +
> >> +	return NULL;
> >> +}
> >> +
> >> +static void
> >> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void
> >> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void yield_task_stop(struct rq *rq)
> >> +{
> >> +	BUG(); /* the stop task should never yield, its pointless. */
> >> +}
> >> +
> >> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> >> +{
> >> +}
> >> +
> >> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
> >> +{
> >> +}
> >> +
> >> +static void set_curr_task_stop(struct rq *rq)
> >> +{
> >> +}
> >> +
> >> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
> >> +			     int running)
> >> +{
> >> +	BUG(); /* its impossible to change to this class */
> >> +}
> >> +
> >> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
> >> +			      int oldprio, int running)
> >> +{
> >> +	BUG(); /* how!?, what priority? */
> >> +}
> >> +
> >> +static unsigned int
> >> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
> >> +{
> >> +	return 0;
> >> +}
> >> +
> >> +/*
> >> + * Simple, special scheduling class for the per-CPU stop tasks:
> >> + */
> >> +static const struct sched_class stop_sched_class = {
> >> +	.next			= &rt_sched_class,
> >> +
> >> +	.enqueue_task		= enqueue_task_stop,
> >> +	.dequeue_task		= dequeue_task_stop,
> >> +	.yield_task		= yield_task_stop,
> >> +
> >> +	.check_preempt_curr	= check_preempt_curr_stop,
> >> +
> >> +	.pick_next_task		= pick_next_task_stop,
> >> +	.put_prev_task		= put_prev_task_stop,
> >> +
> >> +#ifdef CONFIG_SMP
> >> +	.select_task_rq		= select_task_rq_stop,
> >> +#endif
> >> +
> >> +	.set_curr_task          = set_curr_task_stop,
> >> +	.task_tick		= task_tick_stop,
> >> +
> >> +	.get_rr_interval	= get_rr_interval_stop,
> >> +
> >> +	.prio_changed		= prio_changed_stop,
> >> +	.switched_to		= switched_to_stop,
> >> +
> >> +	/* no .task_new for stop tasks */
> >> +};
> >>
> >>
> >>
> > 
> > 
> > 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18 10:05                 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 37+ messages in thread
From: Benjamin Herrenschmidt @ 2010-10-18 10:05 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Steven Rostedt,
	Paul Mackerras, Anton Blanchard, Ingo Molnar, subrata

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> Cc: Steven
> Cc: Ingo
> Cc: Peter
> Cc: Anton Blanchard <anton@samba.org>
> Cc: Paul Mackerras <paulus@samba.org>
> 
> For those Cced, More information here:
> 
> http://marc.info/?l=ltp-list&m=128569007015044&w=2
> http://marc.info/?l=ltp-list&m=128696942432669&w=2

Hrm... that's nasty...

Should we have some kind of flag to avoid spin_yield() calling H_CEDE
(or whatever it calls) when tracing an hcall to prevent that ? Anton,
Paulus, any other smart idea ? A TLF_ would do...

Cheers,
Ben.

> 02:37, Subrata Modak wrote:
> > I get a bigger trace with this patch:
> > 
> > Unable to handle kernel paging request for data at address 0x00000000
> > Faulting instruction address: 0xc0000000002133f0
> > cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
> >     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
> >     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
> >     sp: c0000000d9f8b7e0
> >    msr: 800000000200b032
> >    dar: 0
> >  dsisr: 40000000
> >   current = 0xc0000000d9f7d100
> >   paca    = 0xc000000007fc8e00
> >     pid   = 1667, comm = ftrace_stack_tr
> > Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> > cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> > address 0xbffFffffe0175b688
> > PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> > le) at [c0000000d9f8a6a0]
> > p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> > 
> > 
> >     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
> >     sp: c0000000018804e8
> >    msr: 8000000000001032
> >   current = 0xc0000000d838d100
> >   paca    = 0xc000000007fc8000
> >     pid   = 1668, comm = ftrace_stack_ma
> >  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> 
> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..
> 
> --
> Li Zefan
> 
> > [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > 
> > Regards--
> > Subrata
> > 
> > On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
> >> Li Zefan wrote:
> >>> Li Zefan wrote:
> >>>> Subrata Modak wrote:
> >>>>> Li,
> >>>>>
> >>>>> Can you kindly fix the below issues and send me a new patch ?
> >>>>>
> >>>> Sure, I will.
> >>>>
> >>> At a first glance, the kernel bug doesn't seem to come from ftrace,
> >>> at least not directly from it.
> >>>
> >>> Question:
> >>>
> >>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> >>> haven't tried it, could you test it? Thanks!
> >>>
> >> I got a patch from Peter, though he's not sure about the bug yet.
> >> So could you try this?
> >>
> >> Note, I don't know if this patch can be applied to 2.6.35-4..
> >>
> >> ======================
> >>
> >> (From Peter)
> >>
> >> Hrmm, not something I've seen before.. but since the migration thread
> >> and stop_machine are involved, does the below patch which rewrites the
> >> migration-thread/stop_macehine/scheduler interaction cure this?
> >>
> >> This patch is probably .37 fodder, but who knows..
> >>
> >> ---
> >> Subject: sched: Create special class for stop/migrate work
> >> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> Date: Wed Sep 22 13:53:15 CEST 2010
> >>
> >> In order to separate the stop/migrate work thread from the SCHED_FIFO
> >> implementation, create a special class for it that is of higher priority
> >> than SCHED_FIFO itself.
> >>
> >> This currently solves a problem where cpu-hotplug consumes so much cpu-time
> >> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
> >> timer pending on the now dead cpu.
> >>
> >> It is also required for when we add the planned deadline scheduling class
> >> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
> >> tasks.
> >>
> >> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> >> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> LKML-Reference: <1285165776.2275.1022.camel@laptop>
> >> ---
> >>  kernel/sched.c          |   54 ++++++++++++++++++++----
> >>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>  kernel/stop_machine.c   |    8 ++-
> >>  3 files changed, 158 insertions(+), 12 deletions(-)
> >>
> >> Index: linux-2.6/kernel/sched.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/sched.c
> >> +++ linux-2.6/kernel/sched.c
> >> @@ -486,7 +486,7 @@ struct rq {
> >>  	 */
> >>  	unsigned long nr_uninterruptible;
> >>
> >> -	struct task_struct *curr, *idle;
> >> +	struct task_struct *curr, *idle, *stop;
> >>  	unsigned long next_balance;
> >>  	struct mm_struct *prev_mm;
> >>
> >> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
> >>
> >>  static const struct sched_class rt_sched_class;
> >>
> >> -#define sched_class_highest (&rt_sched_class)
> >> +#define sched_class_highest (&stop_sched_class)
> >>  #define for_each_class(class) \
> >>     for (class = sched_class_highest; class; class = class->next)
> >>
> >> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
> >>  #include "sched_idletask.c"
> >>  #include "sched_fair.c"
> >>  #include "sched_rt.c"
> >> +#include "sched_stoptask.c"
> >>  #ifdef CONFIG_SCHED_DEBUG
> >>  # include "sched_debug.c"
> >>  #endif
> >>
> >> +void sched_set_stop_task(int cpu, struct task_struct *stop)
> >> +{
> >> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
> >> +
> >> +	if (stop) {
> >> +		/*
> >> +		 * Make it appear like a SCHED_FIFO task, its something
> >> +		 * userspace knows about and won't get confused about.
> >> +		 *
> >> +		 * Also, it will make PI more or less work without too
> >> +		 * much confusion -- but then, stop work should not
> >> +		 * rely on PI working anyway.
> >> +		 */
> >> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
> >> +
> >> +		stop->sched_class = &stop_sched_class;
> >> +	}
> >> +
> >> +	cpu_rq(cpu)->stop = stop;
> >> +
> >> +	if (old_stop) {
> >> +		/*
> >> +		 * Reset it back to a normal scheduling class so that
> >> +		 * it can die in pieces.
> >> +		 */
> >> +		old_stop->sched_class = &rt_sched_class;
> >> +	}
> >> +}
> >> +
> >>  /*
> >>   * __normal_prio - return the priority that is based on the static prio
> >>   */
> >> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
> >>  			return p;
> >>  	}
> >>
> >> -	class = sched_class_highest;
> >> -	for ( ; ; ) {
> >> +	for_each_class(class) {
> >>  		p = class->pick_next_task(rq);
> >>  		if (p)
> >>  			return p;
> >> -		/*
> >> -		 * Will never be NULL as the idle class always
> >> -		 * returns a non-NULL p:
> >> -		 */
> >> -		class = class->next;
> >>  	}
> >> +
> >> +	BUG(); /* the idle class will always have a runnable task */
> >>  }
> >>
> >>  /*
> >> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
> >>  	 */
> >>  	rq = __task_rq_lock(p);
> >>
> >> +	/*
> >> +	 * Changing the policy of the stop threads its a very bad idea
> >> +	 */
> >> +	if (p == rq->stop) {
> >> +		__task_rq_unlock(rq);
> >> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
> >> +		return -EINVAL;
> >> +	}
> >> +
> >>  #ifdef CONFIG_RT_GROUP_SCHED
> >>  	if (user) {
> >>  		/*
> >> Index: linux-2.6/kernel/stop_machine.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/stop_machine.c
> >> +++ linux-2.6/kernel/stop_machine.c
> >> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
> >>  	goto repeat;
> >>  }
> >>
> >> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
> >> +
> >>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
> >>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
> >>  					   unsigned long action, void *hcpu)
> >>  {
> >> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >>  	unsigned int cpu = (unsigned long)hcpu;
> >>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
> >>  	struct task_struct *p;
> >> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  				   cpu);
> >>  		if (IS_ERR(p))
> >>  			return NOTIFY_BAD;
> >> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
> >>  		get_task_struct(p);
> >> +		kthread_bind(p, cpu);
> >> +		sched_set_stop_task(cpu, p);
> >>  		stopper->thread = p;
> >>  		break;
> >>
> >>  	case CPU_ONLINE:
> >> -		kthread_bind(stopper->thread, cpu);
> >>  		/* strictly unnecessary, as first user will wake it */
> >>  		wake_up_process(stopper->thread);
> >>  		/* mark enabled */
> >> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  	{
> >>  		struct cpu_stop_work *work;
> >>
> >> +		sched_set_stop_task(cpu, NULL);
> >>  		/* kill the stopper */
> >>  		kthread_stop(stopper->thread);
> >>  		/* drain remaining works */
> >> Index: linux-2.6/kernel/sched_stoptask.c
> >> ===================================================================
> >> --- /dev/null
> >> +++ linux-2.6/kernel/sched_stoptask.c
> >> @@ -0,0 +1,108 @@
> >> +/*
> >> + * stop-task scheduling class.
> >> + *
> >> + * The stop task is the highest priority task in the system, it preempts
> >> + * everything and will be preempted by nothing.
> >> + *
> >> + * See kernel/stop_machine.c
> >> + */
> >> +
> >> +#ifdef CONFIG_SMP
> >> +static int
> >> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
> >> +		    int sd_flag, int flags)
> >> +{
> >> +	return task_cpu(p); /* stop tasks as never migrate */
> >> +}
> >> +#endif /* CONFIG_SMP */
> >> +
> >> +static void
> >> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +	resched_task(rq->curr); /* we preempt everything */
> >> +}
> >> +
> >> +static struct task_struct *pick_next_task_stop(struct rq *rq)
> >> +{
> >> +	struct task_struct *stop = rq->stop;
> >> +
> >> +	if (stop && stop->state == TASK_RUNNING)
> >> +		return stop;
> >> +
> >> +	return NULL;
> >> +}
> >> +
> >> +static void
> >> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void
> >> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void yield_task_stop(struct rq *rq)
> >> +{
> >> +	BUG(); /* the stop task should never yield, its pointless. */
> >> +}
> >> +
> >> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> >> +{
> >> +}
> >> +
> >> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
> >> +{
> >> +}
> >> +
> >> +static void set_curr_task_stop(struct rq *rq)
> >> +{
> >> +}
> >> +
> >> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
> >> +			     int running)
> >> +{
> >> +	BUG(); /* its impossible to change to this class */
> >> +}
> >> +
> >> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
> >> +			      int oldprio, int running)
> >> +{
> >> +	BUG(); /* how!?, what priority? */
> >> +}
> >> +
> >> +static unsigned int
> >> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
> >> +{
> >> +	return 0;
> >> +}
> >> +
> >> +/*
> >> + * Simple, special scheduling class for the per-CPU stop tasks:
> >> + */
> >> +static const struct sched_class stop_sched_class = {
> >> +	.next			= &rt_sched_class,
> >> +
> >> +	.enqueue_task		= enqueue_task_stop,
> >> +	.dequeue_task		= dequeue_task_stop,
> >> +	.yield_task		= yield_task_stop,
> >> +
> >> +	.check_preempt_curr	= check_preempt_curr_stop,
> >> +
> >> +	.pick_next_task		= pick_next_task_stop,
> >> +	.put_prev_task		= put_prev_task_stop,
> >> +
> >> +#ifdef CONFIG_SMP
> >> +	.select_task_rq		= select_task_rq_stop,
> >> +#endif
> >> +
> >> +	.set_curr_task          = set_curr_task_stop,
> >> +	.task_tick		= task_tick_stop,
> >> +
> >> +	.get_rr_interval	= get_rr_interval_stop,
> >> +
> >> +	.prio_changed		= prio_changed_stop,
> >> +	.switched_to		= switched_to_stop,
> >> +
> >> +	/* no .task_new for stop tasks */
> >> +};
> >>
> >>
> >>
> > 
> > 
> > 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18 10:05                 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 37+ messages in thread
From: Benjamin Herrenschmidt @ 2010-10-18 10:05 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Zijlstra, linuxppc-dev, LKML, Steven Rostedt,
	Paul Mackerras, Anton Blanchard, Ingo Molnar, Peter

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> Cc: Steven
> Cc: Ingo
> Cc: Peter
> Cc: Anton Blanchard <anton@samba.org>
> Cc: Paul Mackerras <paulus@samba.org>
> 
> For those Cced, More information here:
> 
> http://marc.info/?l=ltp-list&m=128569007015044&w=2
> http://marc.info/?l=ltp-list&m=128696942432669&w=2

Hrm... that's nasty...

Should we have some kind of flag to avoid spin_yield() calling H_CEDE
(or whatever it calls) when tracing an hcall to prevent that ? Anton,
Paulus, any other smart idea ? A TLF_ would do...

Cheers,
Ben.

> 02:37, Subrata Modak wrote:
> > I get a bigger trace with this patch:
> > 
> > Unable to handle kernel paging request for data at address 0x00000000
> > Faulting instruction address: 0xc0000000002133f0
> > cpu 0x2: Vector: 300 (Data Access) at [c0000000d9f8b560]
> >     pc: c0000000002133f0: .trace_clock_global+0xb4/0x2a0
> >     lr: c000000000213458: .trace_clock_global+0x11c/0x2a0
> >     sp: c0000000d9f8b7e0
> >    msr: 800000000200b032
> >    dar: 0
> >  dsisr: 40000000
> >   current = 0xc0000000d9f7d100
> >   paca    = 0xc000000007fc8e00
> >     pid   = 1667, comm = ftrace_stack_tr
> > Unrecoverable FP Unavailable Exception 800 at c0000000016a9540
> > cpu 0x0: Vector: 8Unable to handle0 kernel paging r0 equest for data (at
> > address 0xbffFffffe0175b688
> > PU UnavaFaulting instruciltion address: 0xac0000000001017fcb
> > le) at [c0000000d9f8a6a0]
> > p   pc: c0000000016a9540: etnetre r?  ?f ofro rh ehlepl
> > 
> > 
> >     lr: [c000000000016a9540: key_type_dns_resolver+0x15110/0x365f8
> >     sp: c0000000018804e8
> >    msr: 8000000000001032
> >   current = 0xc0000000d838d100
> >   paca    = 0xc000000007fc8000
> >     pid   = 1668, comm = ftrace_stack_ma
> >  pid   = 1668, cc0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8b9b0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8ba40] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8baf0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8bb80] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8bc40] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8bcd0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8bd40] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8bdd0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> 
> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..
> 
> --
> Li Zefan
> 
> > [c0000000d9f8be90] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8bfa0] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c030] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c0e0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c170] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c230] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c2c0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c330] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c3c0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8c480] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8c590] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8c620] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8c6d0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8c760] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8c820] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8c8b0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8c920] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8c9b0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8ca70] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8cb80] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8cc10] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8ccc0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8cd50] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8ce10] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8cea0] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8cf10] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8cfa0] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d060] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d170] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d200] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d2b0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d340] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d400] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8d490] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8d500] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8d590] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8d650] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8d760] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8d7f0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8d8a0] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8d930] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8d9f0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8da80] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8daf0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8db80] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8dc40] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > [c0000000d9f8dd50] c000000000223178 .ring_buffer_lock_reserve
> > +0x24c/0x2a4
> > [c0000000d9f8dde0] c00000000022d6f4 .trace_buffer_lock_reserve+0x58/0xe4
> > [c0000000d9f8de90] c00000000022ec9c .trace_current_buffer_lock_reserve
> > +0x44/0x6c
> > [c0000000d9f8df20] c000000000011c5c .ftrace_raw_event_hcall_entry
> > +0x7c/0x144
> > [c0000000d9f8dfe0] c000000000096624 .__trace_hcall_entry+0xa0/0xec
> > [c0000000d9f8e070] c00000000009786c .plpar_hcall_norets+0x50/0xd0
> > [c0000000d9f8e0e0] c0000000000749c8 .__spin_yield+0x130/0x15c
> > [c0000000d9f8e170] c000000000213458 .trace_clock_global+0x11c/0x2a0
> > [c0000000d9f8e230] c0000000002226b0 .rb_reserve_next_event+0x20c/0x804
> > 
> > Regards--
> > Subrata
> > 
> > On Wed, 2010-10-13 at 19:29 +0800, Li Zefan wrote:
> >> Li Zefan wrote:
> >>> Li Zefan wrote:
> >>>> Subrata Modak wrote:
> >>>>> Li,
> >>>>>
> >>>>> Can you kindly fix the below issues and send me a new patch ?
> >>>>>
> >>>> Sure, I will.
> >>>>
> >>> At a first glance, the kernel bug doesn't seem to come from ftrace,
> >>> at least not directly from it.
> >>>
> >>> Question:
> >>>
> >>> Can you trigger this bug in latest kernel (2.6.36-rc7)? If you
> >>> haven't tried it, could you test it? Thanks!
> >>>
> >> I got a patch from Peter, though he's not sure about the bug yet.
> >> So could you try this?
> >>
> >> Note, I don't know if this patch can be applied to 2.6.35-4..
> >>
> >> ======================
> >>
> >> (From Peter)
> >>
> >> Hrmm, not something I've seen before.. but since the migration thread
> >> and stop_machine are involved, does the below patch which rewrites the
> >> migration-thread/stop_macehine/scheduler interaction cure this?
> >>
> >> This patch is probably .37 fodder, but who knows..
> >>
> >> ---
> >> Subject: sched: Create special class for stop/migrate work
> >> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> Date: Wed Sep 22 13:53:15 CEST 2010
> >>
> >> In order to separate the stop/migrate work thread from the SCHED_FIFO
> >> implementation, create a special class for it that is of higher priority
> >> than SCHED_FIFO itself.
> >>
> >> This currently solves a problem where cpu-hotplug consumes so much cpu-time
> >> that the SCHED_FIFO class gets throttled, but has the bandwidth replenishment
> >> timer pending on the now dead cpu.
> >>
> >> It is also required for when we add the planned deadline scheduling class
> >> above SCHED_FIFO, as the stop/migrate thread still needs to transcent those
> >> tasks.
> >>
> >> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> >> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> >> LKML-Reference: <1285165776.2275.1022.camel@laptop>
> >> ---
> >>  kernel/sched.c          |   54 ++++++++++++++++++++----
> >>  kernel/sched_stoptask.c |  108 ++++++++++++++++++++++++++++++++++++++++++++++++
> >>  kernel/stop_machine.c   |    8 ++-
> >>  3 files changed, 158 insertions(+), 12 deletions(-)
> >>
> >> Index: linux-2.6/kernel/sched.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/sched.c
> >> +++ linux-2.6/kernel/sched.c
> >> @@ -486,7 +486,7 @@ struct rq {
> >>  	 */
> >>  	unsigned long nr_uninterruptible;
> >>
> >> -	struct task_struct *curr, *idle;
> >> +	struct task_struct *curr, *idle, *stop;
> >>  	unsigned long next_balance;
> >>  	struct mm_struct *prev_mm;
> >>
> >> @@ -1837,7 +1837,7 @@ static inline void __set_task_cpu(struct
> >>
> >>  static const struct sched_class rt_sched_class;
> >>
> >> -#define sched_class_highest (&rt_sched_class)
> >> +#define sched_class_highest (&stop_sched_class)
> >>  #define for_each_class(class) \
> >>     for (class = sched_class_highest; class; class = class->next)
> >>
> >> @@ -1917,10 +1917,41 @@ static void deactivate_task(struct rq *r
> >>  #include "sched_idletask.c"
> >>  #include "sched_fair.c"
> >>  #include "sched_rt.c"
> >> +#include "sched_stoptask.c"
> >>  #ifdef CONFIG_SCHED_DEBUG
> >>  # include "sched_debug.c"
> >>  #endif
> >>
> >> +void sched_set_stop_task(int cpu, struct task_struct *stop)
> >> +{
> >> +	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >> +	struct task_struct *old_stop = cpu_rq(cpu)->stop;
> >> +
> >> +	if (stop) {
> >> +		/*
> >> +		 * Make it appear like a SCHED_FIFO task, its something
> >> +		 * userspace knows about and won't get confused about.
> >> +		 *
> >> +		 * Also, it will make PI more or less work without too
> >> +		 * much confusion -- but then, stop work should not
> >> +		 * rely on PI working anyway.
> >> +		 */
> >> +		sched_setscheduler_nocheck(stop, SCHED_FIFO, &param);
> >> +
> >> +		stop->sched_class = &stop_sched_class;
> >> +	}
> >> +
> >> +	cpu_rq(cpu)->stop = stop;
> >> +
> >> +	if (old_stop) {
> >> +		/*
> >> +		 * Reset it back to a normal scheduling class so that
> >> +		 * it can die in pieces.
> >> +		 */
> >> +		old_stop->sched_class = &rt_sched_class;
> >> +	}
> >> +}
> >> +
> >>  /*
> >>   * __normal_prio - return the priority that is based on the static prio
> >>   */
> >> @@ -3720,17 +3751,13 @@ pick_next_task(struct rq *rq)
> >>  			return p;
> >>  	}
> >>
> >> -	class = sched_class_highest;
> >> -	for ( ; ; ) {
> >> +	for_each_class(class) {
> >>  		p = class->pick_next_task(rq);
> >>  		if (p)
> >>  			return p;
> >> -		/*
> >> -		 * Will never be NULL as the idle class always
> >> -		 * returns a non-NULL p:
> >> -		 */
> >> -		class = class->next;
> >>  	}
> >> +
> >> +	BUG(); /* the idle class will always have a runnable task */
> >>  }
> >>
> >>  /*
> >> @@ -4659,6 +4686,15 @@ static int __sched_setscheduler(struct t
> >>  	 */
> >>  	rq = __task_rq_lock(p);
> >>
> >> +	/*
> >> +	 * Changing the policy of the stop threads its a very bad idea
> >> +	 */
> >> +	if (p == rq->stop) {
> >> +		__task_rq_unlock(rq);
> >> +		raw_spin_unlock_irqrestore(&p->pi_lock, flags);
> >> +		return -EINVAL;
> >> +	}
> >> +
> >>  #ifdef CONFIG_RT_GROUP_SCHED
> >>  	if (user) {
> >>  		/*
> >> Index: linux-2.6/kernel/stop_machine.c
> >> ===================================================================
> >> --- linux-2.6.orig/kernel/stop_machine.c
> >> +++ linux-2.6/kernel/stop_machine.c
> >> @@ -287,11 +287,12 @@ static int cpu_stopper_thread(void *data
> >>  	goto repeat;
> >>  }
> >>
> >> +extern void sched_set_stop_task(int cpu, struct task_struct *stop);
> >> +
> >>  /* manage stopper for a cpu, mostly lifted from sched migration thread mgmt */
> >>  static int __cpuinit cpu_stop_cpu_callback(struct notifier_block *nfb,
> >>  					   unsigned long action, void *hcpu)
> >>  {
> >> -	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
> >>  	unsigned int cpu = (unsigned long)hcpu;
> >>  	struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
> >>  	struct task_struct *p;
> >> @@ -304,13 +305,13 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  				   cpu);
> >>  		if (IS_ERR(p))
> >>  			return NOTIFY_BAD;
> >> -		sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
> >>  		get_task_struct(p);
> >> +		kthread_bind(p, cpu);
> >> +		sched_set_stop_task(cpu, p);
> >>  		stopper->thread = p;
> >>  		break;
> >>
> >>  	case CPU_ONLINE:
> >> -		kthread_bind(stopper->thread, cpu);
> >>  		/* strictly unnecessary, as first user will wake it */
> >>  		wake_up_process(stopper->thread);
> >>  		/* mark enabled */
> >> @@ -325,6 +326,7 @@ static int __cpuinit cpu_stop_cpu_callba
> >>  	{
> >>  		struct cpu_stop_work *work;
> >>
> >> +		sched_set_stop_task(cpu, NULL);
> >>  		/* kill the stopper */
> >>  		kthread_stop(stopper->thread);
> >>  		/* drain remaining works */
> >> Index: linux-2.6/kernel/sched_stoptask.c
> >> ===================================================================
> >> --- /dev/null
> >> +++ linux-2.6/kernel/sched_stoptask.c
> >> @@ -0,0 +1,108 @@
> >> +/*
> >> + * stop-task scheduling class.
> >> + *
> >> + * The stop task is the highest priority task in the system, it preempts
> >> + * everything and will be preempted by nothing.
> >> + *
> >> + * See kernel/stop_machine.c
> >> + */
> >> +
> >> +#ifdef CONFIG_SMP
> >> +static int
> >> +select_task_rq_stop(struct rq *rq, struct task_struct *p,
> >> +		    int sd_flag, int flags)
> >> +{
> >> +	return task_cpu(p); /* stop tasks as never migrate */
> >> +}
> >> +#endif /* CONFIG_SMP */
> >> +
> >> +static void
> >> +check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +	resched_task(rq->curr); /* we preempt everything */
> >> +}
> >> +
> >> +static struct task_struct *pick_next_task_stop(struct rq *rq)
> >> +{
> >> +	struct task_struct *stop = rq->stop;
> >> +
> >> +	if (stop && stop->state == TASK_RUNNING)
> >> +		return stop;
> >> +
> >> +	return NULL;
> >> +}
> >> +
> >> +static void
> >> +enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void
> >> +dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags)
> >> +{
> >> +}
> >> +
> >> +static void yield_task_stop(struct rq *rq)
> >> +{
> >> +	BUG(); /* the stop task should never yield, its pointless. */
> >> +}
> >> +
> >> +static void put_prev_task_stop(struct rq *rq, struct task_struct *prev)
> >> +{
> >> +}
> >> +
> >> +static void task_tick_stop(struct rq *rq, struct task_struct *curr, int queued)
> >> +{
> >> +}
> >> +
> >> +static void set_curr_task_stop(struct rq *rq)
> >> +{
> >> +}
> >> +
> >> +static void switched_to_stop(struct rq *rq, struct task_struct *p,
> >> +			     int running)
> >> +{
> >> +	BUG(); /* its impossible to change to this class */
> >> +}
> >> +
> >> +static void prio_changed_stop(struct rq *rq, struct task_struct *p,
> >> +			      int oldprio, int running)
> >> +{
> >> +	BUG(); /* how!?, what priority? */
> >> +}
> >> +
> >> +static unsigned int
> >> +get_rr_interval_stop(struct rq *rq, struct task_struct *task)
> >> +{
> >> +	return 0;
> >> +}
> >> +
> >> +/*
> >> + * Simple, special scheduling class for the per-CPU stop tasks:
> >> + */
> >> +static const struct sched_class stop_sched_class = {
> >> +	.next			= &rt_sched_class,
> >> +
> >> +	.enqueue_task		= enqueue_task_stop,
> >> +	.dequeue_task		= dequeue_task_stop,
> >> +	.yield_task		= yield_task_stop,
> >> +
> >> +	.check_preempt_curr	= check_preempt_curr_stop,
> >> +
> >> +	.pick_next_task		= pick_next_task_stop,
> >> +	.put_prev_task		= put_prev_task_stop,
> >> +
> >> +#ifdef CONFIG_SMP
> >> +	.select_task_rq		= select_task_rq_stop,
> >> +#endif
> >> +
> >> +	.set_curr_task          = set_curr_task_stop,
> >> +	.task_tick		= task_tick_stop,
> >> +
> >> +	.get_rr_interval	= get_rr_interval_stop,
> >> +
> >> +	.prio_changed		= prio_changed_stop,
> >> +	.switched_to		= switched_to_stop,
> >> +
> >> +	/* no .task_new for stop tasks */
> >> +};
> >>
> >>
> >>
> > 
> > 
> > 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev



------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
  2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
  (?)
@ 2010-10-18 14:25                 ` Steven Rostedt
  -1 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-18 14:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: subrata, ltp-list, Ingo Molnar, Peter Zijlstra, Anton Blanchard,
	Paul Mackerras, LKML, linuxppc-dev

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

trace_clock_global() is used by many. I use it (and recommend using it)
on boxes where the TSC is horribly out of sync, and the trace needs
synchronization between CPUs.

The trace_hcall_entry and exit has wrappers already. Just add recursion
protection there.

Perhaps something like this:

(Not compiled nor ran)

+static DEFINE_PER_CPU(hcall_trace_disable);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
 }

 void hcall_tracepoint_unregfunc(void)
 {
 	hcall_tracepoint_refcount--;
 }

+int __trace_disable_check(void)
+{
+	if (!hcall_tracepoint_refcount)
+		return 1;
+
+	if (get_cpu_var(hcall_trace_disable)) {
+		put_cpu_var(hcall_trace_disable);
+		return 1;
+	}
+
+	__get_cpu_var(hcall_trace_disable)++;
+
+	return 0;
+}
+
+void __trace_disable_put(void)
+{
+	__get_cpu_var(hcall_trace_disable)--;
+	put_cpu_var(hcall_trace_disable);
+}
+
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	int trace_disable;
+
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_entry(opcode, args);
+	__trace_disable_put();
 }

 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_exit(opcode, retval, retbuf);
+	__trace_disable_put();
 }

-- Steve



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18 14:25                 ` Steven Rostedt
  0 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-18 14:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, subrata

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

trace_clock_global() is used by many. I use it (and recommend using it)
on boxes where the TSC is horribly out of sync, and the trace needs
synchronization between CPUs.

The trace_hcall_entry and exit has wrappers already. Just add recursion
protection there.

Perhaps something like this:

(Not compiled nor ran)

+static DEFINE_PER_CPU(hcall_trace_disable);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
 }

 void hcall_tracepoint_unregfunc(void)
 {
 	hcall_tracepoint_refcount--;
 }

+int __trace_disable_check(void)
+{
+	if (!hcall_tracepoint_refcount)
+		return 1;
+
+	if (get_cpu_var(hcall_trace_disable)) {
+		put_cpu_var(hcall_trace_disable);
+		return 1;
+	}
+
+	__get_cpu_var(hcall_trace_disable)++;
+
+	return 0;
+}
+
+void __trace_disable_put(void)
+{
+	__get_cpu_var(hcall_trace_disable)--;
+	put_cpu_var(hcall_trace_disable);
+}
+
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	int trace_disable;
+
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_entry(opcode, args);
+	__trace_disable_put();
 }

 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_exit(opcode, retval, retbuf);
+	__trace_disable_put();
 }

-- Steve

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-18 14:25                 ` Steven Rostedt
  0 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-18 14:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Paul Mackerras,
	Anton Blanchard, Ingo Molnar

On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

trace_clock_global() is used by many. I use it (and recommend using it)
on boxes where the TSC is horribly out of sync, and the trace needs
synchronization between CPUs.

The trace_hcall_entry and exit has wrappers already. Just add recursion
protection there.

Perhaps something like this:

(Not compiled nor ran)

+static DEFINE_PER_CPU(hcall_trace_disable);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
 }

 void hcall_tracepoint_unregfunc(void)
 {
 	hcall_tracepoint_refcount--;
 }

+int __trace_disable_check(void)
+{
+	if (!hcall_tracepoint_refcount)
+		return 1;
+
+	if (get_cpu_var(hcall_trace_disable)) {
+		put_cpu_var(hcall_trace_disable);
+		return 1;
+	}
+
+	__get_cpu_var(hcall_trace_disable)++;
+
+	return 0;
+}
+
+void __trace_disable_put(void)
+{
+	__get_cpu_var(hcall_trace_disable)--;
+	put_cpu_var(hcall_trace_disable);
+}
+
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	int trace_disable;
+
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_entry(opcode, args);
+	__trace_disable_put();
 }

 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	if (__trace_disable_check())
+		return;
+
 	trace_hcall_exit(opcode, retval, retbuf);
+	__trace_disable_put();
 }

-- Steve



------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
  2010-10-18 14:25                 ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Steven Rostedt
  (?)
@ 2010-10-19  0:49                   ` Li Zefan
  -1 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-19  0:49 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: subrata, ltp-list, Ingo Molnar, Peter Zijlstra, Anton Blanchard,
	Paul Mackerras, LKML, linuxppc-dev

Steven Rostedt wrote:
> On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> trace_clock_global() is used by many. I use it (and recommend using it)
> on boxes where the TSC is horribly out of sync, and the trace needs
> synchronization between CPUs.
> 
> The trace_hcall_entry and exit has wrappers already. Just add recursion
> protection there.
> 

Right, I thought of this. But as I have no machine to test, I'll leave
this to others.

> Perhaps something like this:
> 
> (Not compiled nor ran)
> 
> +static DEFINE_PER_CPU(hcall_trace_disable);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
>  }
> 
>  void hcall_tracepoint_unregfunc(void)
>  {
>  	hcall_tracepoint_refcount--;
>  }
> 
> +int __trace_disable_check(void)
> +{
> +	if (!hcall_tracepoint_refcount)
> +		return 1;
> +
> +	if (get_cpu_var(hcall_trace_disable)) {
> +		put_cpu_var(hcall_trace_disable);
> +		return 1;
> +	}
> +
> +	__get_cpu_var(hcall_trace_disable)++;
> +
> +	return 0;
> +}
> +
> +void __trace_disable_put(void)
> +{
> +	__get_cpu_var(hcall_trace_disable)--;
> +	put_cpu_var(hcall_trace_disable);
> +}
> +
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	int trace_disable;
> +
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_entry(opcode, args);
> +	__trace_disable_put();
>  }
> 
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	__trace_disable_put();
>  }
> 
> -- Steve
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-19  0:49                   ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-19  0:49 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, subrata

Steven Rostedt wrote:
> On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> trace_clock_global() is used by many. I use it (and recommend using it)
> on boxes where the TSC is horribly out of sync, and the trace needs
> synchronization between CPUs.
> 
> The trace_hcall_entry and exit has wrappers already. Just add recursion
> protection there.
> 

Right, I thought of this. But as I have no machine to test, I'll leave
this to others.

> Perhaps something like this:
> 
> (Not compiled nor ran)
> 
> +static DEFINE_PER_CPU(hcall_trace_disable);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
>  }
> 
>  void hcall_tracepoint_unregfunc(void)
>  {
>  	hcall_tracepoint_refcount--;
>  }
> 
> +int __trace_disable_check(void)
> +{
> +	if (!hcall_tracepoint_refcount)
> +		return 1;
> +
> +	if (get_cpu_var(hcall_trace_disable)) {
> +		put_cpu_var(hcall_trace_disable);
> +		return 1;
> +	}
> +
> +	__get_cpu_var(hcall_trace_disable)++;
> +
> +	return 0;
> +}
> +
> +void __trace_disable_put(void)
> +{
> +	__get_cpu_var(hcall_trace_disable)--;
> +	put_cpu_var(hcall_trace_disable);
> +}
> +
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	int trace_disable;
> +
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_entry(opcode, args);
> +	__trace_disable_put();
>  }
> 
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	__trace_disable_put();
>  }
> 
> -- Steve
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: [PATCH v2] Add ftrace-stress-test to LTP)
@ 2010-10-19  0:49                   ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-19  0:49 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Paul Mackerras,
	Anton Blanchard, Ingo Molnar

Steven Rostedt wrote:
> On Mon, 2010-10-18 at 11:19 +0800, Li Zefan wrote:
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> trace_clock_global() is used by many. I use it (and recommend using it)
> on boxes where the TSC is horribly out of sync, and the trace needs
> synchronization between CPUs.
> 
> The trace_hcall_entry and exit has wrappers already. Just add recursion
> protection there.
> 

Right, I thought of this. But as I have no machine to test, I'll leave
this to others.

> Perhaps something like this:
> 
> (Not compiled nor ran)
> 
> +static DEFINE_PER_CPU(hcall_trace_disable);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
>  }
> 
>  void hcall_tracepoint_unregfunc(void)
>  {
>  	hcall_tracepoint_refcount--;
>  }
> 
> +int __trace_disable_check(void)
> +{
> +	if (!hcall_tracepoint_refcount)
> +		return 1;
> +
> +	if (get_cpu_var(hcall_trace_disable)) {
> +		put_cpu_var(hcall_trace_disable);
> +		return 1;
> +	}
> +
> +	__get_cpu_var(hcall_trace_disable)++;
> +
> +	return 0;
> +}
> +
> +void __trace_disable_put(void)
> +{
> +	__get_cpu_var(hcall_trace_disable)--;
> +	put_cpu_var(hcall_trace_disable);
> +}
> +
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	int trace_disable;
> +
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_entry(opcode, args);
> +	__trace_disable_put();
>  }
> 
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	if (__trace_disable_check())
> +		return;
> +
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	__trace_disable_put();
>  }
> 
> -- Steve
> 
> 
> 
> 

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH] powerpc: Fix hcall tracepoint recursion
  2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
  (?)
@ 2010-10-21 10:52                 ` Anton Blanchard
  -1 siblings, 0 replies; 37+ messages in thread
From: Anton Blanchard @ 2010-10-21 10:52 UTC (permalink / raw)
  To: Li Zefan
  Cc: subrata, ltp-list, Steven Rostedt, Ingo Molnar, Peter Zijlstra,
	Paul Mackerras, LKML, linuxppc-dev


Hi,

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

Nasty! How does the patch below look? I had to disable irqs otherwise
we would sometimes drop valid events (if we take an interrupt anywhere
in the region where depth is elevated, then the entire interrupt will
be blocked from calling hcall tracepoints.

Anton
--

Subject: [PATCH] powerpc: Fix hcall tracepoint recursion

Spinlocks on shared processor partitions use H_YIELD to notify the
hypervisor we are waiting on another virtual CPU. Unfortunately this means
the hcall tracepoints can recurse.

The patch below adds a percpu depth and checks it on both the entry and
exit hcall tracepoints.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
+++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
@@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
 /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
 extern long hcall_tracepoint_refcount;
 
+/* 
+ * Since the tracing code might execute hcalls we need to guard against
+ * recursion. One example of this are spinlocks calling H_YIELD on
+ * shared processor partitions.
+ */
+static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
@@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
 
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_entry(opcode, args);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 
 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_exit(opcode, retval, retbuf);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 #endif

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-21 10:52                 ` Anton Blanchard
  0 siblings, 0 replies; 37+ messages in thread
From: Anton Blanchard @ 2010-10-21 10:52 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Steven Rostedt,
	Paul Mackerras, Ingo Molnar, subrata


Hi,

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

Nasty! How does the patch below look? I had to disable irqs otherwise
we would sometimes drop valid events (if we take an interrupt anywhere
in the region where depth is elevated, then the entire interrupt will
be blocked from calling hcall tracepoints.

Anton
--

Subject: [PATCH] powerpc: Fix hcall tracepoint recursion

Spinlocks on shared processor partitions use H_YIELD to notify the
hypervisor we are waiting on another virtual CPU. Unfortunately this means
the hcall tracepoints can recurse.

The patch below adds a percpu depth and checks it on both the entry and
exit hcall tracepoints.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
+++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
@@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
 /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
 extern long hcall_tracepoint_refcount;
 
+/* 
+ * Since the tracing code might execute hcalls we need to guard against
+ * recursion. One example of this are spinlocks calling H_YIELD on
+ * shared processor partitions.
+ */
+static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
@@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
 
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_entry(opcode, args);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 
 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_exit(opcode, retval, retbuf);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 #endif

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-21 10:52                 ` Anton Blanchard
  0 siblings, 0 replies; 37+ messages in thread
From: Anton Blanchard @ 2010-10-21 10:52 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Rostedt,
	Paul Mackerras, Steven, Ingo Molnar


Hi,

> This is a dead loop:
> 
> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> 
> And this is a PPC specific bug. Hope some ppc guys will fix it?
> Or we kill trace_clock_global() if no one actually uses it..

Nasty! How does the patch below look? I had to disable irqs otherwise
we would sometimes drop valid events (if we take an interrupt anywhere
in the region where depth is elevated, then the entire interrupt will
be blocked from calling hcall tracepoints.

Anton
--

Subject: [PATCH] powerpc: Fix hcall tracepoint recursion

Spinlocks on shared processor partitions use H_YIELD to notify the
hypervisor we are waiting on another virtual CPU. Unfortunately this means
the hcall tracepoints can recurse.

The patch below adds a percpu depth and checks it on both the entry and
exit hcall tracepoints.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
===================================================================
--- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
+++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
@@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
 /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
 extern long hcall_tracepoint_refcount;
 
+/* 
+ * Since the tracing code might execute hcalls we need to guard against
+ * recursion. One example of this are spinlocks calling H_YIELD on
+ * shared processor partitions.
+ */
+static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
+
 void hcall_tracepoint_regfunc(void)
 {
 	hcall_tracepoint_refcount++;
@@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
 
 void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_entry(opcode, args);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 
 void __trace_hcall_exit(long opcode, unsigned long retval,
 			unsigned long *retbuf)
 {
+	unsigned long flags;
+	unsigned int *depth;
+
+	local_irq_save(flags);
+
+	depth = &__get_cpu_var(hcall_trace_depth);
+
+	if (*depth)
+		goto out;
+
+	(*depth)++;
 	trace_hcall_exit(opcode, retval, retbuf);
+	(*depth)--;
+
+out:
+	local_irq_restore(flags);
 }
 #endif

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
  2010-10-21 10:52                 ` Anton Blanchard
  (?)
@ 2010-10-22  7:22                   ` Li Zefan
  -1 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-22  7:22 UTC (permalink / raw)
  To: Anton Blanchard, subrata
  Cc: ltp-list, Steven Rostedt, Ingo Molnar, Peter Zijlstra,
	Paul Mackerras, LKML, linuxppc-dev

Anton Blanchard wrote:
> Hi,
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> Nasty! How does the patch below look? I had to disable irqs otherwise
> we would sometimes drop valid events (if we take an interrupt anywhere
> in the region where depth is elevated, then the entire interrupt will
> be blocked from calling hcall tracepoints.
> 

Thanks!

Subrata, could you test the patch below?

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22  7:22                   ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-22  7:22 UTC (permalink / raw)
  To: Anton Blanchard, subrata
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Ingo Molnar, linuxppc-dev

Anton Blanchard wrote:
> Hi,
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> Nasty! How does the patch below look? I had to disable irqs otherwise
> we would sometimes drop valid events (if we take an interrupt anywhere
> in the region where depth is elevated, then the entire interrupt will
> be blocked from calling hcall tracepoints.
> 

Thanks!

Subrata, could you test the patch below?

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif
> 
> 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22  7:22                   ` Li Zefan
  0 siblings, 0 replies; 37+ messages in thread
From: Li Zefan @ 2010-10-22  7:22 UTC (permalink / raw)
  To: Anton Blanchard, subrata
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Ingo Molnar, linuxppc-dev

Anton Blanchard wrote:
> Hi,
> 
>> This is a dead loop:
>>
>> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
>>
>> And this is a PPC specific bug. Hope some ppc guys will fix it?
>> Or we kill trace_clock_global() if no one actually uses it..
> 
> Nasty! How does the patch below look? I had to disable irqs otherwise
> we would sometimes drop valid events (if we take an interrupt anywhere
> in the region where depth is elevated, then the entire interrupt will
> be blocked from calling hcall tracepoints.
> 

Thanks!

Subrata, could you test the patch below?

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif
> 
> 

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
  2010-10-22  7:22                   ` Li Zefan
  (?)
@ 2010-10-22  7:25                     ` Subrata Modak
  -1 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-22  7:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: Anton Blanchard, ltp-list, Steven Rostedt, Ingo Molnar,
	Peter Zijlstra, Paul Mackerras, LKML, linuxppc-dev

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote:
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?

Yes, definitely. Givmme some time.

Regards--
Subrata

> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22  7:25                     ` Subrata Modak
  0 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-22  7:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote:
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?

Yes, definitely. Givmme some time.

Regards--
Subrata

> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22  7:25                     ` Subrata Modak
  0 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-10-22  7:25 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote:
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?

Yes, definitely. Givmme some time.

Regards--
Subrata

> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
  2010-10-21 10:52                 ` Anton Blanchard
  (?)
@ 2010-10-22 14:14                   ` Steven Rostedt
  -1 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-22 14:14 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: Li Zefan, subrata, ltp-list, Ingo Molnar, Peter Zijlstra,
	Paul Mackerras, LKML, linuxppc-dev

On Thu, 2010-10-21 at 21:52 +1100, Anton Blanchard wrote:

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif

That's similar to the example that I wrote, but without the encapsulated
code and with disabling interrupts for the reasons you gave.

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve



^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22 14:14                   ` Steven Rostedt
  0 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-22 14:14 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, Li Zefan, LKML,
	Paul Mackerras, Ingo Molnar, subrata

On Thu, 2010-10-21 at 21:52 +1100, Anton Blanchard wrote:

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif

That's similar to the example that I wrote, but without the encapsulated
code and with disabling interrupts for the reasons you gave.

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-10-22 14:14                   ` Steven Rostedt
  0 siblings, 0 replies; 37+ messages in thread
From: Steven Rostedt @ 2010-10-22 14:14 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: ltp-list, Peter Zijlstra, linuxppc-dev, LKML, Paul Mackerras,
	Ingo Molnar

On Thu, 2010-10-21 at 21:52 +1100, Anton Blanchard wrote:

> Anton
> --
> 
> Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> 
> Spinlocks on shared processor partitions use H_YIELD to notify the
> hypervisor we are waiting on another virtual CPU. Unfortunately this means
> the hcall tracepoints can recurse.
> 
> The patch below adds a percpu depth and checks it on both the entry and
> exit hcall tracepoints.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
> 
> Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> ===================================================================
> --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
>  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
>  extern long hcall_tracepoint_refcount;
>  
> +/* 
> + * Since the tracing code might execute hcalls we need to guard against
> + * recursion. One example of this are spinlocks calling H_YIELD on
> + * shared processor partitions.
> + */
> +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> +
>  void hcall_tracepoint_regfunc(void)
>  {
>  	hcall_tracepoint_refcount++;
> @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
>  
>  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_entry(opcode, args);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  
>  void __trace_hcall_exit(long opcode, unsigned long retval,
>  			unsigned long *retbuf)
>  {
> +	unsigned long flags;
> +	unsigned int *depth;
> +
> +	local_irq_save(flags);
> +
> +	depth = &__get_cpu_var(hcall_trace_depth);
> +
> +	if (*depth)
> +		goto out;
> +
> +	(*depth)++;
>  	trace_hcall_exit(opcode, retval, retbuf);
> +	(*depth)--;
> +
> +out:
> +	local_irq_restore(flags);
>  }
>  #endif

That's similar to the example that I wrote, but without the encapsulated
code and with disabling interrupts for the reasons you gave.

Acked-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve



------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
       [not found]                     ` <20101101201256.66dc6dd7@kryten>
@ 2010-11-02 18:46                       ` Subrata Modak
  0 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-11-02 18:46 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: ltp-list, linux-kernel, linuxppc-dev, linuxppc-embedded, Steven Rostedt


[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]

Anton Blanchard wrote:
> Hi Subrata,
>
>   
>>> Subrata, could you test the patch below?
>>>       
>> Yes, definitely. Givmme some time.
>>     
>
> Did you get to test this patch? I can push to get it merged if it looks
> good.
>   

Yes, i was able to test this patch on 2.6.37-rc1 and everything looks 
Ok. This can be safely pushed now.
(http://marc.info/?l=ltp-list&m=128766032006665&w=2,)

Regards--
Subrata

> Anton
>   


[-- Attachment #1.2: Type: text/html, Size: 1121 bytes --]

[-- Attachment #2: Type: text/plain, Size: 415 bytes --]

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
  2010-10-22  7:22                   ` Li Zefan
  (?)
@ 2010-11-11  7:57                     ` Subrata Modak
  -1 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-11-11  7:57 UTC (permalink / raw)
  To: Li Zefan
  Cc: Anton Blanchard, ltp-list, Steven Rostedt, Ingo Molnar,
	Peter Zijlstra, Paul Mackerras, LKML, linuxppc-dev

I tested and reported back the results. The patch works fine. Can you
please find out if it has been committed to Linus tree and if yes, then
the commit id please ?

Regards--
Subrata

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote: 
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?
> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 


^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-11-11  7:57                     ` Subrata Modak
  0 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-11-11  7:57 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

I tested and reported back the results. The patch works fine. Can you
please find out if it has been committed to Linus tree and if yes, then
the commit id please ?

Regards--
Subrata

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote: 
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?
> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [LTP] [PATCH] powerpc: Fix hcall tracepoint recursion
@ 2010-11-11  7:57                     ` Subrata Modak
  0 siblings, 0 replies; 37+ messages in thread
From: Subrata Modak @ 2010-11-11  7:57 UTC (permalink / raw)
  To: Li Zefan
  Cc: ltp-list, Peter Zijlstra, LKML, Steven Rostedt, Paul Mackerras,
	Anton Blanchard, Ingo Molnar, linuxppc-dev

I tested and reported back the results. The patch works fine. Can you
please find out if it has been committed to Linus tree and if yes, then
the commit id please ?

Regards--
Subrata

On Fri, 2010-10-22 at 15:22 +0800, Li Zefan wrote: 
> Anton Blanchard wrote:
> > Hi,
> > 
> >> This is a dead loop:
> >>
> >> trace_hcall_entry() -> trace_clock_global() -> trace_hcall_entry() ..
> >>
> >> And this is a PPC specific bug. Hope some ppc guys will fix it?
> >> Or we kill trace_clock_global() if no one actually uses it..
> > 
> > Nasty! How does the patch below look? I had to disable irqs otherwise
> > we would sometimes drop valid events (if we take an interrupt anywhere
> > in the region where depth is elevated, then the entire interrupt will
> > be blocked from calling hcall tracepoints.
> > 
> 
> Thanks!
> 
> Subrata, could you test the patch below?
> 
> > Anton
> > --
> > 
> > Subject: [PATCH] powerpc: Fix hcall tracepoint recursion
> > 
> > Spinlocks on shared processor partitions use H_YIELD to notify the
> > hypervisor we are waiting on another virtual CPU. Unfortunately this means
> > the hcall tracepoints can recurse.
> > 
> > The patch below adds a percpu depth and checks it on both the entry and
> > exit hcall tracepoints.
> > 
> > Signed-off-by: Anton Blanchard <anton@samba.org>
> > ---
> > 
> > Index: powerpc.git/arch/powerpc/platforms/pseries/lpar.c
> > ===================================================================
> > --- powerpc.git.orig/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:32:00.980003644 +1100
> > +++ powerpc.git/arch/powerpc/platforms/pseries/lpar.c	2010-10-21 17:34:54.942681273 +1100
> > @@ -701,6 +701,13 @@ EXPORT_SYMBOL(arch_free_page);
> >  /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
> >  extern long hcall_tracepoint_refcount;
> >  
> > +/* 
> > + * Since the tracing code might execute hcalls we need to guard against
> > + * recursion. One example of this are spinlocks calling H_YIELD on
> > + * shared processor partitions.
> > + */
> > +static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
> > +
> >  void hcall_tracepoint_regfunc(void)
> >  {
> >  	hcall_tracepoint_refcount++;
> > @@ -713,12 +720,42 @@ void hcall_tracepoint_unregfunc(void)
> >  
> >  void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_entry(opcode, args);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  
> >  void __trace_hcall_exit(long opcode, unsigned long retval,
> >  			unsigned long *retbuf)
> >  {
> > +	unsigned long flags;
> > +	unsigned int *depth;
> > +
> > +	local_irq_save(flags);
> > +
> > +	depth = &__get_cpu_var(hcall_trace_depth);
> > +
> > +	if (*depth)
> > +		goto out;
> > +
> > +	(*depth)++;
> >  	trace_hcall_exit(opcode, retval, retbuf);
> > +	(*depth)--;
> > +
> > +out:
> > +	local_irq_restore(flags);
> >  }
> >  #endif
> > 
> > 


------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2010-11-11  7:57 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07  2:50 [LTP] [PATCH v2] Add ftrace-stress-test to LTP Li Zefan
2010-09-28 16:05 ` Subrata Modak
2010-10-04  7:13   ` Subrata Modak
2010-10-13  7:21   ` Subrata Modak
2010-10-13  7:29     ` Li Zefan
2010-10-13  7:35       ` Li Zefan
2010-10-13 11:29         ` Li Zefan
2010-10-13 18:37           ` Subrata Modak
2010-10-13 19:01             ` Subrata Modak
2010-10-18  3:19             ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] [PATCH v2] Add ftrace-stress-test to LTP) Li Zefan
2010-10-18  3:19               ` [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: " Li Zefan
2010-10-18  3:19               ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
2010-10-18 10:05               ` Benjamin Herrenschmidt
2010-10-18 10:05                 ` [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: " Benjamin Herrenschmidt
2010-10-18 10:05                 ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Benjamin Herrenschmidt
2010-10-18 14:25               ` Steven Rostedt
2010-10-18 14:25                 ` [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: " Steven Rostedt
2010-10-18 14:25                 ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Steven Rostedt
2010-10-19  0:49                 ` Li Zefan
2010-10-19  0:49                   ` [LTP] BUG: dead loop in PowerPC hcall tracepoint (Was: " Li Zefan
2010-10-19  0:49                   ` BUG: dead loop in PowerPC hcall tracepoint (Was: [LTP] " Li Zefan
2010-10-21 10:52               ` [PATCH] powerpc: Fix hcall tracepoint recursion Anton Blanchard
2010-10-21 10:52                 ` [LTP] " Anton Blanchard
2010-10-21 10:52                 ` Anton Blanchard
2010-10-22  7:22                 ` Li Zefan
2010-10-22  7:22                   ` [LTP] " Li Zefan
2010-10-22  7:22                   ` Li Zefan
2010-10-22  7:25                   ` Subrata Modak
2010-10-22  7:25                     ` [LTP] " Subrata Modak
2010-10-22  7:25                     ` Subrata Modak
     [not found]                     ` <20101101201256.66dc6dd7@kryten>
2010-11-02 18:46                       ` [LTP] " Subrata Modak
2010-11-11  7:57                   ` Subrata Modak
2010-11-11  7:57                     ` [LTP] " Subrata Modak
2010-11-11  7:57                     ` Subrata Modak
2010-10-22 14:14                 ` Steven Rostedt
2010-10-22 14:14                   ` [LTP] " Steven Rostedt
2010-10-22 14:14                   ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.