1. 11 11月, 2008 1 次提交
  2. 18 10月, 2008 1 次提交
  3. 17 10月, 2008 2 次提交
  4. 03 10月, 2008 1 次提交
  5. 02 10月, 2008 1 次提交
  6. 07 9月, 2008 1 次提交
  7. 27 7月, 2008 1 次提交
  8. 19 7月, 2008 1 次提交
    • T
      nohz: prevent tick stop outside of the idle loop · b8f8c3cf
      Thomas Gleixner 提交于
      Jack Ren and Eric Miao tracked down the following long standing
      problem in the NOHZ code:
      
      	scheduler switch to idle task
      	enable interrupts
      
      Window starts here
      
      	----> interrupt happens (does not set NEED_RESCHED)
      	      	irq_exit() stops the tick
      
      	----> interrupt happens (does set NEED_RESCHED)
      
      	return from schedule()
      	
      	cpu_idle(): preempt_disable();
      
      Window ends here
      
      The interrupts can happen at any point inside the race window. The
      first interrupt stops the tick, the second one causes the scheduler to
      rerun and switch away from idle again and we end up with the tick
      disabled.
      
      The fact that it needs two interrupts where the first one does not set
      NEED_RESCHED and the second one does made the bug obscure and extremly
      hard to reproduce and analyse. Kudos to Jack and Eric.
      
      Solution: Limit the NOHZ functionality to the idle loop to make sure
      that we can not run into such a situation ever again.
      
      cpu_idle()
      {
      	preempt_disable();
      
      	while(1) {
      		 tick_nohz_stop_sched_tick(1); <- tell NOHZ code that we
      		 			          are in the idle loop
      
      		 while (!need_resched())
      		       halt();
      
      		 tick_nohz_restart_sched_tick(); <- disables NOHZ mode
      		 preempt_enable_no_resched();
      		 schedule();
      		 preempt_disable();
      	}
      }
      
      In hindsight we should have done this forever, but ... 
      
      /me grabs a large brown paperbag.
      
      Debugged-by: Jack Ren <jack.ren@marvell.com>, 
      Debugged-by: Neric miao <eric.y.miao@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      b8f8c3cf
  9. 26 6月, 2008 2 次提交
  10. 24 6月, 2008 1 次提交
    • R
      sched: add new API sched_setscheduler_nocheck: add a flag to control access checks · 961ccddd
      Rusty Russell 提交于
      Hidehiro Kawai noticed that sched_setscheduler() can fail in
      stop_machine: it calls sched_setscheduler() from insmod, which can
      have CAP_SYS_MODULE without CAP_SYS_NICE.
      
      Two cases could have failed, so are changed to sched_setscheduler_nocheck:
        kernel/softirq.c:cpu_callback()
      	- CPU hotplug callback
        kernel/stop_machine.c:__stop_machine_run()
      	- Called from various places, including modprobe()
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-mm@kvack.org
      Cc: sugita <yumiko.sugita.yf@hitachi.com>
      Cc: Satoshi OSHIMA <satoshi.oshima.fk@hitachi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      961ccddd
  11. 20 6月, 2008 1 次提交
    • J
      softirq: remove irqs_disabled warning from local_bh_enable · 0f476b6d
      Johannes Berg 提交于
      There's no need to use local_irq_save() over local_irq_disable() in the
      local_bh_enable code since it is a bug to call it with irqs disabled and
      do_softirq will enable irqs if there is any pending work.
      
      Consolidate the code from local_bh_enable and ..._ip to avoid having a
      disconnect between them in the warnings they trigger that is currently
      there.
      
      Also always trigger the warning on in_irq(), not just in the
      trace-irqflags case.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Michael Buesch <mb@bu3sch.de>
      Cc: David Ellingsworth <david@identd.dyndns.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0f476b6d
  12. 18 6月, 2008 1 次提交
  13. 25 5月, 2008 1 次提交
    • C
      Remove argument from open_softirq which is always NULL · 962cf36c
      Carlos R. Mafra 提交于
      As git-grep shows, open_softirq() is always called with the last argument
      being NULL
      
      block/blk-core.c:       open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL);
      kernel/hrtimer.c:       open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq, NULL);
      kernel/rcuclassic.c:    open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL);
      kernel/rcupreempt.c:    open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL);
      kernel/sched.c: open_softirq(SCHED_SOFTIRQ, run_rebalance_domains, NULL);
      kernel/softirq.c:       open_softirq(TASKLET_SOFTIRQ, tasklet_action, NULL);
      kernel/softirq.c:       open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL);
      kernel/timer.c: open_softirq(TIMER_SOFTIRQ, run_timer_softirq, NULL);
      net/core/dev.c: open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL);
      net/core/dev.c: open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL);
      
      This observation has already been made by Matthew Wilcox in June 2002
      (http://www.cs.helsinki.fi/linux/linux-kernel/2002-25/0687.html)
      
      "I notice that none of the current softirq routines use the data element
      passed to them."
      
      and the situation hasn't changed since them. So it appears we can safely
      remove that extra argument to save 128 (54) bytes of kernel data (text).
      Signed-off-by: NCarlos R. Mafra <crmafra@ift.unesp.br>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      962cf36c
  14. 01 5月, 2008 1 次提交
    • C
      Fix cpu hotplug problem in softirq code · e5e41723
      Christian Borntraeger 提交于
      currently cpu hotplug (unplug) seems broken on s390 and likely others. On cpu
      unplug the system starts to behave very strange and hangs.
      
      I bisected the problem to the following commit:
      
      commit 48f20a9a
      Author: Olof Johansson <olof@lixom.net>
      Date: Tue Mar 4 15:23:25 2008 -0800
      	tasklets: execute tasklets in the same order they were queued
      
      Reverting this patch seems to fix the problem.  I looked into takeover_tasklet
      and it seems that there is a way to corrupt the tail pointer of the current
      cpu.  If the tasklet list of the frozen cpu is empty, the tail pointer of the
      current cpu points to the address of the head pointer of the stopped cpu and
      not to the next pointer of a tasklet_struct.
      
      This patch avoids the list splice of the list is empty and cpu hotplug seems
      to work as the tail pointer is not corrupted.  Olof, can you look into that
      patch and ACK/NACK it so Andrew can push this to Linus, if appropriate?
      Please note that some lines are longer than 80 chars, but line-wrapping looked
      worse that this version.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e5e41723
  15. 20 4月, 2008 1 次提交
  16. 01 3月, 2008 1 次提交
  17. 09 2月, 2008 1 次提交
  18. 30 1月, 2008 2 次提交
  19. 11 10月, 2007 2 次提交
  20. 18 7月, 2007 1 次提交
    • R
      Freezer: make kernel threads nonfreezable by default · 83144186
      Rafael J. Wysocki 提交于
      Currently, the freezer treats all tasks as freezable, except for the kernel
      threads that explicitly set the PF_NOFREEZE flag for themselves.  This
      approach is problematic, since it requires every kernel thread to either
      set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
      care for the freezing of tasks at all.
      
      It seems better to only require the kernel threads that want to or need to
      be frozen to use some freezer-related code and to remove any
      freezer-related code from the other (nonfreezable) kernel threads, which is
      done in this patch.
      
      The patch causes all kernel threads to be nonfreezable by default (ie.  to
      have PF_NOFREEZE set by default) and introduces the set_freezable()
      function that should be called by the freezable kernel threads in order to
      unset PF_NOFREEZE.  It also makes all of the currently freezable kernel
      threads call set_freezable(), so it shouldn't cause any (intentional)
      change of behaviour to appear.  Additionally, it updates documentation to
      describe the freezing of tasks more accurately.
      
      [akpm@linux-foundation.org: build fixes]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NNigel Cunningham <nigel@nigel.suspend2.net>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      83144186
  21. 17 7月, 2007 1 次提交
  22. 10 7月, 2007 1 次提交
  23. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  24. 17 2月, 2007 2 次提交
  25. 08 12月, 2006 1 次提交
    • Z
      [PATCH] softirq: remove BUG_ONs which can incorrectly trigger · 3908fd2e
      Zachary Amsden 提交于
      It is possible to have tasklets get scheduled before softirqd has had a chance
      to spawn on all CPUs.  This is totally harmless; after success during action
      CPU_UP_PREPARE, action CPU_ONLINE will be called, which immediately wakes
      softirqd on the appropriate CPU to process the already pending tasklets.  So
      there is no danger of having a missed wakeup for any tasklets that were
      already pending.
      
      In particular, i386 is affected by this during startup, and is visible when
      using a very large initrd; during the time it takes for the initrd to be
      decompressed, a timer IRQ can come in and schedule RCU callbacks.  It is also
      possible that resending of a hardware IRQ via a softirq triggers the same bug.
      
      Because of different timing conditions, this shows up in all emulators and
      virtual machines tested, including Xen, VMware, Virtual PC, and Qemu.  It is
      also possible to trigger on native hardware with a large enough initrd,
      although I don't have a reliable case demonstrating that.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Cc: <caglar@pardus.org.tr>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3908fd2e
  26. 30 9月, 2006 1 次提交
  27. 01 8月, 2006 2 次提交
    • T
      [PATCH] Reducing local_bh_enable/disable overhead in irqtrace · 3c829c36
      Tim Chen 提交于
      The recent changes from irqtrace feature has added overheads to
      local_bh_disable and local_bh_enable that reduces UDP performance across
      x86_64 and IA64, even though IA64 does not support the irqtrace feature.
      Patch in question is
      
      [PATCH]lockdep: irqtrace subsystem, core
      http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=c
      ommit;h=de30a2b3
      
      Prior to this patch, local_bh_disable was a short macro.  Now it is a
      function which calls __local_bh_disable with added irq flags save and
      restore.  The irq flags save and restore were also added to
      local_bh_enable, probably for injecting the trace irqs code.
      
      This overhead is on the generic code path across all architectures.  On a
      IA_64 test machine (Itanium-2 1.6 GHz) running a benchmark like netperf's
      UDP streaming test, the added overhead results in a drop of 3% in
      throughput, as udp_sendmsg calls the local_bh_enable/disable several times.
      
      Other workloads that have heavy usages of local_bh_enable/disable could
      also be affected.  The patch ideally should not have affected IA-64
      performance as it does not have IRQ tracing support.  A significant portion
      of the overhead is in the added irq flags save and restore, which I think
      is not needed if IRQ tracing is unused.  A suggested patch is attached
      below that recovers the lost performance.  However, the "ifdef"s in the
      patch are a bit ugly.
      Signed-off-by: NTim Chen <tim.c.chen@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3c829c36
    • C
      [PATCH] cpu hotplug: replace __devinit* with __cpuinit* for cpu notifications · 8c78f307
      Chandra Seetharaman 提交于
      Few of the callback functions and notifier blocks that are associated with cpu
      notifications incorrectly have __devinit and __devinitdata.  They should be
      __cpuinit and __cpuinitdata instead.
      
      It makes no functional difference but wastes text area when CONFIG_HOTPLUG is
      enabled and CONFIG_HOTPLUG_CPU is not.
      
      This patch fixes all those instances.
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8c78f307
  28. 15 7月, 2006 1 次提交
  29. 11 7月, 2006 1 次提交
  30. 04 7月, 2006 2 次提交
  31. 28 6月, 2006 2 次提交
  32. 26 6月, 2006 1 次提交