• Martin Schwidefsky's avatar
    sched/cputime, s390: Implement delayed accounting of system time · b7394a5f
    Martin Schwidefsky authored
    The account_system_time() function is called with a cputime that
    occurred while running in the kernel. The function detects which
    context the CPU is currently running in and accounts the time to
    the correct bucket. This forces the arch code to account the
    cputime for hardirq and softirq immediately.
    
    Such accounting function can be costly and perform unwelcome divisions
    and multiplications, among others.
    
    The arch code can delay the accounting for system time. For s390
    the accounting is done once per timer tick and for each task switch.
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    [ Rebase against latest linus tree and move account_system_index_scaled(). ]
    Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Christian Borntraeger <borntraeger@de.ibm.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Stanislaw Gruszka <sgruszka@redhat.com>
    Cc: Tony Luck <tony.luck@intel.com>
    Cc: Wanpeng Li <wanpeng.li@hotmail.com>
    Link: http://lkml.kernel.org/r/1483636310-6557-10-git-send-email-fweisbec@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    b7394a5f
vtime.c 11.3 KB