History

sched/cputime: Fix omitted ticks passed in parameter

Commit: f9bcf1e0e014 ("sched/cputime: Fix steal time accounting") ... fixes a leak on steal time accounting but forgets to account the ticks passed in parameters, assuming there is only one to take into account. Let's consider that parameter back.

Frederic Weisbecker committed 10 years ago

Commit 26f2c751 parent f9bcf1e1 file · +2 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/sched/cputime.c+2−1
@@ -509,12 +509,13 @@ void account_process_tick(struct task_struct *p, int user_tick) · 508 unmodified lines
509void account_idle_ticks(unsigned long ticks)509void account_idle_ticks(unsigned long ticks)
510{510{
511 cputime_t cputime, steal;511 cputime_t cputime, steal;
512
512 if (sched_clock_irqtime) {513 if (sched_clock_irqtime) {
513 irqtime_account_idle_ticks(ticks);514 irqtime_account_idle_ticks(ticks);
514 return;515 return;
515 }516 }
516 517
517 cputime = cputime_one_jiffy;518 cputime = jiffies_to_cputime(ticks);
518 steal = steal_account_process_time(cputime);519 steal = steal_account_process_time(cputime);
519 520
520 if (steal >= cputime)521 if (steal >= cputime)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t