1. 06 Oct, 2006 1 commit
  2. 05 Oct, 2006 1 commit
    • David Howells's avatar
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells authored
      
      
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  3. 01 Oct, 2006 1 commit
    • Peter Zijlstra's avatar
      [PATCH] sysrq: disable lockdep on reboot · b2e9c7d0
      Peter Zijlstra authored
      
      
      SysRq : Emergency Sync
      Emergency Sync complete
      SysRq : Emergency Remount R/O
      Emergency Remount complete
      SysRq : Resetting
      BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
      
      Call Trace:
       [<ffffffff8026d56d>] show_trace+0xae/0x319
       [<ffffffff8026d7ed>] dump_stack+0x15/0x17
       [<ffffffff802a68d1>] trace_hardirqs_on+0xbc/0x13d
       [<ffffffff803a8eec>] sysrq_handle_reboot+0x9/0x11
       [<ffffffff803a8f8d>] __handle_sysrq+0x99/0x130
       [<ffffffff803a903b>] handle_sysrq+0x17/0x19
       [<ffffffff803a36ee>] kbd_event+0x32e/0x57d
       [<ffffffff80401e35>] input_event+0x42d/0x45b
       [<ffffffff804063eb>] atkbd_interrupt+0x44d/0x53d
       [<ffffffff803fe5c5>] serio_interrupt+0x49/0x86
       [<ffffffff803ff2a4>] i8042_interrupt+0x202/0x21a
       [<ffffffff80210cf0>] handle_IRQ_event+0x2c/0x64
       [<ffffffff802bfd8b>] __do_IRQ+0xaf/0x114
       [<ffffffff8026ea24>] do_IRQ+0xf8/0x107
       [<ffffffff8025f886>] ret_from_intr+0x0/0xf
      DWARF2 unwinder stuck at ret_from_intr+0x0/0xf
      Leftover inexact backtrace:
       <IRQ> <EOI> [<ffffffff80258e36>] mwait_idle+0x3f/0x54
       [<ffffffff8024a33a>] cpu_idle+0xa2/0xc5
       [<ffffffff8026c34e>] rest_init+0x2b/0x2d
       [<ffffffff809708bc>] start_kernel+0x24a/0x24c
       [<ffffffff8097028b>] _sinittext+0x28b/0x292
      
      Since we're shutting down anyway, don't bother being smart,
      just turn the thing off.
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b2e9c7d0
  4. 29 Sep, 2006 1 commit
    • Sukadev Bhattiprolu's avatar
      [PATCH] pidspace: is_init() · f400e198
      Sukadev Bhattiprolu authored
      This is an updated version of Eric Biederman's is_init() patch.
      (http://lkml.org/lkml/2006/2/6/280
      
      ).  It applies cleanly to 2.6.18-rc3 and
      replaces a few more instances of ->pid == 1 with is_init().
      
      Further, is_init() checks pid and thus removes dependency on Eric's other
      patches for now.
      
      Eric's original description:
      
      	There are a lot of places in the kernel where we test for init
      	because we give it special properties.  Most  significantly init
      	must not die.  This results in code all over the kernel test
      	->pid == 1.
      
      	Introduce is_init to capture this case.
      
      	With multiple pid spaces for all of the cases affected we are
      	looking for only the first process on the system, not some other
      	process that has pid == 1.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@us.ibm.com>
      Cc: Dave Hansen <haveblue@us.ibm.com>
      Cc: Serge Hallyn <serue@us.ibm.com>
      Cc: Cedric Le Goater <clg@fr.ibm.com>
      Cc: <lxc-devel@lists.sourceforge.net>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f400e198
  5. 03 Jul, 2006 2 commits
  6. 30 Jun, 2006 1 commit
  7. 25 Mar, 2006 1 commit
  8. 20 Feb, 2006 1 commit
    • Christoph Lameter's avatar
      [PATCH] Terminate process that fails on a constrained allocation · 9b0f8b04
      Christoph Lameter authored
      
      
      Some allocations are restricted to a limited set of nodes (due to memory
      policies or cpuset constraints).  If the page allocator is not able to find
      enough memory then that does not mean that overall system memory is low.
      
      In particular going postal and more or less randomly shooting at processes
      is not likely going to help the situation but may just lead to suicide (the
      whole system coming down).
      
      It is better to signal to the process that no memory exists given the
      constraints that the process (or the configuration of the process) has
      placed on the allocation behavior.  The process may be killed but then the
      sysadmin or developer can investigate the situation.  The solution is
      similar to what we do when running out of hugepages.
      
      This patch adds a check before we kill processes.  At that point
      performance considerations do not matter much so we just scan the zonelist
      and reconstruct a list of nodes.  If the list of nodes does not contain all
      online nodes then this is a constrained allocation and we should kill the
      current process.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9b0f8b04
  9. 09 Jan, 2006 1 commit
  10. 09 Nov, 2005 1 commit
  11. 26 Jul, 2005 1 commit
  12. 07 Jul, 2005 1 commit
  13. 25 Jun, 2005 2 commits
  14. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4