1. 09 12月, 2010 1 次提交
  2. 02 9月, 2010 4 次提交
    • P
      powerpc/pseries: Re-enable dispatch trace log userspace interface · 872e439a
      Paul Mackerras 提交于
      Since the cpu accounting code uses the hypervisor dispatch trace log
      now when CONFIG_VIRT_CPU_ACCOUNTING = y, the previous commit disabled
      access to it via files in the /sys/kernel/debug/powerpc/dtl/ directory
      in that case.  This restores those files.
      
      To do this, we now have a hook that the cpu accounting code will call
      as it processes each entry from the hypervisor dispatch trace log.
      The code in dtl.c now uses that to fill up its ring buffer, rather
      than having the hypervisor fill the ring buffer directly.
      
      This also fixes dtl_file_read() to handle overflow conditions a bit
      better and adds a spinlock to ensure that race conditions (multiple
      processes opening or reading the file concurrently) are handled
      correctly.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      872e439a
    • P
      powerpc: Account time using timebase rather than PURR · cf9efce0
      Paul Mackerras 提交于
      Currently, when CONFIG_VIRT_CPU_ACCOUNTING is enabled, we use the
      PURR register for measuring the user and system time used by
      processes, as well as other related times such as hardirq and
      softirq times.  This turns out to be quite confusing for users
      because it means that a program will often be measured as taking
      less time when run on a multi-threaded processor (SMT2 or SMT4 mode)
      than it does when run on a single-threaded processor (ST mode), even
      though the program takes longer to finish.  The discrepancy is
      accounted for as stolen time, which is also confusing, particularly
      when there are no other partitions running.
      
      This changes the accounting to use the timebase instead, meaning that
      the reported user and system times are the actual number of real-time
      seconds that the program was executing on the processor thread,
      regardless of which SMT mode the processor is in.  Thus a program will
      generally show greater user and system times when run on a
      multi-threaded processor than on a single-threaded processor.
      
      On pSeries systems on POWER5 or later processors, we measure the
      stolen time (time when this partition wasn't running) using the
      hypervisor dispatch trace log.  We check for new entries in the
      log on every entry from user mode and on every transition from
      kernel process context to soft or hard IRQ context (i.e. when
      account_system_vtime() gets called).  So that we can correctly
      distinguish time stolen from user time and time stolen from system
      time, without having to check the log on every exit to user mode,
      we store separate timestamps for exit to user mode and entry from
      user mode.
      
      On systems that have a SPURR (POWER6 and POWER7), we read the SPURR
      in account_system_vtime() (as before), and then apportion the SPURR
      ticks since the last time we read it between scaled user time and
      scaled system time according to the relative proportions of user
      time and system time over the same interval.  This avoids having to
      read the SPURR on every kernel entry and exit.  On systems that have
      PURR but not SPURR (i.e., POWER5), we do the same using the PURR
      rather than the SPURR.
      
      This disables the DTL user interface in /sys/debug/kernel/powerpc/dtl
      for now since it conflicts with the use of the dispatch trace log
      by the time accounting code.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      cf9efce0
    • P
      powerpc: Dynamically allocate most lppaca structs · 93c22703
      Paul Mackerras 提交于
      This arranges for the lppaca structs for most cpus to be dynamically
      allocated in the same manner as the paca structs.  If we don't include
      support for legacy iSeries, only the first lppaca is statically
      allocated; the rest are dynamically allocated.  If we include legacy
      iSeries support, then we statically allocate the first 64 lppaca
      structs, since the iSeries hypervisor requires that the lppaca
      structs be present in the data section of the kernel image, but
      legacy iSeries supports at most 64 cpus.
      
      With CONFIG_NR_CPUS, the kernel image size for a typical pSeries config
      went from:
      
         text    data     bss     dec     hex filename
      9524478 4734564 8469944 22728986        15ad11a ../test-1024/vmlinux
      
      to:
      
         text    data     bss     dec     hex filename
      9524482 3751508 8469944 21745934        14bd10e ../test-1024/vmlinux
      
      a reduction of 983052 bytes overall.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      93c22703
    • P
      powerpc: Abstract indexing of lppaca structs · 8154c5d2
      Paul Mackerras 提交于
      Currently we have the lppaca structs as a simple array of NR_CPUS
      entries, taking up space in the data section of the kernel image.
      In future we would like to allocate them dynamically, so this
      abstracts out the accesses to the array, making it easier to
      change how we locate the lppaca for a given cpu in future.
      Specifically, lppaca[cpu] changes to lppaca_of(cpu).
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8154c5d2
  3. 24 11月, 2009 1 次提交
  4. 09 6月, 2009 1 次提交
  5. 07 4月, 2009 1 次提交
  6. 24 3月, 2009 2 次提交
  7. 05 11月, 2008 1 次提交
  8. 04 8月, 2008 1 次提交
  9. 25 7月, 2008 1 次提交
  10. 14 6月, 2007 1 次提交
    • J
      [POWERPC] Donate idle CPU cycles on dedicated partitions · d8c391a5
      Jake Moilanen 提交于
      A Power6 can give up CPU cycles on a dedicated CPU (as opposed to a
      shared CPU) to other shared processors if the administrator asks for it
      (via the HMC).
      
      This enables that to work properly on P6.
      
      This just involves setting a bit in the CAS structure as well as the
      VPA.  To donate cycles, a CPU has to have all SMT threads idle and
      have the donate bit set in the VPA.  Then call H_CEDE.
      
      The reason why shared processors just aren't used is because dedicated
      CPUs are guaranteed an actual processor, yet the system is still able to
      increase the capacity of the shared CPU pool.
      
      Also rename the VPA's cpuctls_task_attrs field to a more accurate name.
      Signed-off-by: NJake Moilanen <moilanen@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d8c391a5
  11. 08 8月, 2006 2 次提交
  12. 18 1月, 2006 1 次提交
    • B
      [PATCH] Fix sparse parse error in lppaca.h · c6b3feaf
      Bryan O'Sullivan 提交于
      sparse can't parse a struct definition in include/asm-powerpc/lppaca.h,
      even though gcc can accept it.  The form looks like this:
      
              struct __attribute__((whatever)) foo { };
      
      An equivalent that both gcc and sparse can handle is
      
              struct foo { } __attribute__((whatever));
      
      This is the only definition of this type in the tree, and fixing it is
      easier than fixing sparse.
      Signed-off-by: NBryan O'Sullivan <bos@serpentine.com>
      [ Side note: fixing sparse wouldn't be hard, but the "attribute at the
        end" version is the canonical one, and the one that makes sense. So
        let's just fix the kernel instead. Luc Van Oostenryck already sent
        out a sparse patch to the sparse mailing list in case anybody cares.
                     -- Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c6b3feaf
  13. 13 1月, 2006 1 次提交
    • D
      [PATCH] powerpc: Remove lppaca structure from the PACA · 3356bb9f
      David Gibson 提交于
      At present the lppaca - the structure shared with the iSeries
      hypervisor and phyp - is contained within the PACA, our own low-level
      per-cpu structure.  This doesn't have to be so, the patch below
      removes it, making a separate array of lppaca structures.
      
      This saves approximately 500*NR_CPUS bytes of image size and kernel
      memory, because we don't need aligning gap between the Linux and
      hypervisor portions of every PACA.  On the other hand it means an
      extra level of dereference in many accesses to the lppaca.
      
      The patch also gets rid of several places where we assign the paca
      address to a local variable for no particular reason.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3356bb9f
  14. 09 1月, 2006 1 次提交
  15. 10 11月, 2005 1 次提交
    • D
      [PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc · 8882a4da
      David Gibson 提交于
      This patch moves a bunch of files from arch/ppc64 and
      include/asm-ppc64 which have no equivalents in ppc32 code into
      arch/powerpc and include/asm-powerpc.  The file affected are:
      	abs_addr.h
      	compat.h
      	lppaca.h
      	paca.h
      	tce.h
      	cpu_setup_power4.S
      	ioctl32.c
      	firmware.c
      	pacaData.c
      
      The only changes apart from the move and corresponding Makefile
      changes are:
      	- #ifndef/#define in includes updated to _ASM_POWERPC_ form
      	- trailing whitespace removed
      	- comments giving full paths removed
      	- pacaData.c renamed paca.c to remove studlyCaps
      	- Misplaced { moved in lppaca.h
      
      Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64), built
      for 32-bit powermac (ARCH=powerpc).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8882a4da
  16. 05 9月, 2005 1 次提交
  17. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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