1. 19 10月, 2007 5 次提交
    • M
      powerpc: add scaled time accounting · 4603ac18
      Michael Neuling 提交于
      This adds POWERPC specific hooks for scaled time accounting.
      
      POWER6 includes a SPURR register.  The SPURR is based off the PURR register
      but is scaled based on CPU frequency and issue rates.  This gives a more
      accurate account of the instructions used per task.  The PURR and timebase
      will be constant relative to the wall clock, irrespective of the CPU
      frequency.
      
      This implementation reads the SPURR register in account_system_vtime which
      is only call called on context witch and hard and soft irq entry and exit.
      The percentage of user and system time is then estimated using the ratio of
      these accounted by the PURR.  If the SPURR is not present, the PURR read.
      
      An earlier implementation of this patch read the SPURR whenever the PURR
      was read, which included the system call entry and exit path.
      Unfortunately this showed a performance regression on lmbench runs, so was
      re-implemented.
      
      I've included the lmbench results here when run bare metal on POWER6.  1st
      column is the unpatch results.  2nd column is the results using the below
      patch and the 3rd is the % diff of these results from the base.  4th and
      5th columns are the results and % differnce from the base using the older
      patch (SPURR read in syscall entry/exit path).
      
                                    Base        Scaled-Acct     SPURR-in-syscall
                                   Result      Result  % diff    Result % diff
      Simple syscall:              0.3086      0.3086  0.0000    0.3452 11.8600
      Simple read:                 0.4591      0.4671  1.7425    0.5044 9.86713
      Simple write:                0.4364      0.4366  0.0458    0.4731 8.40971
      Simple stat:                 2.0055      2.0295  1.1967    2.0669 3.06158
      Simple fstat:                0.5962      0.5876  -1.442    0.6368 6.80979
      Simple open/close:           3.1283      3.1009  -0.875    3.2088 2.57328
      Select on 10 fd's:           0.8554      0.8457  -1.133    0.8667 1.32101
      Select on 100 fd's:          3.5292      3.6329  2.9383    3.6664 3.88756
      Select on 250 fd's:          7.9097      8.1881  3.5197    8.2242 3.97613
      Select on 500 fd's:          15.2659     15.836  3.7357    15.873 3.97814
      Select on 10 tcp fd's:       0.9576      0.9416  -1.670    0.9752 1.83792
      Select on 100 tcp fd's:      7.248       7.2254  -0.311    7.2685 0.28283
      Select on 250 tcp fd's:      17.7742     17.707  -0.375    17.749 -0.1406
      Select on 500 tcp fd's:      35.4258     35.25   -0.496    35.286 -0.3929
      Signal handler installation: 0.6131      0.6075  -0.913    0.647  5.52927
      Signal handler overhead:     2.0919      2.1078  0.7600    2.1831 4.35967
      Protection fault:            0.7345      0.7478  1.8107    0.8031 9.33968
      Pipe latency:                33.006      16.398  -50.31    33.475 1.42368
      AF_UNIX sock stream latency: 14.5093     30.910  113.03    30.715 111.692
      Process fork+exit:           219.8       222.8   1.3648    229.37 4.35623
      Process fork+execve:         876.14      873.28  -0.32     868.66 -0.8533
      Process fork+/bin/sh -c:     2830        2876.5  1.6431    2958   4.52296
      File /var/tmp/XXX write bw:  1193497     1195536 0.1708    118657 -0.5799
      Pagefaults on /var/tmp/XXX:  3.1272      3.2117  2.7020    3.2521 3.99398
      
      Also, kernel compile times show no difference with this patch applied.
      
      [pbadari@us.ibm.com: Avoid unnecessary PURR reading]
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4603ac18
    • 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
    • R
      PM: Rework struct platform_suspend_ops · e6c5eb95
      Rafael J. Wysocki 提交于
      There is no reason why the .prepare() and .finish() methods in 'struct
      platform_suspend_ops' should take any arguments, since architectures don't use
      these methods' argument in any practically meaningful way (ie.  either the
      target system sleep state is conveyed to the platform by .set_target(), or
      there is only one suspend state supported and it is indicated to the PM core
      by .valid(), or .prepare() and .finish() aren't defined at all).   There also
      is no reason why .finish() should return any result.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e6c5eb95
    • R
      PM: Rename struct pm_ops and related things · 26398a70
      Rafael J. Wysocki 提交于
      The name of 'struct pm_ops' suggests that it is related to the power
      management in general, but in fact it is only related to suspend.   Moreover,
      its name should indicate what this structure is used for, so it seems
      reasonable to change it to 'struct platform_suspend_ops'.   In that case, the
      name of the global variable of this type used by the PM core and the names of
      related functions should be changed accordingly.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      26398a70
    • R
      PM: Move definition of struct pm_ops to suspend.h · 95d9ffbe
      Rafael J. Wysocki 提交于
      Move the definition of 'struct pm_ops' and related functions from <linux/pm.h>
      to <linux/suspend.h> .
      
      There are, at least, the following reasons to do that:
      * 'struct pm_ops' is specifically related to suspend and not to the power
        management in general.
      * As long as 'struct pm_ops' is defined in <linux/pm.h>, any modification of it
        causes the entire kernel to be recompiled, which is unnecessary and annoying.
      * Some suspend-related features are already defined in <linux/suspend.h>, so it
        is logical to move the definition of 'struct pm_ops' into there.
      * 'struct hibernation_ops', being the hibernation-related counterpart of
        'struct pm_ops', is defined in <linux/suspend.h> .
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      95d9ffbe
  2. 17 10月, 2007 35 次提交