lkml.org 
[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] cputime: Consolidate vtime handling on context switch
On Tue, 14 Aug 2012 16:16:49 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:

> The archs that implement virtual cputime accounting all
> flush the cputime of a task when it gets descheduled
> and sometimes set up some ground initialization for the
> next task to account its cputime.
>
> These archs all put their own hooks in their context
> switch callbacks and handle the off-case themselves.
>
> Consolidate this by creating a new account_switch_vtime()
> callback called in generic code right after a context switch
> and that these archs must implement to flush the prev task
> cputime and initialize the next task cputime related state.

That change requires that the accounting for the previous process
can be done before finish_arch_switch() completed. With the old
code the architecture could to the accounting call in the middle
of finish_arch_switch, that is not possible anymore. Dunno if this
is relevant or not. For s390 the new code should work fine.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.



\
 
 \ /
  Last update: 2012-08-15 21:42    [from the cache]
©2003-2011 Jasper Spaans