Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221722
b: refs/heads/master
c: 3871525
h: refs/heads/master
v: v3
  • Loading branch information
Ken Chen authored and Linus Torvalds committed Nov 12, 2010
1 parent 4d45d87 commit 18b32d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d056cb965b8fb7c53c564abf28b1962d1061cd3
refs/heads/master: 38715258aa2e8cd94bd4aafadc544e5104efd551
17 changes: 8 additions & 9 deletions trunk/kernel/latencytop.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,14 +194,7 @@ __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter)

account_global_scheduler_latency(tsk, &lat);

/*
* short term hack; if we're > 32 we stop; future we recycle:
*/
tsk->latency_record_count++;
if (tsk->latency_record_count >= LT_SAVECOUNT)
goto out_unlock;

for (i = 0; i < LT_SAVECOUNT; i++) {
for (i = 0; i < tsk->latency_record_count; i++) {
struct latency_record *mylat;
int same = 1;

Expand All @@ -227,8 +220,14 @@ __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter)
}
}

/*
* short term hack; if we're > 32 we stop; future we recycle:
*/
if (tsk->latency_record_count >= LT_SAVECOUNT)
goto out_unlock;

/* Allocated a new one: */
i = tsk->latency_record_count;
i = tsk->latency_record_count++;
memcpy(&tsk->latency_record[i], &lat, sizeof(struct latency_record));

out_unlock:
Expand Down

0 comments on commit 18b32d3

Please sign in to comment.