1. 24 5月, 2008 1 次提交
    • S
      ftrace: trace irq disabled critical timings · 81d68a96
      Steven Rostedt 提交于
      This patch adds latency tracing for critical timings
      (how long interrupts are disabled for).
      
       "irqsoff" is added to /debugfs/tracing/available_tracers
      
      Note:
        tracing_max_latency
          also holds the max latency for irqsoff (in usecs).
         (default to large number so one must start latency tracing)
      
        tracing_thresh
          threshold (in usecs) to always print out if irqs off
          is detected to be longer than stated here.
          If irq_thresh is non-zero, then max_irq_latency
          is ignored.
      
      Here's an example of a trace with ftrace_enabled = 0
      
      =======
      preemption latency trace v1.1.5 on 2.6.24-rc7
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      --------------------------------------------------------------------
       latency: 100 us, #3/3, CPU#1 | (M:rt VP:0, KP:0, SP:0 HP:0 #P:2)
          -----------------
          | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0)
          -----------------
       => started at: _spin_lock_irqsave+0x2a/0xb7
       => ended at:   _spin_unlock_irqrestore+0x32/0x5f
      
                       _------=> CPU#
                      / _-----=> irqs-off
                     | / _----=> need-resched
                     || / _---=> hardirq/softirq
                     ||| / _--=> preempt-depth
                     |||| /
                     |||||     delay
         cmd     pid ||||| time  |   caller
            \   /    |||||   \   |   /
       swapper-0     1d.s3    0us+: _spin_lock_irqsave+0x2a/0xb7 (e1000_update_stats+0x47/0x64c [e1000])
       swapper-0     1d.s3  100us : _spin_unlock_irqrestore+0x32/0x5f (e1000_update_stats+0x641/0x64c [e1000])
       swapper-0     1d.s3  100us : trace_hardirqs_on_caller+0x75/0x89 (_spin_unlock_irqrestore+0x32/0x5f)
      
      vim:ft=help
      =======
      
      And this is a trace with ftrace_enabled == 1
      
      =======
      preemption latency trace v1.1.5 on 2.6.24-rc7
      --------------------------------------------------------------------
       latency: 102 us, #12/12, CPU#1 | (M:rt VP:0, KP:0, SP:0 HP:0 #P:2)
          -----------------
          | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0)
          -----------------
       => started at: _spin_lock_irqsave+0x2a/0xb7
       => ended at:   _spin_unlock_irqrestore+0x32/0x5f
      
                       _------=> CPU#
                      / _-----=> irqs-off
                     | / _----=> need-resched
                     || / _---=> hardirq/softirq
                     ||| / _--=> preempt-depth
                     |||| /
                     |||||     delay
         cmd     pid ||||| time  |   caller
            \   /    |||||   \   |   /
       swapper-0     1dNs3    0us+: _spin_lock_irqsave+0x2a/0xb7 (e1000_update_stats+0x47/0x64c [e1000])
       swapper-0     1dNs3   46us : e1000_read_phy_reg+0x16/0x225 [e1000] (e1000_update_stats+0x5e2/0x64c [e1000])
       swapper-0     1dNs3   46us : e1000_swfw_sync_acquire+0x10/0x99 [e1000] (e1000_read_phy_reg+0x49/0x225 [e1000])
       swapper-0     1dNs3   46us : e1000_get_hw_eeprom_semaphore+0x12/0xa6 [e1000] (e1000_swfw_sync_acquire+0x36/0x99 [e1000])
       swapper-0     1dNs3   47us : __const_udelay+0x9/0x47 (e1000_read_phy_reg+0x116/0x225 [e1000])
       swapper-0     1dNs3   47us+: __delay+0x9/0x50 (__const_udelay+0x45/0x47)
       swapper-0     1dNs3   97us : preempt_schedule+0xc/0x84 (__delay+0x4e/0x50)
       swapper-0     1dNs3   98us : e1000_swfw_sync_release+0xc/0x55 [e1000] (e1000_read_phy_reg+0x211/0x225 [e1000])
       swapper-0     1dNs3   99us+: e1000_put_hw_eeprom_semaphore+0x9/0x35 [e1000] (e1000_swfw_sync_release+0x50/0x55 [e1000])
       swapper-0     1dNs3  101us : _spin_unlock_irqrestore+0xe/0x5f (e1000_update_stats+0x641/0x64c [e1000])
       swapper-0     1dNs3  102us : _spin_unlock_irqrestore+0x32/0x5f (e1000_update_stats+0x641/0x64c [e1000])
       swapper-0     1dNs3  102us : trace_hardirqs_on_caller+0x75/0x89 (_spin_unlock_irqrestore+0x32/0x5f)
      
      vim:ft=help
      =======
      Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      81d68a96
  2. 30 4月, 2008 3 次提交
  3. 29 4月, 2008 1 次提交
  4. 16 4月, 2008 1 次提交
  5. 25 3月, 2008 1 次提交
  6. 26 2月, 2008 1 次提交
  7. 09 2月, 2008 3 次提交
  8. 07 2月, 2008 1 次提交
  9. 01 2月, 2008 1 次提交
  10. 30 1月, 2008 1 次提交
  11. 27 1月, 2008 1 次提交
  12. 26 1月, 2008 4 次提交
  13. 29 12月, 2007 1 次提交
    • D
      [SERIAL]: Fix section mismatches in Sun serial console drivers. · fb445ee5
      David S. Miller 提交于
      We're exporting an __init function, oops :-)
      
      The core issue here is that add_preferred_console() is marked
      as __init, this makes it impossible to invoke this thing from
      a driver probe routine which is what the Sparc serial drivers
      need to do.
      
      There is no harm in dropping the __init marker.  This code will
      actually work properly when invoked from a modular driver,
      except that init will probably not pick up the console change
      without some other support code.
      
      Then we can drop the __init from sunserial_console_match()
      and we're no longer exporting an __init function to modules.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb445ee5
  14. 19 10月, 2007 1 次提交
    • A
      serial: turn serial console suspend a boot rather than compile time option · 8f4ce8c3
      Andres Salomon 提交于
      Currently, there's a CONFIG_DISABLE_CONSOLE_SUSPEND that allows one to stop
      the serial console from being suspended when the rest of the machine goes
      to sleep.  This is incredibly useful for debugging power management-related
      things; however, having it as a compile-time option has proved to be
      incredibly inconvenient for us (OLPC).  There are plenty of times that we
      want serial console to not suspend, but for the most part we'd like serial
      console to be suspended.
      
      This drops CONFIG_DISABLE_CONSOLE_SUSPEND, and replaces it with a kernel
      boot parameter (no_console_suspend).  By default, the serial console will
      be suspended along with the rest of the system; by passing
      'no_console_suspend' to the kernel during boot, serial console will remain
      alive during suspend.
      
      For now, this is pretty serial console specific; further fixes could be
      applied to make this work for things like netconsole.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Acked-by: N"Rafael J. Wysocki" <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Nigel Cunningham <nigel@suspend2.net>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8f4ce8c3
  15. 17 10月, 2007 2 次提交
  16. 22 8月, 2007 1 次提交
  17. 21 8月, 2007 1 次提交
  18. 04 8月, 2007 1 次提交
  19. 17 7月, 2007 5 次提交
    • J
      kernel/printk.c: document possible deadlock against scheduler · 1492192b
      Jiri Kosina 提交于
      kernel/printk.c: document possible deadlock against scheduler
      
      The printk's comment states that it can be called from every context,
      which might lead to false illusion that it could be called from everywhere
      without any restrictions.
      
      This is however not true - a call to printk() could deadlock if called from
      scheduler code (namely from schedule(), wake_up(), etc) on runqueue lock
      when it tries to wake up klogd. Document this.
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1492192b
    • R
      add printk.time option, deprecate 'time' · e84845c4
      Randy Dunlap 提交于
      Allow printk_time to be enabled or disabled at boot time.  Previously it
      could be enabled only, but not disabled.
      
      Change printk_time from an int to a bool since that's what it is.  Make its
      logical (exposed) name just be "time" (was "printk_time").
      
      Note: Changes kernel boot option syntax from "time" to "printk.time=value".
      
      Since printk_time is declared as a module_param, it can also be
      changed at run-time by modifying
        /sys/module/printk/parameters/time
      to a value of 1/Y/y to enabled it or 0/N/n to disable it.
      
      Since printk_time is declared as a module_param, its value can also
      be set at boot-time by using
        linux printk.time=<bool>
      
      If the "time" boot option is used, print a message that it is deprecated
      and will be removed.
      
      Note its planned removal in feature-removal-schedule.txt.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e84845c4
    • Y
      serial: convert early_uart to earlycon for 8250 · 18a8bd94
      Yinghai Lu 提交于
      Beacuse SERIAL_PORT_DFNS is removed from include/asm-i386/serial.h and
      include/asm-x86_64/serial.h.  the serial8250_ports need to be probed late in
      serial initializing stage.  the console_init=>serial8250_console_init=>
      register_console=>serial8250_console_setup will return -ENDEV, and console
      ttyS0 can not be enabled at that time.  need to wait till uart_add_one_port in
      drivers/serial/serial_core.c to call register_console to get console ttyS0.
      that is too late.
      
      Make early_uart to use early_param, so uart console can be used earlier.  Make
      it to be bootconsole with CON_BOOT flag, so can use console handover feature.
      and it will switch to corresponding normal serial console automatically.
      
      new command line will be:
      	console=uart8250,io,0x3f8,9600n8
      	console=uart8250,mmio,0xff5e0000,115200n8
      or
      	earlycon=uart8250,io,0x3f8,9600n8
      	earlycon=uart8250,mmio,0xff5e0000,115200n8
      
      it will print in very early stage:
      	Early serial console at I/O port 0x3f8 (options '9600n8')
      	console [uart0] enabled
      later for console it will print:
      	console handover: boot [uart0] -> real [ttyS0]
      
      Signed-off-by: <yinghai.lu@sun.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Gerd Hoffmann <kraxel@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18a8bd94
    • Y
      console: console handover to preferred console · d37bf60d
      Yinghai Lu 提交于
      for earlyprintk=ttyS0,9600 console=tty0 console=ttyS0,9600n8
      
      the handover will happen from earlyser0 to tty0.  but what we want is to
      hand over to ttyS0.
      
      Later with serial-convert-early_uart-to-earlycon-for-8250.patch,
      
      	console=tty0 console=uart8250,io,0x3f8,9600n8
      
      will handover to ttyS0 instead of tty0.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Gerd Hoffmann <kraxel@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d37bf60d
    • Y
      console: more buf for index parsing · eaa944af
      Yinghai Lu 提交于
      Change name to buf according to the usage as name + index
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Gerd Hoffmann <kraxel@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eaa944af
  20. 09 5月, 2007 2 次提交
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
    • G
      Fixes and cleanups for earlyprintk aka boot console · 69331af7
      Gerd Hoffmann 提交于
      The console subsystem already has an idea of a boot console, using the
      CON_BOOT flag.  The implementation has some flaws though.  The major
      problem is that presence of a boot console makes register_console() ignore
      any other console devices (unless explicitly specified on the kernel
      command line).
      
      This patch fixes the console selection code to *not* consider a boot
      console a full-featured one, so the first non-boot console registering will
      become the default console instead.  This way the unregister call for the
      boot console in the register_console() function actually triggers and the
      handover from the boot console to the real console device works smoothly.
      Added a printk for the handover, so you know which console device the
      output goes to when the boot console stops printing messages.
      
      The disable_early_printk() call is obsolete with that patch, explicitly
      disabling the early console isn't needed any more as it works automagically
      with that patch.
      
      I've walked through the tree, dropped all disable_early_printk() instances
      found below arch/ and tagged the consoles with CON_BOOT if needed.  The
      code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).
      
      Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
      Ralf, fixed "udbg-immortal" cmd line arg on powerpc.
      Signed-off-by: NGerd Hoffmann <kraxel@exsuse.de>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      69331af7
  21. 18 2月, 2007 1 次提交
  22. 12 2月, 2007 3 次提交
  23. 23 12月, 2006 1 次提交
  24. 08 12月, 2006 2 次提交