diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-02 19:38:13 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-02 19:38:13 +0200 |
commit | d237098c03eb91cef240e9a1b248c0e1ecd1c80c (patch) | |
tree | c48c55dd3ab7efe2421c6d11248287925b1b7aec | |
parent | Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sp... (diff) | |
parent | sched: fix profile=sleep (diff) | |
download | linux-d237098c03eb91cef240e9a1b248c0e1ecd1c80c.tar.xz linux-d237098c03eb91cef240e9a1b248c0e1ecd1c80c.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
sched: fix profile=sleep
-rw-r--r-- | kernel/sched_fair.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index c9fbe8e73a45..67c67a87146e 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -639,6 +639,16 @@ static void enqueue_sleeper(struct cfs_rq *cfs_rq, struct sched_entity *se) se->block_start = 0; se->sum_sleep_runtime += delta; + + /* + * Blocking time is in units of nanosecs, so shift by 20 to + * get a milliseconds-range estimation of the amount of + * time that the task spent sleeping: + */ + if (unlikely(prof_on == SLEEP_PROFILING)) { + profile_hits(SLEEP_PROFILING, (void *)get_wchan(tsk), + delta >> 20); + } } #endif } |