Patches contributed by Eötvös Lorand University


commit 05cfbd66d07c44865983c8b65ae9d0037d874206
Merge: 31c9a24ec829 ef631b0ca016
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Apr 14 11:32:23 2009 +0200

    Merge branch 'core/urgent' into core/rcu
    
    Merge reason: new patches to be queued up depend on:
    
       ef631b0: rcu: Make hierarchical RCU less IPI-happy
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 27b19565fe4ca5b0e9d2ae98ce4b81ca728bf445
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Apr 14 11:03:12 2009 +0200

    lockdep: warn about lockdep disabling after kernel taint, fix
    
    Impact: build fix for Sparc and s390
    
    Stephen Rothwell reported that the Sparc build broke:
    
     In file included from kernel/panic.c:12:
     include/linux/debug_locks.h: In function '__debug_locks_off':
     include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'
    
    due to:
    
     9eeba61: lockdep: warn about lockdep disabling after kernel taint
    
    There is some inconsistency between architectures about where exactly
    xchg() is defined.
    
    The traditional place is in system.h but the more logical point for it
    is in atomic.h - where most architectures (especially new ones) have
    it defined. These architecture also still offer it via system.h.
    
    Some, such as Sparc or s390 only have it in asm/system.h and not available
    via asm/atomic.h at all.
    
    Use the widest set of headers in debug_locks.h and also include asm/system.h.
    
    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    LKML-Reference: <20090414144317.026498df.sfr@canb.auug.org.au>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 493dedb7a67b..29b3ce3f2a1d 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -3,6 +3,7 @@
 
 #include <linux/kernel.h>
 #include <asm/atomic.h>
+#include <asm/system.h>
 
 struct task_struct;
 

commit b5c851a88a369854c04e511cefb84ea2d0cfa209
Merge: eb02ce017dd8 80a04d3f2f94
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Apr 14 00:02:16 2009 +0200

    Merge branch 'linus' into tracing/core
    
    Merge reason: merge latest tracing fixes to avoid conflicts in
                  kernel/trace/trace_events_filter.c with upcoming change
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 47f16ca7631f9c6bad8e6d968cfb1433029b09ec
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Apr 10 14:58:05 2009 +0200

    x86, irqinit: preempt merge conflicts
    
    To make the topic merge life easier for tip:perfcounters/core,
    include two (inactive in this topic) IRQ vector initializations
    here.
    
    Also fix build bug - missing kprobes.h inclusion.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 626977200a58..b424c32c4a0c 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -7,6 +7,7 @@
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
+#include <linux/kprobes.h>
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
@@ -195,6 +196,13 @@ static void __init apic_intr_init(void)
 	/* IPI vectors for APIC spurious and error interrupts */
 	alloc_intr_gate(SPURIOUS_APIC_VECTOR, spurious_interrupt);
 	alloc_intr_gate(ERROR_APIC_VECTOR, error_interrupt);
+
+	/* Performance monitoring interrupts: */
+# ifdef CONFIG_PERF_COUNTERS
+	alloc_intr_gate(LOCAL_PERF_VECTOR, perf_counter_interrupt);
+	alloc_intr_gate(LOCAL_PENDING_VECTOR, perf_pending_interrupt);
+# endif
+
 #endif
 
 #ifdef CONFIG_X86_32

commit 1cad1252ed279ea59f3f8d3d3a5817eeb2f7a4d3
Merge: dcef788eb965 93cfb3c9fd83
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Apr 10 12:46:28 2009 +0200

    Merge branch 'tracing/urgent' into tracing/core
    
    Merge reason: pick up both v2.6.30-rc1 [which includes tracing/urgent fixes]
                  and pick up the current lineup of tracing/urgent fixes as well
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit b3828ebb3901adfe989d8d4157ed28247aeec132
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Apr 9 09:50:04 2009 +0200

    perf_counter tools: include PID in perf-report output, tweak user/kernel printut
    
    It's handier than an <unknown> entry.
    Also replace the kernel/user column with a more compact version:
    
      0.52              cc1  [k]  page_fault
      0.57               :0  [k]   _spin_lock
      0.59            :7506  [.]  <unknown>
      0.69               as  [.]  /usr/bin/as: <unknown>
      0.76              cc1  [.]  /lib64/libc-2.8.so: _int_free
      0.92              cc1  [k]  clear_page_c
      1.00            :7465  [.]  <unknown>
      1.43              cc1  [.]  /lib64/libc-2.8.so: memset
      1.86              cc1  [.]  /lib64/libc-2.8.so: _int_malloc
     70.33              cc1  [.]  /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1: <unknown>
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/Documentation/perf_counter/perf-report.cc b/Documentation/perf_counter/perf-report.cc
index 09da0ba482cd..1727317352bf 100644
--- a/Documentation/perf_counter/perf-report.cc
+++ b/Documentation/perf_counter/perf-report.cc
@@ -277,10 +277,17 @@ static std::multimap<int, std::string> rev_hist;
 
 static std::string resolve_comm(int pid)
 {
-	std::string comm = "<unknown>";
+	std::string comm;
+
 	std::map<int, std::string>::const_iterator ci = comms.find(pid);
-	if (ci != comms.end())
+	if (ci != comms.end()) {
 		comm = ci->second;
+	} else {
+		char pid_str[30];
+
+		sprintf(pid_str, ":%d", pid);
+		comm = pid_str;
+	}
 
 	return comm;
 }
@@ -422,13 +429,13 @@ more:
 		char output[1024];
 
 		if (event->header.misc & PERF_EVENT_MISC_KERNEL) {
-			level = "[kernel]";
+			level = " [k] ";
 			sym = resolve_kernel_symbol(event->ip.ip);
 		} else if (event->header.misc & PERF_EVENT_MISC_USER) {
-			level = "[ user ]";
+			level = " [.] ";
 			sym = resolve_user_symbol(event->ip.pid, event->ip.ip);
 		} else {
-			level = "[  hv  ]";
+			level = " [H] ";
 		}
 		comm = resolve_comm(event->ip.pid);
 

commit 888fcee066a2f4abd0d0bc9418c0535f9b01e6e5
Author: Ingo Molnar <mingo@elte.hu>
Date:   Thu Apr 9 09:48:22 2009 +0200

    perf_counter: fix off task->comm by one
    
    strlen() does not include the \0.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 321c57e3556f..b07195bbd228 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1989,7 +1989,7 @@ static void perf_counter_comm_event(struct perf_comm_event *comm_event)
 	unsigned int size;
 	char *comm = comm_event->task->comm;
 
-	size = ALIGN(strlen(comm), sizeof(u64));
+	size = ALIGN(strlen(comm)+1, sizeof(u64));
 
 	comm_event->comm = comm;
 	comm_event->comm_size = size;
@@ -2109,7 +2109,7 @@ static void perf_counter_mmap_event(struct perf_mmap_event *mmap_event)
 	}
 
 got_name:
-	size = ALIGN(strlen(name), sizeof(u64));
+	size = ALIGN(strlen(name)+1, sizeof(u64));
 
 	mmap_event->file_name = name;
 	mmap_event->file_size = size;

commit 280ff388b1b7a818a64af4c789299e62c0d3c094
Merge: c5da9a2bb24a 577c9c456f0e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 8 18:04:48 2009 +0200

    Merge commit 'v2.6.30-rc1' into x86/urgent
    
    Merge reason: fix to be queued up depends on upstream facilities
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit 01fad98a1f1d3b38adcbab4bd97f7f4cb983ffb5
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 8 17:27:59 2009 +0200

    sched: refresh MAINTAINERS entry
    
    Peter has become a co-maintainer of the scheduler during the last year,
    and Robert has become inactive - update the MAINTAINERS entry.
    
    Acked-by: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/MAINTAINERS b/MAINTAINERS
index c3b215970f7b..718b50ac7ea1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3873,8 +3873,8 @@ S:	Maintained
 SCHEDULER
 P:	Ingo Molnar
 M:	mingo@elte.hu
-P:	Robert Love    [the preemptible kernel bits]
-M:	rml@tech9.net
+P:	Peter Zijlstra
+M:	peterz@infradead.org
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 

commit 5af8c4e0fac9838428bd718040b664043a05f37c
Merge: 46e0bb9c12f4 577c9c456f0e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Apr 8 17:25:42 2009 +0200

    Merge commit 'v2.6.30-rc1' into sched/urgent
    
    Merge reason: update to latest upstream to queue up fix
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --cc kernel/sched.c
index 6234d10c6a79,6cc1fd5d5072..5724508c3b66
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@@ -9764,32 -10092,9 +10199,32 @@@ static void cpuacct_charge(struct task_
  	ca = task_ca(tsk);
  
  	for (; ca; ca = ca->parent) {
- 		u64 *cpuusage = percpu_ptr(ca->cpuusage, cpu);
+ 		u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
  		*cpuusage += cputime;
  	}
 +
 +	rcu_read_unlock();
 +}
 +
 +/*
 + * Charge the system/user time to the task's accounting group.
 + */
 +static void cpuacct_update_stats(struct task_struct *tsk,
 +		enum cpuacct_stat_index idx, cputime_t val)
 +{
 +	struct cpuacct *ca;
 +
 +	if (unlikely(!cpuacct_subsys.active))
 +		return;
 +
 +	rcu_read_lock();
 +	ca = task_ca(tsk);
 +
 +	do {
 +		percpu_counter_add(&ca->cpustat[idx], val);
 +		ca = ca->parent;
 +	} while (ca);
 +	rcu_read_unlock();
  }
  
  struct cgroup_subsys cpuacct_subsys = {