An error occurred fetching the project authors.
  1. 08 Oct, 2020 2 commits
  2. 10 Jul, 2020 1 commit
  3. 03 Apr, 2020 2 commits
  4. 01 Apr, 2020 1 commit
  5. 04 Dec, 2019 1 commit
  6. 15 Nov, 2019 1 commit
    • Arnd Bergmann's avatar
      y2038: vdso: powerpc: avoid timespec references · 176ed98c
      Arnd Bergmann authored
      As a preparation to stop using 'struct timespec' in the kernel,
      change the powerpc vdso implementation:
      
      - split up the vdso data definition to have equivalent members
         for seconds and nanoseconds instead of an xtime structure
      
      - use timespec64 as an intermediate for the xtime update
      
      - change the asm-offsets definition to be based the appropriate
        fixed-length types
      
      This is only a temporary fix for changing the types, in order
      to actually support a 64-bit safe vdso32 version of clock_gettime(),
      the entire powerpc vdso should be replaced with the generic
      lib/vdso/ implementation. If that happens first, this patch
      becomes obsolete.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      176ed98c
  7. 28 Oct, 2019 1 commit
    • Michael Ellerman's avatar
      powerpc/pseries: Mark accumulate_stolen_time() as notrace · eb8e20f8
      Michael Ellerman authored
      accumulate_stolen_time() is called prior to interrupt state being
      reconciled, which can trip the warning in arch_local_irq_restore():
      
        WARNING: CPU: 5 PID: 1017 at arch/powerpc/kernel/irq.c:258 .arch_local_irq_restore+0x9c/0x130
        ...
        NIP .arch_local_irq_restore+0x9c/0x130
        LR  .rb_start_commit+0x38/0x80
        Call Trace:
          .ring_buffer_lock_reserve+0xe4/0x620
          .trace_function+0x44/0x210
          .function_trace_call+0x148/0x170
          .ftrace_ops_no_ops+0x180/0x1d0
          ftrace_call+0x4/0x8
          .accumulate_stolen_time+0x1c/0xb0
          decrementer_common+0x124/0x160
      
      For now just mark it as notrace. We may change the ordering to call it
      after interrupt state has been reconciled, but that is a larger
      change.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20191024055932.27940-1-mpe@ellerman.id.au
      eb8e20f8
  8. 09 Oct, 2019 1 commit
  9. 30 May, 2019 1 commit
  10. 02 May, 2019 1 commit
  11. 20 Apr, 2019 1 commit
  12. 30 Jan, 2019 1 commit
  13. 20 Oct, 2018 3 commits
    • Christophe Leroy's avatar
      powerpc/time: no steal_time when CONFIG_PPC_SPLPAR is not selected · 51eeef9e
      Christophe Leroy authored
      If CONFIG_PPC_SPLPAR is not selected, steal_time will always
      be NUL, so accounting it is pointless
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      51eeef9e
    • Christophe Leroy's avatar
      powerpc/time: Only set CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC64 · abcff86d
      Christophe Leroy authored
      scaled cputime is only meaningfull when the processor has
      SPURR and/or PURR, which means only on PPC64.
      
      Removing it on PPC32 significantly reduces the size of
      vtime_account_system() and vtime_account_idle() on an 8xx:
      
      Before:
      00000000 l     F .text	000000a8 vtime_delta
      00000280 g     F .text	0000010c vtime_account_system
      0000038c g     F .text	00000048 vtime_account_idle
      
      After:
      (vtime_delta gets inlined inside the two functions)
      000001d8 g     F .text	000000a0 vtime_account_system
      00000278 g     F .text	00000038 vtime_account_idle
      
      In terms of performance, we also get approximatly 7% improvement on
      task switch. The following small benchmark app is run with perf stat:
      
      void *thread(void *arg)
      {
      	int i;
      
      	for (i = 0; i < atoi((char*)arg); i++)
      		pthread_yield();
      }
      
      int main(int argc, char **argv)
      {
      	pthread_t th1, th2;
      
      	pthread_create(&th1, NULL, thread, argv[1]);
      	pthread_create(&th2, NULL, thread, argv[1]);
      	pthread_join(th1, NULL);
      	pthread_join(th2, NULL);
      
      	return 0;
      }
      
      Before the patch:
      
       Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs):
      
             8228.476465      task-clock (msec)         #    0.954 CPUs utilized            ( +-  0.23% )
                  200004      context-switches          #    0.024 M/sec                    ( +-  0.00% )
      
      After the patch:
      
       Performance counter stats for 'chrt -f 98 ./sched 100000' (50 runs):
      
             7649.070444      task-clock (msec)         #    0.955 CPUs utilized            ( +-  0.27% )
                  200004      context-switches          #    0.026 M/sec                    ( +-  0.00% )
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      abcff86d
    • Christophe Leroy's avatar
      powerpc/time: isolate scaled cputime accounting in dedicated functions. · b38a181c
      Christophe Leroy authored
      scaled cputime is only meaningfull when the processor has
      SPURR and/or PURR, which means only on PPC64.
      
      In preparation of the following patch that will remove
      CONFIG_ARCH_HAS_SCALED_CPUTIME on PPC32, this patch moves
      all scaled cputing accounting logic into dedicated functions.
      
      This patch doesn't change any functionality. It's only code
      reorganisation.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b38a181c
  14. 19 Oct, 2018 1 commit
    • Michael Ellerman's avatar
      powerpc/time: Fix clockevent_decrementer initalisation for PR KVM · b4d16ab5
      Michael Ellerman authored
      In the recent commit 8b78fdb0 ("powerpc/time: Use
      clockevents_register_device(), fixing an issue with large
      decrementer") we changed the way we initialise the decrementer
      clockevent(s).
      
      We no longer initialise the mult & shift values of
      decrementer_clockevent itself.
      
      This has the effect of breaking PR KVM, because it uses those values
      in kvmppc_emulate_dec(). The symptom is guest kernels spin forever
      mid-way through boot.
      
      For now fix it by assigning back to decrementer_clockevent the mult
      and shift values.
      
      Fixes: 8b78fdb0 ("powerpc/time: Use clockevents_register_device(), fixing an issue with large decrementer")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      b4d16ab5
  15. 04 Oct, 2018 2 commits
  16. 03 Jun, 2018 10 commits
  17. 03 Apr, 2018 1 commit
  18. 14 Mar, 2018 1 commit
  19. 19 Jan, 2018 4 commits
  20. 02 Jul, 2017 1 commit
  21. 22 Jun, 2017 1 commit
    • Paul Mackerras's avatar
      powerpc: Convert VDSO update function to use new update_vsyscall interface · d4cfb113
      Paul Mackerras authored
      This converts the powerpc VDSO time update function to use the new
      interface introduced in commit 576094b7 ("time: Introduce new
      GENERIC_TIME_VSYSCALL", 2012-09-11).  Where the old interface gave
      us the time as of the last update in seconds and whole nanoseconds,
      with the new interface we get the nanoseconds part effectively in
      a binary fixed-point format with tk->tkr_mono.shift bits to the
      right of the binary point.
      
      With the old interface, the fractional nanoseconds got truncated,
      meaning that the value returned by the VDSO clock_gettime function
      would have about 1ns of jitter in it compared to the value computed
      by the generic timekeeping code in the kernel.
      
      The powerpc VDSO time functions (clock_gettime and gettimeofday)
      already work in units of 2^-32 seconds, or 0.23283 ns, because that
      makes it simple to split the result into seconds and fractional
      seconds, and represent the fractional seconds in either microseconds
      or nanoseconds.  This is good enough accuracy for now, so this patch
      avoids changing how the VDSO works or the interface in the VDSO data
      page.
      
      This patch converts the powerpc update_vsyscall_old to be called
      update_vsyscall and use the new interface.  We convert the fractional
      second to units of 2^-32 seconds without truncating to whole nanoseconds.
      (There is still a conversion to whole nanoseconds for any legacy users
      of the vdso_data/systemcfg stamp_xtime field.)
      
      In addition, this improves the accuracy of the computation of tb_to_xs
      for those systems with high-frequency timebase clocks (>= 268.5 MHz)
      by doing the right shift in two parts, one before the multiplication and
      one after, rather than doing the right shift before the multiplication.
      (We can't do all of the right shift after the multiplication unless we
      use 128-bit arithmetic.)
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      d4cfb113
  22. 21 Jun, 2017 1 commit
  23. 30 May, 2017 1 commit