Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc7' into tracing/core
authorIngo Molnar <mingo@elte.hu>
Wed, 4 Mar 2009 10:14:47 +0000 (11:14 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 4 Mar 2009 10:14:47 +0000 (11:14 +0100)
1  2 
MAINTAINERS
arch/x86/mm/init_64.c
include/linux/sched.h
init/main.c
kernel/sched.c

diff --combined MAINTAINERS
index f1d45b975a1a2f7150642feef032b2e228633f3b,1c2ca1dc66f2006765dba54bb05edf8a5b57d258..3c3ce2b20322da794152c3c0e356e3dc88181b5e
@@@ -2464,7 -2464,7 +2464,7 @@@ S:      Maintaine
  
  ISDN SUBSYSTEM
  P:    Karsten Keil
- M:    kkeil@suse.de
+ M:    isdn@linux-pingi.de
  L:    isdn4linux@listserv.isdn4linux.de (subscribers-only)
  W:    http://www.isdn4linux.de
  T:    git kernel.org:/pub/scm/linux/kernel/kkeil/isdn-2.6.git
@@@ -2623,12 -2623,6 +2623,12 @@@ M:    jason.wessel@windriver.co
  L:    kgdb-bugreport@lists.sourceforge.net
  S:    Maintained
  
 +KMEMTRACE
 +P:    Eduard - Gabriel Munteanu
 +M:    eduard.munteanu@linux360.ro
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +
  KPROBES
  P:    Ananth N Mavinakayanahalli
  M:    ananth@in.ibm.com
diff --combined arch/x86/mm/init_64.c
index 63fdc531601d53577466c0e4069744f923e21b53,b1352250096e0d734ea4a03650e7d92ae8c2d8ba..ea5ad1e3672d5de4dff2b340cb2df21e772b555a
@@@ -714,6 -714,8 +714,8 @@@ unsigned long __init_refok init_memory_
        pos = start_pfn << PAGE_SHIFT;
        end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
                        << (PMD_SHIFT - PAGE_SHIFT);
+       if (end_pfn > (end >> PAGE_SHIFT))
+               end_pfn = end >> PAGE_SHIFT;
        if (start_pfn < end_pfn) {
                nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
                pos = end_pfn << PAGE_SHIFT;
@@@ -986,48 -988,21 +988,48 @@@ void free_initmem(void
  const int rodata_test_data = 0xC3;
  EXPORT_SYMBOL_GPL(rodata_test_data);
  
 +static int kernel_set_to_readonly;
 +
 +void set_kernel_text_rw(void)
 +{
 +      unsigned long start = PFN_ALIGN(_stext);
 +      unsigned long end = PFN_ALIGN(__start_rodata);
 +
 +      if (!kernel_set_to_readonly)
 +              return;
 +
 +      pr_debug("Set kernel text: %lx - %lx for read write\n",
 +               start, end);
 +
 +      set_memory_rw(start, (end - start) >> PAGE_SHIFT);
 +}
 +
 +void set_kernel_text_ro(void)
 +{
 +      unsigned long start = PFN_ALIGN(_stext);
 +      unsigned long end = PFN_ALIGN(__start_rodata);
 +
 +      if (!kernel_set_to_readonly)
 +              return;
 +
 +      pr_debug("Set kernel text: %lx - %lx for read only\n",
 +               start, end);
 +
 +      set_memory_ro(start, (end - start) >> PAGE_SHIFT);
 +}
 +
  void mark_rodata_ro(void)
  {
        unsigned long start = PFN_ALIGN(_stext), end = PFN_ALIGN(__end_rodata);
        unsigned long rodata_start =
                ((unsigned long)__start_rodata + PAGE_SIZE - 1) & PAGE_MASK;
  
 -#ifdef CONFIG_DYNAMIC_FTRACE
 -      /* Dynamic tracing modifies the kernel text section */
 -      start = rodata_start;
 -#endif
 -
        printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
               (end - start) >> 10);
        set_memory_ro(start, (end - start) >> PAGE_SHIFT);
  
 +      kernel_set_to_readonly = 1;
 +
        /*
         * The rodata section (but not the kernel text!) should also be
         * not-executable.
diff --combined include/linux/sched.h
index 7702cb166e0832d065bf539ecddda68af62ef894,8c216e057c94230ea01c110b0f5bc2c28e8f9ee3..698ce978e97a98e329b3e8b3229f372ba839cbea
@@@ -137,8 -137,6 +137,8 @@@ extern unsigned long nr_uninterruptible
  extern unsigned long nr_active(void);
  extern unsigned long nr_iowait(void);
  
 +extern unsigned long get_parent_ip(unsigned long addr);
 +
  struct seq_file;
  struct cfs_rq;
  struct task_group;
@@@ -1672,16 -1670,6 +1672,16 @@@ static inline int set_cpus_allowed(stru
        return set_cpus_allowed_ptr(p, &new_mask);
  }
  
 +/*
 + * Architectures can set this to 1 if they have specified
 + * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig,
 + * but then during bootup it turns out that sched_clock()
 + * is reliable after all:
 + */
 +#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
 +extern int sched_clock_stable;
 +#endif
 +
  extern unsigned long long sched_clock(void);
  
  extern void sched_clock_init(void);
@@@ -2303,9 -2291,13 +2303,13 @@@ extern long sched_group_rt_runtime(stru
  extern int sched_group_set_rt_period(struct task_group *tg,
                                      long rt_period_us);
  extern long sched_group_rt_period(struct task_group *tg);
+ extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk);
  #endif
  #endif
  
+ extern int task_can_switch_user(struct user_struct *up,
+                                       struct task_struct *tsk);
  #ifdef CONFIG_TASK_XACCT
  static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
  {
diff --combined init/main.c
index db7974ff7a0ac22d592b750528bb47d5ffb26697,83697e160b3a786d3d91c14000f116a441f61bfc..082077af7c445c087cf57d37923cc47c40e3dc81
@@@ -70,7 -70,6 +70,7 @@@
  #include <asm/setup.h>
  #include <asm/sections.h>
  #include <asm/cacheflush.h>
 +#include <trace/kmemtrace.h>
  
  #ifdef CONFIG_X86_LOCAL_APIC
  #include <asm/smp.h>
@@@ -98,7 -97,7 +98,7 @@@ static inline void mark_rodata_ro(void
  extern void tc_init(void);
  #endif
  
- enum system_states system_state;
+ enum system_states system_state __read_mostly;
  EXPORT_SYMBOL(system_state);
  
  /*
@@@ -464,6 -463,7 +464,7 @@@ static noinline void __init_refok rest_
         * at least once to get things moving:
         */
        init_idle_bootup_task(current);
+       rcu_scheduler_starting();
        preempt_enable_no_resched();
        schedule();
        preempt_disable();
@@@ -642,7 -642,6 +643,7 @@@ asmlinkage void __init start_kernel(voi
        enable_debug_pagealloc();
        cpu_hotplug_init();
        kmem_cache_init();
 +      kmemtrace_init();
        debug_objects_mem_init();
        idr_init_cache();
        setup_per_cpu_pageset();
diff --combined kernel/sched.c
index 2492b9b3fed430da164d221e88fe22340a96db73,8e2558c2ba67be440ef7bcb2d95ff8138c806404..328f9c7448a5f24e6d91e3dbf151ebc9b98fad86
@@@ -223,7 -223,7 +223,7 @@@ static void start_rt_bandwidth(struct r
  {
        ktime_t now;
  
-       if (rt_bandwidth_enabled() && rt_b->rt_runtime == RUNTIME_INF)
+       if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF)
                return;
  
        if (hrtimer_active(&rt_b->rt_period_timer))
@@@ -4404,7 -4404,10 +4404,7 @@@ void scheduler_tick(void
  #endif
  }
  
 -#if defined(CONFIG_PREEMPT) && (defined(CONFIG_DEBUG_PREEMPT) || \
 -                              defined(CONFIG_PREEMPT_TRACER))
 -
 -static inline unsigned long get_parent_ip(unsigned long addr)
 +unsigned long get_parent_ip(unsigned long addr)
  {
        if (in_lock_functions(addr)) {
                addr = CALLER_ADDR2;
        return addr;
  }
  
 +#if defined(CONFIG_PREEMPT) && (defined(CONFIG_DEBUG_PREEMPT) || \
 +                              defined(CONFIG_PREEMPT_TRACER))
 +
  void __kprobes add_preempt_count(int val)
  {
  #ifdef CONFIG_DEBUG_PREEMPT
@@@ -9224,6 -9224,16 +9224,16 @@@ static int sched_rt_global_constraints(
  
        return ret;
  }
+ int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
+ {
+       /* Don't accept realtime tasks when there is no way for them to run */
+       if (rt_task(tsk) && tg->rt_bandwidth.rt_runtime == 0)
+               return 0;
+       return 1;
+ }
  #else /* !CONFIG_RT_GROUP_SCHED */
  static int sched_rt_global_constraints(void)
  {
@@@ -9317,8 -9327,7 +9327,7 @@@ cpu_cgroup_can_attach(struct cgroup_sub
                      struct task_struct *tsk)
  {
  #ifdef CONFIG_RT_GROUP_SCHED
-       /* Don't accept realtime tasks when there is no way for them to run */
-       if (rt_task(tsk) && cgroup_tg(cgrp)->rt_bandwidth.rt_runtime == 0)
+       if (!sched_rt_can_attach(cgroup_tg(cgrp), tsk))
                return -EINVAL;
  #else
        /* We don't support RT-tasks being in separate groups */
This page took 0.039254 seconds and 5 git commands to generate.