1. 05 11月, 2008 2 次提交
    • F
      tracing/ftrace: fix a race condition in sched_switch tracer · 07695fa0
      Frederic Weisbecker 提交于
      Impact: fix race condition in sched_switch tracer
      
      This patch fixes a race condition in the sched_switch tracer. If
      several tasks (IE: concurrent initcalls) are playing with
      tracing_start_cmdline_record() and tracing_stop_cmdline_record(), the
      following situation could happen:
      
      _ Task A and B are using the same tracepoint probe. Task A holds it.
        Task B is sleeping and doesn't hold it.
      
      _ Task A frees the sched tracer, then sched_ref is decremented to 0.
      
      _ Task A is preempted and hadn't yet unregistered its tracepoint
        probe, then B runs.
      
      _ B increments sched_ref, sees it's 1 and then guess it has to
        register its probe. But it has not been freed by task A.
      
      _ A lot of bad things can happen after that...
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      07695fa0
    • F
      tracing/fastboot: Enable boot tracing only during initcalls · 71566a0d
      Frederic Weisbecker 提交于
      Impact: modify boot tracer
      
      We used to disable the initcall tracing at a specified time (IE: end
      of builtin initcalls). But we don't need it anymore. It will be
      stopped when initcalls are finished.
      
      However we want two things:
      
      _Start this tracing only after pre-smp initcalls are finished.
      
      _Since we are planning to trace sched_switches at the same time, we
      want to enable them only during the initcall execution.
      
      For this purpose, this patch introduce two functions to enable/disable
      the sched_switch tracing during boot.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      71566a0d
  2. 03 11月, 2008 4 次提交
  3. 02 11月, 2008 2 次提交
  4. 31 10月, 2008 9 次提交
  5. 30 10月, 2008 2 次提交
  6. 29 10月, 2008 2 次提交
    • S
      resources: fix x86info results ioremap.c:226 __ioremap_caller+0xf2/0x2d6() WARNINGs · d68612b2
      Suresh Siddha 提交于
      Impact: avoid false-positive WARN_ON()
      
      Andi Kleen reported:
      > When running x86info on a 2.6.27-git8 system I get
      >
      > resource map sanity check conflict: 0x9e000 0x9efff 0x10000 0x9e7ff System RAM
      > ------------[ cut here ]------------
      > WARNING: at /home/lsrc/linux/arch/x86/mm/ioremap.c:226 __ioremap_caller+0xf2/0x2d6()
      > ...
      
      Some of the pages below the 1MB ISA addresses will be shared typically by both
      BIOS and system usable RAM. For example:
      	BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
      	BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
      
      x86info reads the low physical address using /dev/mem, which internally
      uses ioremap() for accessing non RAM pages. ioremap() of such low
      pages conflicts with multiple resource entities leading to the
      above warning.
      
      Change the iomem_map_sanity_check() to allow mapping a page spanning multiple
      resource entities (minimum granularity that one can map is a page anyhow).
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d68612b2
    • F
      ftrace: perform an initialization for ftrace to enable it · 0b6e4d56
      Frederic Weisbecker 提交于
      Impact: corrects a bug which made the non-dyn function tracer not functional
      
      With latest git, the non-dynamic function tracer didn't get any trace.
      
      The problem was the fact that ftrace_enabled wasn't initialized to 1
      because ftrace hasn't any init function when DYNAMIC_FTRACE is disabled.
      
      So when a tracer tries to register an ftrace_ops struct,
      __register_ftrace_function failed to set the hook.
      
      This patch corrects it by setting an init function to initialize
      ftrace during the boot.
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0b6e4d56
  7. 28 10月, 2008 4 次提交
    • S
      ftrace: fix current_tracer error return · 60063a66
      Steven Rostedt 提交于
      The commit (in linux-tip) c2931e05
       ( ftrace: return an error when setting a nonexistent tracer )
      added useful code that would error when a bad tracer was written into
      the current_tracer file.
      
      But this had a bug if the amount written was more than the amount read by
      that code. The first iteration would set the tracer correctly, but since
      it did not consume the rest of what was written (usually whitespace), the
      userspace utility would continue to write what was not consumed. This
      second iteration would fail to find a tracer and return -EINVAL. Funny
      thing is that the tracer would have already been set.
      
      This patch just consumes all the data that is written to the file.
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60063a66
    • H
      lockdep: fix irqs on/off ip tracing · 6afe40b4
      Heiko Carstens 提交于
      Impact: fix lockdep lock-api-caller output when irqsoff tracing is enabled
      
      81d68a96 "ftrace: trace irq disabled critical timings" added wrappers around
      trace_hardirqs_on/off_caller. However these functions use
      __builtin_return_address(0) to figure out which function actually disabled
      or enabled irqs. The result is that we save the ips of trace_hardirqs_on/off
      instead of the real caller. Not very helpful.
      
      However since the patch from Steven the ip already gets passed. So use that
      and get rid of __builtin_return_address(0) in these two functions.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6afe40b4
    • Q
      lockdep: minor fix for debug_show_all_locks() · 46fec7ac
      qinghuang feng 提交于
      When we failed to get tasklist_lock eventually (count equals 0),
      we should only print " ignoring it.\n", and not print
      " locked it.\n" needlessly.
      Signed-off-by: NQinghuang Feng <qhfeng.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      46fec7ac
    • F
      tracing: fix a build error on alpha · 21798a84
      Frederic Weisbecker 提交于
      Impact: build fix on Alpha
      
      When tracing is enabled, some arch have included <linux/irqflags.h>
      on their <asm/system.h> but others like alpha or m68k don't.
      
      Build error on alpha:
      
      kernel/trace/trace.c: In function 'tracing_cpumask_write':
      kernel/trace/trace.c:2145: error: implicit declaration of function 'raw_local_irq_disable'
      kernel/trace/trace.c:2162: error: implicit declaration of function 'raw_local_irq_enable'
      
      Tested on Alpha through a cross-compiler (should correct a similar issue on m68k).
      Reported-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      21798a84
  8. 27 10月, 2008 9 次提交
  9. 26 10月, 2008 1 次提交
    • L
      Revert "Call init_workqueues before pre smp initcalls." · 4403b406
      Linus Torvalds 提交于
      This reverts commit a802dd0e by moving
      the call to init_workqueues() back where it belongs - after SMP has been
      initialized.
      
      It also moves stop_machine_init() - which needs workqueues - to a later
      phase using a core_initcall() instead of early_initcall().  That should
      satisfy all ordering requirements, and was apparently the reason why
      init_workqueues() was moved to be too early.
      
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4403b406
  10. 24 10月, 2008 5 次提交
    • I
      ftrace: warning in kernel/trace/ftrace.c · f17845e5
      Ingo Molnar 提交于
      this warning:
      
        kernel/trace/ftrace.c:189: warning: ‘frozen_record_count’ defined but not used
      
      triggers because frozen_record_count is only used in the KCONFIG_MARKERS
      case. Move the variable it there.
      
      Alas, this frozen-record facility seems to have little use. The
      frozen_record_count variable is not used by anything, nor the flags.
      
      So this section might need a bit of dead-code-removal care as well.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f17845e5
    • P
      sched: virtual time buddy preemption · 3f3a4904
      Peter Zijlstra 提交于
      Since we moved wakeup preemption back to virtual time, it makes sense to move
      the buddy stuff back as well. The purpose of the buddy scheduling is to allow
      a quickly scheduling pair of tasks to run away from the group as far as a
      regular busy task would be allowed under wakeup preemption.
      
      This has the advantage that the pair can ping-pong for a while, enjoying
      cache-hotness. Without buddy scheduling other tasks would interleave destroying
      the cache.
      
      Also, it saves a word in cfs_rq.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3f3a4904
    • P
      sched: re-instate vruntime based wakeup preemption · 464b7527
      Peter Zijlstra 提交于
      The advantage is that vruntime based wakeup preemption has a better
      conceptual model. Here wakeup_gran = 0 means: preempt when 'fair'.
      Therefore wakeup_gran is the granularity of unfairness we allow in order
      to make progress.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      464b7527
    • M
      sched: weaken sync hint · 0d13033b
      Mike Galbraith 提交于
      Mysql+oltp and pgsql+oltp peaks are still shifted right. The below puts
      the peaks back to 1 client/server pair per core.
      
      Use the avg_overlap information to weaken the sync hint.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d13033b
    • P
      sched: more accurate min_vruntime accounting · 1af5f730
      Peter Zijlstra 提交于
      Mike noticed the current min_vruntime tracking can go wrong and skip the
      current task. If the only remaining task in the tree is a nice 19 task
      with huge vruntime, new tasks will be inserted too far to the right too,
      causing some interactibity issues.
      
      min_vruntime can only change due to the leftmost entry disappearing
      (dequeue_entity()), or by the leftmost entry being incremented past the
      next entry, which elects a new leftmost (__update_curr())
      
      Due to the current entry not being part of the actual tree, we have to
      compare the leftmost tree entry with the current entry, and take the
      leftmost of these two.
      
      So create a update_min_vruntime() function that takes computes the
      leftmost vruntime in the system (either tree of current) and increases
      the cfs_rq->min_vruntime if the computed value is larger than the
      previously found min_vruntime. And call this from the two sites we've
      identified that can change min_vruntime.
      Reported-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1af5f730