Merge branch 'linus' into perfcounters/core-v2
Ingo Molnar [Mon, 6 Apr 2009 07:02:57 +0000 (09:02 +0200)]
Merge reason: we have gathered quite a few conflicts, need to merge upstream

Conflicts:
arch/powerpc/kernel/Makefile
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/hardirq.h
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/irq.c
arch/x86/kernel/syscall_table_32.S
arch/x86/mm/iomap_32.c
include/linux/sched.h
kernel/Makefile

Signed-off-by: Ingo Molnar <mingo@elte.hu>

38 files changed:
1  2 
arch/powerpc/include/asm/hw_irq.h
arch/powerpc/include/asm/systbl.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/irq.c
arch/powerpc/platforms/Kconfig.cputype
arch/x86/Kconfig
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/hardirq.h
arch/x86/include/asm/hw_irq.h
arch/x86/include/asm/thread_info.h
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/cpu/Makefile
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/entry_64.S
arch/x86/kernel/irq.c
arch/x86/kernel/irqinit_32.c
arch/x86/kernel/irqinit_64.c
arch/x86/kernel/signal.c
arch/x86/kernel/syscall_table_32.S
arch/x86/kernel/traps.c
drivers/acpi/processor_idle.c
drivers/char/sysrq.c
fs/exec.c
include/linux/init_task.h
include/linux/kernel_stat.h
include/linux/sched.h
include/linux/syscalls.h
init/Kconfig
kernel/Makefile
kernel/exit.c
kernel/fork.c
kernel/sched.c
kernel/sys.c

@@@ -129,38 -129,7 +129,38 @@@ static inline int irqs_disabled_flags(u
   * interrupt-retrigger: should we handle this via lost interrupts and IPIs
   * or should we not care like we do now ? --BenH.
   */
- struct hw_interrupt_type;
+ struct irq_chip;
  
 +#ifdef CONFIG_PERF_COUNTERS
 +static inline unsigned long get_perf_counter_pending(void)
 +{
 +      unsigned long x;
 +
 +      asm volatile("lbz %0,%1(13)"
 +              : "=r" (x)
 +              : "i" (offsetof(struct paca_struct, perf_counter_pending)));
 +      return x;
 +}
 +
 +static inline void set_perf_counter_pending(int x)
 +{
 +      asm volatile("stb %0,%1(13)" : :
 +              "r" (x),
 +              "i" (offsetof(struct paca_struct, perf_counter_pending)));
 +}
 +
 +extern void perf_counter_do_pending(void);
 +
 +#else
 +
 +static inline unsigned long get_perf_counter_pending(void)
 +{
 +      return 0;
 +}
 +
 +static inline void set_perf_counter_pending(int x) {}
 +static inline void perf_counter_do_pending(void) {}
 +#endif /* CONFIG_PERF_COUNTERS */
 +
  #endif        /* __KERNEL__ */
  #endif        /* _ASM_POWERPC_HW_IRQ_H */
Simple merge
@@@ -94,8 -93,7 +93,9 @@@ obj-$(CONFIG_AUDIT)           += audit.
  obj64-$(CONFIG_AUDIT)         += compat_audit.o
  
  obj-$(CONFIG_DYNAMIC_FTRACE)  += ftrace.o
+ obj-$(CONFIG_FUNCTION_GRAPH_TRACER)   += ftrace.o
 +obj-$(CONFIG_PERF_COUNTERS)   += perf_counter.o power4-pmu.o ppc970-pmu.o \
 +                                 power5-pmu.o power5+-pmu.o power6-pmu.o
  
  obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o
  
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -825,8 -825,9 +825,10 @@@ ia32_sys_call_table
        .quad compat_sys_signalfd4
        .quad sys_eventfd2
        .quad sys_epoll_create1
 -      .quad sys_dup3                  /* 330 */
 +      .quad sys_dup3                          /* 330 */
        .quad sys_pipe2
        .quad sys_inotify_init1
+       .quad compat_sys_preadv
+       .quad compat_sys_pwritev
 +      .quad sys_perf_counter_open
  ia32_syscall_end:
@@@ -12,7 -12,7 +12,8 @@@ typedef struct 
        unsigned int apic_timer_irqs;   /* arch dependent */
        unsigned int irq_spurious_count;
  #endif
+       unsigned int generic_irqs;      /* arch dependent */
 +      unsigned int apic_perf_irqs;
  #ifdef CONFIG_SMP
        unsigned int irq_resched_count;
        unsigned int irq_call_count;
  
  /* Interrupt handlers registered during init_IRQ */
  extern void apic_timer_interrupt(void);
+ extern void generic_interrupt(void);
  extern void error_interrupt(void);
 +extern void perf_counter_interrupt(void);
 +
  extern void spurious_interrupt(void);
  extern void thermal_interrupt(void);
  extern void reschedule_interrupt(void);
Simple merge
  #define __NR_dup3             330
  #define __NR_pipe2            331
  #define __NR_inotify_init1    332
+ #define __NR_preadv           333
+ #define __NR_pwritev          334
 +#define __NR_perf_counter_open        333
  
  #ifdef __KERNEL__
  
@@@ -653,8 -653,11 +653,12 @@@ __SYSCALL(__NR_dup3, sys_dup3
  __SYSCALL(__NR_pipe2, sys_pipe2)
  #define __NR_inotify_init1                    294
  __SYSCALL(__NR_inotify_init1, sys_inotify_init1)
+ #define __NR_preadv                           295
+ __SYSCALL(__NR_preadv, sys_preadv)
+ #define __NR_pwritev                          296
+ __SYSCALL(__NR_pwritev, sys_pwritev)
 -
 +#define __NR_perf_counter_open                295
 +__SYSCALL(__NR_perf_counter_open, sys_perf_counter_open)
  
  #ifndef __NO_STUBS
  #define __ARCH_WANT_OLD_READDIR
Simple merge
Simple merge
Simple merge
@@@ -1,30 -1,39 +1,40 @@@
- #include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
- #include <linux/string.h>
  #include <linux/bootmem.h>
+ #include <linux/linkage.h>
  #include <linux/bitops.h>
+ #include <linux/kernel.h>
  #include <linux/module.h>
- #include <linux/kgdb.h>
- #include <linux/topology.h>
+ #include <linux/percpu.h>
+ #include <linux/string.h>
  #include <linux/delay.h>
+ #include <linux/sched.h>
+ #include <linux/init.h>
+ #include <linux/kgdb.h>
  #include <linux/smp.h>
- #include <linux/percpu.h>
- #include <asm/i387.h>
- #include <asm/msr.h>
- #include <asm/io.h>
- #include <asm/linkage.h>
+ #include <linux/io.h>
+ #include <asm/stackprotector.h>
++#include <asm/perf_counter.h>
  #include <asm/mmu_context.h>
+ #include <asm/hypervisor.h>
+ #include <asm/processor.h>
+ #include <asm/sections.h>
+ #include <asm/topology.h>
+ #include <asm/cpumask.h>
+ #include <asm/pgtable.h>
+ #include <asm/atomic.h>
+ #include <asm/proto.h>
+ #include <asm/setup.h>
+ #include <asm/apic.h>
+ #include <asm/desc.h>
+ #include <asm/i387.h>
  #include <asm/mtrr.h>
+ #include <asm/numa.h>
+ #include <asm/asm.h>
+ #include <asm/cpu.h>
  #include <asm/mce.h>
- #include <asm/perf_counter.h>
+ #include <asm/msr.h>
  #include <asm/pat.h>
- #include <asm/asm.h>
- #include <asm/numa.h>
  #include <asm/smp.h>
- #include <asm/cpu.h>
- #include <asm/cpumask.h>
- #include <asm/apic.h>
  
  #ifdef CONFIG_X86_LOCAL_APIC
  #include <asm/uv/uv.h>
Simple merge
@@@ -55,13 -58,20 +58,24 @@@ static int show_other_interrupts(struc
        for_each_online_cpu(j)
                seq_printf(p, "%10u ", irq_stats(j)->apic_timer_irqs);
        seq_printf(p, "  Local timer interrupts\n");
+       seq_printf(p, "%*s: ", prec, "SPU");
+       for_each_online_cpu(j)
+               seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
+       seq_printf(p, "  Spurious interrupts\n");
 +      seq_printf(p, "CNT: ");
 +      for_each_online_cpu(j)
 +              seq_printf(p, "%10u ", irq_stats(j)->apic_perf_irqs);
 +      seq_printf(p, "  Performance counter interrupts\n");
  #endif
+       if (generic_interrupt_extension) {
+               seq_printf(p, "PLT: ");
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ", irq_stats(j)->generic_irqs);
+               seq_printf(p, "  Platform interrupts\n");
+       }
  #ifdef CONFIG_SMP
-       seq_printf(p, "RES: ");
+       seq_printf(p, "%*s: ", prec, "RES");
        for_each_online_cpu(j)
                seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count);
        seq_printf(p, "  Rescheduling interrupts\n");
@@@ -166,8 -165,10 +169,11 @@@ u64 arch_irq_stat_cpu(unsigned int cpu
  
  #ifdef CONFIG_X86_LOCAL_APIC
        sum += irq_stats(cpu)->apic_timer_irqs;
+       sum += irq_stats(cpu)->irq_spurious_count;
 +      sum += irq_stats(cpu)->apic_perf_irqs;
  #endif
+       if (generic_interrupt_extension)
+               sum += irq_stats(cpu)->generic_irqs;
  #ifdef CONFIG_SMP
        sum += irq_stats(cpu)->irq_resched_count;
        sum += irq_stats(cpu)->irq_call_count;
Simple merge
Simple merge
Simple merge
@@@ -332,4 -332,5 +332,6 @@@ ENTRY(sys_call_table
        .long sys_dup3                  /* 330 */
        .long sys_pipe2
        .long sys_inotify_init1
 +      .long sys_perf_counter_open
+       .long sys_preadv
+       .long sys_pwritev
Simple merge
Simple merge
Simple merge
diff --cc fs/exec.c
Simple merge
Simple merge
Simple merge
@@@ -68,10 -68,9 +68,10 @@@ struct sched_param 
  #include <linux/smp.h>
  #include <linux/sem.h>
  #include <linux/signal.h>
- #include <linux/fs_struct.h>
+ #include <linux/path.h>
  #include <linux/compiler.h>
  #include <linux/completion.h>
 +#include <linux/perf_counter.h>
  #include <linux/pid.h>
  #include <linux/percpu.h>
  #include <linux/topology.h>
@@@ -137,9 -137,9 +138,11 @@@ extern unsigned long nr_running(void)
  extern unsigned long nr_uninterruptible(void);
  extern unsigned long nr_active(void);
  extern unsigned long nr_iowait(void);
 +extern u64 cpu_nr_switches(int cpu);
 +extern u64 cpu_nr_migrations(int cpu);
  
+ extern unsigned long get_parent_ip(unsigned long addr);
  struct seq_file;
  struct cfs_rq;
  struct task_group;
@@@ -1055,8 -1048,10 +1051,11 @@@ struct sched_entity 
        u64                     last_wakeup;
        u64                     avg_overlap;
  
 +      u64                     nr_migrations;
 +
+       u64                     start_runtime;
+       u64                     avg_wakeup;
 -      u64                     nr_migrations;
  #ifdef CONFIG_SCHEDSTATS
        u64                     wait_start;
        u64                     wait_max;
Simple merge
diff --cc init/Kconfig
Simple merge
diff --cc kernel/Makefile
@@@ -93,7 -93,7 +93,8 @@@ obj-$(CONFIG_HAVE_GENERIC_DMA_COHERENT
  obj-$(CONFIG_FUNCTION_TRACER) += trace/
  obj-$(CONFIG_TRACING) += trace/
  obj-$(CONFIG_SMP) += sched_cpupri.o
+ obj-$(CONFIG_SLOW_WORK) += slow-work.o
 +obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o
  
  ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y)
  # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
diff --cc kernel/exit.c
Simple merge
diff --cc kernel/fork.c
Simple merge
diff --cc kernel/sched.c
@@@ -2429,9 -2460,10 +2505,11 @@@ static void __sched_fork(struct task_st
        p->se.exec_start                = 0;
        p->se.sum_exec_runtime          = 0;
        p->se.prev_sum_exec_runtime     = 0;
 +      p->se.nr_migrations             = 0;
        p->se.last_wakeup               = 0;
        p->se.avg_overlap               = 0;
+       p->se.start_runtime             = 0;
+       p->se.avg_wakeup                = sysctl_sched_wakeup_granularity;
  
  #ifdef CONFIG_SCHEDSTATS
        p->se.wait_start                = 0;
@@@ -2650,10 -2690,9 +2736,10 @@@ static void finish_task_switch(struct r
         */
        prev_state = prev->state;
        finish_arch_switch(prev);
 +      perf_counter_task_sched_in(current, cpu_of(rq));
        finish_lock_switch(rq, prev);
  #ifdef CONFIG_SMP
-       if (current->sched_class->post_schedule)
+       if (post_schedule)
                current->sched_class->post_schedule(rq);
  #endif
  
diff --cc kernel/sys.c
Simple merge