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
509509 void account_idle_ticks(unsigned long ticks)
510510 {
511511 cputime_t cputime, steal;
512+
512513 if (sched_clock_irqtime) {
513514 irqtime_account_idle_ticks(ticks);
514515 return;
515516 }
516517
517− cputime = cputime_one_jiffy;
518+ cputime = jiffies_to_cputime(ticks);
518519 steal = steal_account_process_time(cputime);
519520
520521 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